User:Niklas Holm/sandbox1

From Official Kodi Wiki
Jump to navigation Jump to search
Information: This page contains explanation about EDID generation and usage in xorg.conf
Advanced: The information contained in this page is considered advanced.
Warning: The informations contained in this page can cause issues with your X if any errors or incorrect information is entered.


Outline

If your machine has a black screen only when you boot it up before the TV or AVR, follow this guide.

On some combinations of equipments (AVR/TV/XBMC), in rarer cases you may find that the order you power on your equipment matters. This is obviously inconvenient but can be easily fixed.

The root cause of this issue is the EDID (Extended display identification data) handshake. Xorg may not correctly handshake with AV equipment after boot. Typically this results in a black screen and a full system shut down and restart to rectify.

In this guide we will show you how to trick Xorg into thinking your AV equipment is connected and powered on at all times. This locks on your install to one monitor/AVR (port specific) and should stop all handshake issues.

This example is for a Nvidia GPU, other GPUs will have a similar approach but are not covered here.

Introduction

There are several methods for acquiring EDID information from Xorg.0.log, but in this page we use output from XRandR piped through grep and xxd which has the advantage of not having to restart the X server.

You'll need:

  • Shell access.
  • Sudo privileges
  • parse-edid
  • nvidia-xconfig

You should be running as normal user while following this guide, i.e. not as root Any further references to "root" are meant to be interpreted as base directory not the user.

Note: parse-edid can be installed on Ubuntu with "sudo apt-get install read-edid" Note: nvidia-xconfig is already installed on Ubuntu and variants if you have the nvidia-current drivers installed via the Ubuntu packaging or X-swat PPA. This guide is not intended to instruct users on full use of this tool.

Generating & using edid.bin

Make sure your install is in a working state, powered on in the correct order so that you can see the GUI.

1 Open a terminal session to your machine and backup any existing xorg.conf (either via SSH or locally).
sudo cp -pi /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
2 You can use a current xorg.conf and should always have a backup of existing, however if you want to start with an fresh xorg.conf proceed with following step.
sudo nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.conf
3 Now we work out the display device name of your attached monitor

type:

grep "ConnectedMonitor" /var/log/Xorg.0.log |cut -f2 -d\"

you should see message like the following:

ConnectedMonitor
DFP-0
DFP-0
...

Take a note of the DFP number, in this example "DFP-0". Your number may vary.


Extracting EDID binary

We use XRandR, grep and xxd to extract the EDID information and generate a binary

1
sudo sh -c 'xrandr -display :0.0 --verbose -q | grep -Pzo '"'"'(?<=EDID:)(\s+[0-9a-f]{32})+'"'"' | xxd -r -p > /etc/X11/edid.bin'
sudo chmod 444 /etc/X11/edid.bin
2 Check that the integrity of binary by using parse-edid
cat /etc/X11/edid.bin | parse-edid | grep -i "checksum"

On success you should see a message like the following:

Checksum Correct

If you don't see this message, or any other message in addition to the above, such as

I only know about extension blocks of type 02h ...

or

Extension block checksum failed

please examine the output from

xrandr -display :0.0 --verbose -q

manually to try to locate the issue.


Configure xorg to read from EDID

Now edit the xorg.conf you created again

1
sudo nvidia-xconfig --connected-monitor="DFP-0" --custom-edid="DFP-0:/etc/X11/edid.bin" --use-edid --xconfig=/etc/X11/xorg.conf
Important: It is VITAL you change the DFP-# number to match the one we found earlier.


If you open your xorg.conf with an text editor/reader, your screen section will look something like the example below.

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "NoLogo" "True"
    Option         "UseEdid" "True"
    Option         "CustomEDID" "DFP-0:/etc/X11/edid.bin"
    Option         "ConnectedMonitor" "DFP-0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
2 {{{Step2}}}


Since we have created a new xorg.conf file in a location the OS knows to use as default, no further changes need made to make this permanent. If at a later date you need to undo this work simple rename the config file and reboot to revert to default.

If all has went to plan when you reboot everything will just work and the order of powering equipment up will not matter anymore.

Note: If your equipment is coupled to a receiver that has broader HDMI capabilities than your TV, you should edit your xorg.conf so that the section "Screen" looks like this:

Section "Screen"
    Identifier     "screen"
    Device         "nvidia"
    DefaultDepth    24
    Option         "ColorRange" "Full"
    Option         "ColorSpace" "RGB"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

EDID Library

The edid library is intended to be a collection of user generated edid.bin for equipment such as TV's or AVR's in case users want to test or modify or share with others existing edid's. This section is a WIP and will need to be improved on by users.

Use the Legend below as a guide to fill in new entries onto the edid.bin table.

Legend
Yes No N/A ? Other
{{yes}} {{no}} {{NA}} {{?}} Other
Warning: Make sure you have a backup of your current installation before using any edid.bin below. Verify download integrity via MD5 checksum.


Below is an area that the general community can share their edid.bin and relevant information with other users.
Feel free to update and share your experience below.

TV Brand AVR Brand Model GPU Brand/Model Working Download link Download contents
Samsung N/A Series 5 Nvidia ION Yes Download edid.zip edid.bin edid.md5
? ? ? ? ? Download edid.bin ? ?

Note: Recommended you would create a md5 checksum of the edid.bin and compress both so it can be checked for integrity on download.

Credits

The edid instructions are adapted from the Openelec wiki, credit to original authors[1]

References