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.

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
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.