Topic: X with HDMI on TV gives no picture

When using a TV as a HDMI device (see also this forum message), I get no picture just a blank screen and no consoles. On my only monitor (that has HDMI), I do get a picture with X, so it is some sort of compatability problem between HDMI with X and all my TV's (my regular one, an old 32" one and a 24" TV).

I decided to go to CLI mode instead of GUI mode. It took me some googling, but I found how to enable boot to CLI (not starting LightDM). Note: with X and the screen blank, ctrl-alt-f1 .. f6 also have no effect, but when boted to CLI mode they work.

sudo -s
ln -sf /lib/systemd/system/multi-user.target /lib/systemd/system/default.target

(see here for some explanation)

Now I can debug without ssh-ing from the other side of the room.

When booting I had a 'picture' until X starts, but then the screen goes blank with a message 'unsupported video mode'.
I don't know yet what that video mode is, xrandr just tels me 'Can't open display' (from the ssh session and now also from the console). with startx I get the same black screen and only a reboot fixes this for me.

More debugging to do. At least I have a CLI prompt now smile without ssh-ing into it.

Re: X with HDMI on TV gives no picture

Just for completeness. This is the EDDI get from the TV:

~$ sudo get-edid | parse-edid                                                                                                                      
This is read-edid version 3.0.1. Prepare for some fun.
Attempting to use i2c interface
No EDID on bus 2
2 potential busses found: 0 1
Will scan through until the first EDID is found.
Pass a bus number as an option to this program to go only for that one.
Bus 0 doesn't really have an EDID...
256-byte EDID successfully retrieved from i2c bus 1
Looks like i2c was successful. Have a good day.
Checksum Correct

Section "Monitor"
        Identifier "Philips FTV"
        ModelName "Philips FTV"
        VendorName "PHL"
        # Monitor Manufactured week 8 of 2009
        # EDID version 1.3
        # Digital Display
        DisplaySize 1280 720
        Gamma 2.20
        Option "DPMS" "false"
        Horizsync 15-70
        VertRefresh 48-62
        # Maximum pixel clock is 150MHz
        #Not giving standard mode: 1360x765, 60Hz
        #Not giving standard mode: 1280x1024, 60Hz
        #Not giving standard mode: 1600x1200, 60Hz

        #Extension block found. Parsing...
        Modeline        "Mode 20" +hsync +vsync 
        Modeline        "Mode 0" +hsync +vsync 
        Modeline        "Mode 1" +hsync +vsync 
        Modeline        "Mode 2" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 3" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 4" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 5" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 6" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 7" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace
        Modeline        "Mode 8" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace
        Modeline        "Mode 9" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync
        Modeline        "Mode 10" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync
        Modeline        "Mode 11" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
        Modeline        "Mode 12" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 13" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
        Modeline        "Mode 14" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 15" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace
        Modeline        "Mode 16" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace
        Modeline        "Mode 17" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace
        Modeline        "Mode 18" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace
        Modeline        "Mode 19" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync
        Modeline        "Mode 21" +hsync +vsync interlace
        Modeline        "Mode 22" +hsync +vsync 
        Modeline        "Mode 23" +hsync +vsync interlace
        Option "PreferredMode" "Mode 20"
EndSection
~$ 

It looks a bit strange (and the lines without numbers give errors when used in xorg.conf). The reported display size is incorrect (itś a 32"display, so much smaller), but that should not cause this effect. I can change the display mode with xrandr e.g like this:

 xrandr -d :0 --output HDMI1 --mode 1280x720 --rate 30.00 --verbose

xrandr only works after 'startx' (so with X running) and then the console goes blank. So I can only do this from an ssh session.

I have not yet found a mode that works on the TV, but my monitor with HDMI is not a problem.

BTW the small 24" TV has the same problem, but is a Samsung, not Philips.

Re: X with HDMI on TV gives no picture

There are two groups of HDMI resolutions, CEA and DMT. CEA modes are used for TV's and are the 1080p, 720p, 480i etc type, and DMT is used for monitors and are specified in pixels (e.g. 1920x1080). Sounds like only the DMT modes are currently working.

Re: X with HDMI on TV gives no picture

Did you try copying some of the modelines from the EDID dump to the Xorg config?

Re: X with HDMI on TV gives no picture

pelrun wrote:

Sounds like only the DMT modes are currently working.

How do I know which modeline belongs to a DMT mode?

BTW the modelines in Xorg.o.log are similar, but sligtly different. I copied them to an xorg.conf and tried several, but all with the same (not working) result. I could see a effect of the mode change (the message unsupported mode re-apears for a short time),

6 (edited by roheve 2015-04-02 04:24:30)

Re: X with HDMI on TV gives no picture

pelrun wrote:

Did you try copying some of the modelines from the EDID dump to the Xorg config?

Yes I did. But today I noticed that those where not used at all sad as it turned out I forgot to tell xorg to use that monitor section.

[  7172.877] (==) Using config file: "/etc/X11/xorg.conf"
[  7172.878] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  7172.881] (==) No Layout section.  Using the first Screen section.
[  7172.881] (==) No screen section available. Using defaults.
[  7172.881] (**) |-->Screen "Default Screen Section" (0)
[  7172.881] (**) |   |-->Monitor "<default monitor>"
[  7172.882] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
[  7172.882] (**) |   |-->Device "novena"
[  7172.882] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.

So, my Monitor Section had a different name than X assumed. So I added a Screen section, that defined the monitor section

