Tag Archives: hDMI

Fixing Blank Screen if Ubuntu 9.10 Started with HDTV or Monitor Turned Off

Lord knows this was painful to fix as I’m a relative Linux newbie.

Problem:

My HTPC, when started up with my HDTV turned off does not detect the TV and results in a blank screen. I can VNC into the Ubuntu OS but the resolution is very low (800×600). I suspect this is due to the television as I’ve read in some forums that this is just ‘one of those things’ on certain models. The graphics card is an Nvidia MSI 8400GS, connected to a Toshiba 37AV505D HDTV via an HDMI cable with a DVI adapter into the card.

After some research it appears the graphics card is waiting for monitor information to come down the connected cable via EDID. As the monitor is off, the card defaults to ‘failsafe’ settings and switches output to the VGA port at 800×600.

Solution:

Force the graphics to ignore missing EDID information, force output to DVI and also force the resolution.

Brief Solution Explanation:

Export EDID settings for connected and correctly configured flatscreen/HDTV. Point xorg.conf to use the exported settings and to ignore all else.

This is what I did to fix it:

Warning: This is, apparently, dangerous and can spanner your TV/monitor if done incorrectly. Proceed at your own risk etc etc

  1. Ensure ssh is installed
    This is so you can restore your xorg.conf file if everything goes tits up.
  2. Backup the xorg.conf file
    This file is, apparently, somewhat old and rarely used. When I totally spannered this setup (which I did a couple of times), I was be able to SSH back into the box and return the file to the original.
    First, open terminal and change permissions:
    cd /etc/X11
    sudo chmod 777 xorg.conf

    then make a new copy:
    sudo mv xorg.conf xorg.conf.original
  3. Make a new xorg.conf file
    At the moment no xorg.conf file exists. As I am using the Nvidia driver, I created a new xorg.conf file by starting the Nvidia settings in terminal:
    sudo nvidia-xconfig
  4. Start up the NVIDIA settings manager
    sudo nvidia-settings
    (You can also get to it by going to ‘System’ – ‘Preferences’ – ‘Display’. It should be present if your system is fully up-to-date) . Looks something like this:
  5. NVIDIA X Server Settings in Ubuntu 9.10Ensure the monitor/screen/LCD/HDTV or whatever is the ONLY monitor connected and save the settings
    Go to the ‘X Server Display Configuration’ option and ensure you select the correct resolution, frequency.
    Click on the ‘Advanced…’ button.
    Take a note of the ‘Model’ (in my case ‘TSB TOSHIBA (DFP-0 on GPU-0)’) and the ‘Mode Name’ (in my case ‘1920x1080_60i’).
    Click ‘Save to X Configuration File’ and save to ‘/etc/X11/xorg.conf’.
    If you have problems saving you will probably have to reset the permissions, as per step 2 (‘sudo chmod 777 xorg.conf’).

    Screenshot-NVIDIA X Server Settings

    Don't forget to save your settings

  6. Quit and restart Ubuntu.
  7. Export your EDID settings
    In terminal, start the Nvidia Settings GUI again with:
    sudo nvidia-settings
    Now go to the settings for your flat panel (in my case it was ‘DFP-0 – (TSB TOSHIBA-TV)’
    Click the ‘Acquire EDID…’ button and note where you saved it (in my case I chose ‘/home/mark/Desktop/edid.bin)
    Acquire EDID...
  8. Modify the xorg.conf file to use exported EDID file
    Open terminal and ensure you have write permissions for xorg.conf:
    cd /etc/X11
    sudo chmod 777 xorg.conf
    sudo gedit xorg.conf

    This should open your xorg.conf file.
    Under the ‘Section “Device”‘ I added:
    Option “CustomEDID” “DFP-0:/home/mark/Desktop/edid.bin”
    ‘DFP-0’ is ‘Digital Flat Panel – 0’, we noted this in step 5. Yours may well be different.
    The section ended up looking like this:
    Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400 GS"
    Option         "CustomEDID" "DFP-0:/home/mark/Desktop/edid.bin"
    EndSection

    It’s probably worth restarting just to see that everything’s still ok. Still with the monitor on, it should boot up ‘normally’.
  9. Force the screen to use DVI and ignore other modes
    I added these two lines under the ‘Section “Screen”‘:
    Option         "ConnectedMonitor" "DFP-0"
    (This forces the graphics card to assume the above monitor is connected)
    Option         "ExactModeTimingsDVI" "TRUE"
    (This gets the graphics card to ignore any other possible modes available)
    I then removed all but the mode I wished to use and locked it to the monitor I wished to use:
    Option         "metamodes" "DFP-0: 1920x1080_60i +0+0"
    (This line had lots more modes specified, separated by commas and semicolons).
    The section ended up looking like this:
    Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "ConnectedMonitor" "DFP-0"
    Option         "ExactModeTimingsDVI" "TRUE"
    Option         "metamodes" "DFP-0: 1920x1080_60i +0+0"
    SubSection     "Display"
    Depth       24
    EndSubSection
    EndSection
  10. Reboot and check it boots up with monitor turned on
    The display should look totally normal.
  11. Reboot with monitor turned off to test
    Turn display on after it’s booted into the OS.

Problems? Troubleshooting? Try opening up ‘/var/log/xorg.0.log’ and looking through to see what’s not working.

If your display was hosed, you can see the log from the time BEFORE you just booted by checking out ‘/var/log/xorg.0.log.old’.

This post and this post really helped me out.

Advertisements