0

I'm running Ubuntu on a PC that I which to connect to a TV. I had trouble making my TV recognize the PC. It says that the resolution of the external device is not supported. Since I could not get an image, I plugged a old monitor to my computer and adjusted the resolution using the monitor. It worked. I got the image on the TV as I wanted, but if a unplug the monitor from my computer, I get the same error on my TV. Apparently, if my monitor is not plugged in, Ubuntu messes up the resolution that I had set and my TV does not show the picture. I think it has something to do with the refresh rate, because I could only get it to work, when I set the refresh rate to 60 hz.

My goal is to use the TV exclusive and have no monitors plugged in my computer. I have no idea of what is happening. I've unplugged the power cord from the monitor and everything still works, but if I unplug the dvi cable, Ubuntu changes the resolution and my TV does not display the image.

Can anyone help me?

Here is some more clarification on the situation:

The problem is not the 60Hz refresh rate. I'm fine with the value, the problem is that Ubuntu apparently changes this value automatically when I unplug the monitor, this change in value renders my TV unable to display the image from the PC.

My problem is that I want to have only a TV plugged to my computer, without the need to have a monitor plugged in as well. Even with the monitor completely turned off (with no power cord), if I unplug the DVI cable, Ubuntu changes the resolution and the image stops showing on my TV.

The TV is a Samsung TV (Samsung 50TU8000) and it is connect to the PC using a HDMI cable.

The command xrandr prints the following:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
DVI-I-1 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  59.96    50.00    59.94    59.93  
   1680x1050     69.88    59.95    59.88  
   1600x1024     60.17  
   1400x1050     74.76    70.00    59.98  
   1600x900      59.95    60.00    59.82  
   1280x1024     75.02    60.02  
   1440x900      59.89    59.90  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      75.00    75.00    70.00    60.00  
   1280x720      60.00    59.99    59.86    60.00    50.00    59.94    59.74  
   1024x768      75.05    60.04    75.03    70.07    60.00  
   960x720       75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       75.00    70.00    65.00    60.00    72.19    75.00    60.32    56.25  
   840x525       74.96    69.88    60.01    59.88  
   864x486       59.92    59.57  
   720x576       50.00  
   800x512       60.17  
   700x525       74.76    70.06    59.98  
   800x450       59.95    59.82  
   720x480       60.00    59.94  
   640x512       75.02    60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    75.00    72.81    75.00    66.67    60.00    59.94  
   720x405       59.51    58.99  
   720x400       70.08  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       75.00    75.00    70.00    60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       75.03    70.07    60.00  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       72.81    75.00    60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DVI-I-2 disconnected (normal left inverted right x axis y axis)
HDMI-3 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 1872mm x 1053mm
   1920x1080     59.97    59.96    60.00*   50.00    59.94    59.93    30.00    25.00    24.00    29.97    23.98  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     74.89    69.88    59.95    59.88  
   1600x1024     60.17  
   1400x1050     74.76    70.00    59.98  
   1600x900      59.99    59.94    59.95    60.00    59.82  
   1280x1024     75.02    60.02  
   1440x900      59.89    59.90  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      75.00    75.00    70.00    60.00  
   1280x720      60.00    59.99    59.86    60.00    50.00    59.94    59.74  
   1024x768      75.05    60.04    75.03    70.07    60.00  
   960x720       75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       75.00    70.00    65.00    60.00    72.19    75.00    60.32    56.25  
   840x525       74.96    69.88    60.01    59.88  
   864x486       59.92    59.57  
   720x576       50.00  
   800x512       60.17  
   700x525       74.76    70.06    59.98  
   800x450       59.95    59.82  
   720x480       60.00    59.94  
   640x512       75.02    60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    75.00    72.81    75.00    66.67    60.00    59.94  
   720x405       59.51    58.99  
   720x400       70.08  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       75.00    75.00    70.00    60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       75.03    70.07    60.00  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       72.81    75.00    60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
VGA-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)

The TV does not show BIOs screen when loading. The first image it shows, when I use this set up (with the monitor plugged in and turned off) is the Ubuntu loading screen.

  • 1
    "I could only get it to work, when I set the refresh rate to 60 hz" - so what is the problem with 60Hz? That's easily the most common refresh rate for a display. Since this is a TV and not a monitor, you might need to disable any/all post processing effects on the TV. – Nmath Mar 15 '21 at 18:43
  • The problem is not the 60Hz refresh rate. I'm fine with the value, the problem is that Ubuntu apparently changes this value automatically when I unplug the monitor, this change in value render my TV unable to display the image from the PC. My problem is that I want to have only a TV plugged to my computer, without the need to have a monitor plugged in as well. Even with the monitor completely turned off (with no power cord), if I unplug the DVI cable, Ubuntu changes the resolution and the image stops showing on my TV. – user3347814 Mar 15 '21 at 18:48
  • 1
    What kind of TV is this? How exactly is it connected? – Nmath Mar 15 '21 at 19:59
  • It's a Samsung Smart TV (Samsung 50TU8000). It is connect to the PC using a standard HDMI cable. – user3347814 Mar 15 '21 at 20:19
  • 1
    And you've disabled all post processing? Have you exhaustively gone through all of the options on the TV? – Nmath Mar 15 '21 at 20:32
  • I could not find any settings on my TV that made it work. The only way it works, is if I plug in the monitor, so I can see the screen, set the configuration on Ubuntu to 60Hz and keep the monitor plugged in. If I unplug the monitor, the TV stops receiving image. Then I have to plug the monitor and set again the refresh rate to 60Hz. – user3347814 Mar 15 '21 at 22:04
  • I know this is extremely odd. And it is puzzling me. – user3347814 Mar 15 '21 at 22:05
  • What does xrandr tell? Can you use a key binding for appropriate xrandr command to set the suitable resolution and refresh rate even if the monitor is not connected? Does the TV work during boot? – jarno Mar 17 '21 at 20:57
  • "Can you use a key binding for appropriate xrandr command to set the suitable resolution and refresh rate even if the monitor is not connected?" I'm not completely sure of what this means, but it sounds like a possible solution. Could you clarify further? (I've edit my questions with xrandr print). – user3347814 Mar 17 '21 at 22:02
  • 1
    Which resolution did not work for TV? I assume 1920x1080 works. What happens if you run xrandr --output HDMI-3 --mode 1920x1080 --rate 60 after you have disconneted the other monitor? – jarno Mar 17 '21 at 23:28
  • 1
    Have you checked your BIOS for any DVI/HDMI settings? What are the Ubuntu Display settings? Joined? Mirrored? Which monitor is primary? – Wayne Vosberg Mar 18 '21 at 08:28