Section "Screen"
    Identifier     "Screen0"
 #   Device         "Device0"
    Monitor        "Philips FTV"
    DefaultDepth    24
    Option         "ModeDebug"  "true"
    Option         "UseEDID"    "false"
    Option         "UseEdidDpi" "false"
EndSection

Section "Monitor"
        Identifier "Philips FTV"
        ModelName "Philips FTV"
        VendorName "PHL"
        # Digital Display
        DisplaySize 1280 720
        Gamma 2.20
        Option "DPMS" "false"
        Horizsync 15-70
        VertRefresh 48-62
        # Maximum pixel clock is 150MHz

        Modeline "1920x1080x60"  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080x50"  148.50  1920 2448 2492 2640  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080x59"  148.35  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080x30"   74.25  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080x25"   74.25  1920 2448 2492 2640  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080x24"   74.25  1920 2558 2602 2750  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080x30"   74.18  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080x24"   74.18  1920 2558 2602 2750  1080 1084 1089 1125 +hsync +vsync
        Modeline "1600x1200x60"  162.00  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync
        Modeline "1280x1024x60"  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync
        Modeline "1366x768x59"    84.75  1366 1431 1567 1776  768 771 781 798 -hsync +vsync
        Modeline "1280x720x60"    74.25  1280 1390 1430 1650  720 725 730 750 +hsync +vsync
        Modeline "1280x720x50"    74.25  1280 1720 1760 1980  720 725 730 750 +hsync +vsync
        Modeline "1280x720x59"    74.18  1280 1390 1430 1650  720 725 730 750 +hsync +vsync
        Modeline "1024x768x60"    65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync
        Modeline "800x600x60"     40.00  800 840 968 1056     600 601 605 628 +hsync +vsync
        Modeline "720x576x50"     27.00  720 732 796 864      576 581 586 625 -hsync -vsync
        Modeline "720x480x60"     27.03  720 736 798 858      480 489 495 525 -hsync -vsync
        Modeline "720x480x59"     27.00  720 736 798 858      480 489 495 525 -hsync -vsync
        Modeline "640x480x60"     25.20  640 656 752 800      480 490 492 525 -hsync -vsync
        Modeline "640x480x59"     25.18  640 656 752 800      480 490 492 525 -hsync -vsync

        Option "PreferredMode" "1366x768x59"

EndSection

This turned out to be the solution. Voila, Picture...
Using the XFCE settings->desktop menu, I can select other  modes and the few I checked, all worked.

Funny to see the resolution changing from the other side of the room through using xrandr in an SSH session.

[ a bit later]
Sometimes mode switching  goes wrong and I and up with the blank screen again, until I reboot. So more work to do, but much closer now. Also starting with my prefered 1920x1080x60 mode does not work, but switching to it using the display settings GUI works.

Re: X with HDMI on TV gives no picture

roheve wrote:

Sometimes mode switching  goes wrong and I and up with the blank screen again, until I reboot. So more work to do, but much closer now. Also starting with my prefered 1920x1080x60 mode does not work, but switching to it using the display settings GUI works.

This goes wrong, more or less randomly. Using the 1355x768x59 mode as default, running 'startx' (after a reboot) mostly works, but sometimes not. using 1920x1080x60 never works as the default.

Strangely, in all cases I can switch mode through ssh and then it mostly works, e.g after booting with 1366x768 (and getting or not getting a picture, using ssh to change mode mostly works (again, sometimes not and then it needs a reboot before it starts working again). At least better than never a picture...

:~$ xrandr -d :0 --output HDMI1 --mode 1920x1080x60 --refresh 60.0 --verbose
crtc 1: disable
crtc 0:    1920x1080  60.00 +0+0 "LVDS1"
crtc 2: 1920x1080x60  60.00 +0+0 "HDMI1"

or

:~$ xrandr -d :0 --output HDMI1 --mode 1366x768x59 --refresh 59.0 --verbose
crtc 2:  1366x768x59  59.80 +0+0 "HDMI1"

or

:~$ xrandr -d :0 --output HDMI1 --mode 720x480 --refresh 60.0 --verbose
crtc 2:      720x480  60.00 +0+0 "HDMI1"

to list a few of the modes I tried with getting 'picture' smile

Re: X with HDMI on TV gives no picture

roheve wrote:
roheve wrote:

Sometimes mode switching  goes wrong and I and up with the blank screen again, until I reboot. So more work to do, but much closer now. Also starting with my prefered 1920x1080x60 mode does not work, but switching to it using the display settings GUI works.

I disabled the LVDS screen in the GUI (Setup->Display), as I still not mounted the LCD.  That seemed to fix booting and the resolution (It now gives an X GUI after typing startx in the console) and I did not see that fail anymore...

roelof@novena:~$ xrandr
Screen 0: minimum 64 x 64, current 1920 x 1080, maximum 4096 x 4096
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1280mm x 720mm
   1366x768_60   59.80 +
   1920x1080     60.00*+  50.00    59.94    59.94  
   1280x1024     60.02  
   1360x768      59.80  
   1280x720      60.00    50.00    60.00    50.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
LVDS1 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +

I also modified the xorg.conf and removed some 'duplicate' and lowres modelines. It should still try to default to 1366x768, but starts with 1920x1080 anyway. Probably some other start-script that forces it, but it is a huge difference that it now just starts with a GUI in a mode that the TV accepts (without forcing a mode from a remote ssh session). It still autodetects modes (I added previously in xorg.conf) so reading the EDID works.