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

13 responses to “Fixing Blank Screen if Ubuntu 9.10 Started with HDTV or Monitor Turned Off

  1. Johan Gislén

    Thanks! Had the same problems and your post helped me solve it!

  2. Hi,

    Cheers for the information – I had nearly sorted it, but was using “DFP” for connected monitor.

    I did find that I don’t need to include the “metamodes” or “ExactModeTimingsDVI” option for my system – here is my config in case anyone is looking.

    Section “Monitor”
    Identifier “Projector”
    VendorName “JVC”
    ModelName “ILAFPJ — XT4”
    EndSection

    Section “Device”
    Identifier “Card0”
    Driver “nvidia”
    VendorName “nVidia Corporation”
    BoardName “Unknown Board”
    BusID “PCI:3:0:0”
    Screen 0
    Option “CustomEDID” “DFP-0:/etc/X11/jvc-ilafpj-xp4-edid.bin”
    EndSection

    Section “Screen”
    Identifier “Screen0”
    Device “Card0”
    Monitor “Projector”
    DefaultDepth 24
    Option “ConnectedMonitor” “DFP-0”
    Option “UseDisplayDevice” “DFP-0”
    SubSection “Display”
    Depth 24
    Modes “1280x768_60” “1280×768”
    Virtual 1280 768
    ViewPort 0 0
    EndSubSection
    EndSection

  3. Ahhh mate…..
    You really saved my bacon,
    Was really frustrated trying to get Xbmc-live to “see” my TV over HDMI, spent hours trawling through the xbmc forums – trying all sorts of stuff.
    Then made a final search for Ubuntu 9.10 and HDMI (Xbmc-live is based on Ubuntu 9.10) and found your post.
    I installed the latest Ubuntu, which booted via VGA, and was able to enable HDMI, I then rebooted via HDMI, grabbed the EDID, and xorg.conf.
    I Re-Installed xbmc-live, followed your instructions and it booted with display first time!
    So thanks are in order!!

  4. thank you, worked great on HTPC, running ubuntu 10.04

  5. F’ing brilliant! My VNC was stuck in 640×480 and now I have 720p Resolution. I only got as far as the ConnectedMonitor option.
    Many many thanks!

  6. WOW! Thanks for the post and figuring this all out. I had the same problem and this solved it. I knew it had to be something along these lines, but it would have taken me more time than I cared to make it happen. You have saved my MythTV setup.

  7. Thanks, was looking for this 🙂

  8. Nice One. Had been poking about at this issue in 10.04 Ubuntu/HTPC for a while. Your guidance sorted it . Cheers

  9. Pingback: Fixing Blank Screen if Ubuntu 10.04 Running XBMC Started with HDTV Turned Off at Rural Hi-Fi

  10. Awesome job, thanks a million for this simple write-up!

    I have a HTPC running Ubuntu 12.04 that connects to my TV over HDMI. I followed the steps above, but in step 9 I only added the “ConnectedMonitor” option. I figured I don’t use DVI, an my Screen section didn’t have explicit mode lines, so I didn’t add any.

    Here’s my Screen section in xorg.conf:

    Section “Screen”
    Identifier “Screen0”
    Device “Device0”
    Monitor “Monitor0”
    DefaultDepth 24
    Option “TwinView” “0”
    Option “metamodes” “nvidia-auto-select +0+0”
    SubSection “Display”
    Depth 24
    EndSubSection
    Option “ConnectedMonitor” “DFP-1”
    EndSection

  11. Hi, Thanks for this information. Just to let people know this information is just as relevant on Ubuntu 12.04 :). This article solved the problem that many others failed to do!

    Hardware: Dell Server (Dual Xeon) with Nvidia Quadro Graphics card. Now boots without a monitor!

  12. This also works for KVM problems I was having in Ubunut 12.10. Whenever I would switch over to another computer and the first would go into screen-saving mode, when I would come back, the driver had crashed.

  13. Thanks a lot for this guide, it has been extremely useful to set up an HTPC linux box attached to a projector. I can now boot up the system to listen to my music with no need for the projector to be on !

    Just a small addition, I had the GLX driver which was not loading correctly after adding the CustomEDID directive. I just added the modules path (found there : /etc/X11/xorg.conf.d/00-nvidia.conf) in the “files” section of the /etc/X11/xorg.conf file like this :
    Section “Files”
    ModulePath “/usr/lib64/nvidia/xorg”
    ModulePath “/usr/lib64/xorg/modules”
    EndSection

    Thanks again !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s