2 Answers2

1

Define and activate a custom mode.

  1. Get parameters with cvt

    $ cvt 1920 1080 60
    # 1920 1080 ...
    Modeline "1920x1080_60.00" ...
    
  2. Define your custom mode (copy the parameters you got in Modeline ...)

    $ xrandr --newmode "1920x1080_60.00" ...
    
  3. Add the mode

    $ xrandr --addmode HDMI-3 "1920x1080_60.00"
    
  4. Set the mode

    $ xrandr --output HDMI-3 --mode "1920x1080_60.00"
    

Check if all this works with the DVI cable plugged (when you can see the image), and your custom mode is selected. If that does not work, try cvt -r ... instead of cvt ....

Automate the changes

If the above works, proceed with making the changes automatically. Add lines

xrandr --newmode "1920x1080_60.00" ...
xrandr --addmode HDMI-3 "1920x1080_60.00"
xrandr --output HDMI-3 --mode "1920x1080_60.00"

to ~/.xprofile (you might need to create it). If this doesn't work, try adding the lines to ~/.xinitrc. If this doesn't work either, try alternative solutions in How to run xrandr commands at startup in Ubuntu. In any of these cases, reboot to complete verification that the setup works.

If none of this works, you can try:

  1. Writing a script that would run xrandr and dump the output to file every ten/twenty seconds, so you can see how the output changes when DVI is unplugged/plugged.
  2. Check the output of dmesg for some hint on the issue.
  3. Setting up a VNC connection to try debugging the issue.
  4. Try having another HDMI monitor/TV to check the same.
  5. Connecting the TV to a different port, if possible.

Related:

  1. HDMI stops working when DisplayPort is unplugged
  2. xrandr not listing all connected monitors
  3. https://unix.stackexchange.com/questions/13746/how-can-i-detect-when-a-monitor-is-plugged-in-or-unplugged/60110
  4. https://unix.stackexchange.com/questions/4489/a-tool-for-automatically-applying-randr-configuration-when-external-display-is-p
  5. Best place to automatically add mode in xrandr
  6. How do I save my new resolution setting with xrandr?
  7. https://wiki.ubuntu.com/X/Config/Resolution#Setting_xrandr_changes_persistently
  • This, unfortunately, did not work. As soon as I unplug the DVI cable, I get the same problem. – user3347814 Mar 22 '21 at 02:45
  • 1
    @user3347814 - Could you confirm?:
    1. If you exceuted the steps under "Define and activate a custom mode." and your display worked ok.
    2. If you exceuted the steps under "Automate the changes" and your display worked ok (note that I have added the need for rebooting for a complete verification).
    3. If you set up a VNC connection.
    4. Posting the output of xrandr just prior to unplugging the DVI, with the changes I suggest already implemented (I am not sure they will be the same as what you already posted)
    – sancho.s ReinstateMonicaCellio Mar 22 '21 at 13:00
  • 1
    @user3347814 - Also, please see update in "If none of this works" and the first 3 new "Related" links – sancho.s ReinstateMonicaCellio Mar 22 '21 at 13:14
1

Work in progress answer to show what xrandr settings should look like when multiple monitors are active:

$ xrandr | grep " connected" -A2

HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1107mm x 623mm 1920x1080 60.00+ 59.94 50.00 29.97 23.97 60.00 50.04
1680x1050 59.95
-- eDP-1-1 connected primary 1920x1080+3840+2160 (normal left inverted right x axis y axis) 382mm x 215mm 1920x1080 60.02
+ 60.01 59.97 59.96 59.93 48.02
1680x1050 59.95 59.88
-- DP-1-1 connected 3840x2160+1920+0 (normal left inverted right x axis y axis) 1600mm x 900mm 3840x2160_54.00 53.98 + 3840x2160 30.00*+ 24.00 29.97 23.98

Note: My own DP-1-1 Toshiba 4K TV required override to conventional 60Hz refresh rate otherwise no picture would appear.

Run the command xrandr | grep " connected" -A2 and post results into question.