Config EDID nvidia



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

On some combinations of equipments (Amp/TV/OpenELEC) 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 (a component of OpenELEC) 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 your OpenELEC install to one monitor/AMP (port specific) and should stop all handshake issues.

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

There are many excellent guides on the forum already but most require multiple reboots and the use of other Operating Systems such as windows or Ubuntu.

This guide will not require the use of anything other than OpenELEC nor it will require several reboots.

You'll need:


 * SSH access to your OpenELEC machine
 * Nano installed; for versions 0.7 and above, you'll need to install the nano add-on from System > Addons > Get Addons > OpenELEC.tv > Programs > nano and click install.

OK, let's begin.

First make sure you have OpenELEC in a working state, powered on in the correct order so that you can see the GUI.

Open an SSH session to your OpenELEC machine.

We gather the tool we need. We will be working with OpenELEC 32bit generic. If you are using a 64bit version download "nvidia-xconfig.x86_64" from the same location instead

type:

cd /storage/

For 32bit type: wget http://chewitt.openelec.tv/nvidia-xconfig.i386

For 64bit type: wget http://chewitt.openelec.tv/nvidia-xconfig.x86_64

If all goes to plan you will see something like:

Connecting to chewitt.openelec.tv (212.101.13.10:80) nvidia-xconfig.i386 100% |*********************************************************************|   693k  0:00:00 ETA

Now we work out the Assigned Display Device DFP number

type: cat /var/log/Xorg.0.0.log | grep DFP you should see message like the following:

[184756.401] (II) NVIDIA(0): Assigned Display Device: DFP-0 Take a note of the DFP number in this example "DFP-0". Your number may vary.

In order to gather the information we need to place Xorg into debug mode.

First find out the command used in your current instal to start Xorg

type:

ps | grep -i xorg you should see information like this

1221 root      0:00 Xorg :0.0 vt01 -s 0 -noreset -allowMouseOpenFail -nolisten tcp -config /etc/X11/xorg-nvidia.conf -ignoreABI We will use the config file location seen in these results to create a config file duplicate we can modify

type: cp /etc/X11/xorg-nvidia.conf /storage/.config/xorg.conf To place Xorg in debug mode we add the debug command to our new config.

type: nano /storage/.config/xorg.conf

In the Section "Device" which will include Driver "nvidia" add:

Option "ModeDebug" "true" Your config file should now look something like:

Section "Device" Identifier    "nvidia" Driver        "nvidia" Option        "DynamicTwinView" "False" Option        "NoFlip" "false" Option        "NoLogo" "true" Option        "ConnectToAcpid" "0" Option        "FlatPanelProperties" "Scaling = Native" Option        "ModeValidation" "NoVesaModes, NoXServerModes" Option        "HWCursor" "false" Option        "ModeDebug" "true" EndSection Now we stop Xorg

type: killall -9 Xorg

And start it again using a combination of the command disciverd eariler and our new config file

type: Xorg :0.0 vt01 -s 0 -noreset -allowMouseOpenFail -nolisten tcp -config /storage/.config/xorg.conf -ignoreABI & You should see something like the following:

[1] 1616 root ~ # X.Org X Server 1.11.4 Release Date: 2012-01-27 X Protocol Version 11, Revision 0 Build Operating System: Linux 2.6.32-31-generic-pae i686 OpenELEC.tv Current Operating System: Linux LOUNGE 3.2.17 #1 SMP Sat May 19 05:19:29 CEST 2012 i686 Kernel command line: fastboot root=/dev/ram0 rdinit=/init threadirqs boot=LABEL=System disk=LABEL=Storage quiet BOOT_IMAGE=/KERNEL Build Date: 17 May 2012 03:59:21AM Current version of pixman: 0.25.2 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.0.log", Time: Wed Jun 20 20:52:05 2012 (++) Using config file: "/storage/.config/xorg.conf" (==) Using system config directory "/usr/share/X11/xorg.conf.d"

Note you may have to hit return here to see your cursor. Now that all the precursors are setup we can extract the RAW binary EDID information to a file.

First we make the file executable

type for 32bit: chmod +x nvidia-xconfig.i386

type for 64bit: chmod +x nvidia-xconfig.x86_64

Now we extract the EDID binary:

type for 32bit: ./nvidia-xconfig.i386 --extract-edids-from-file=/var/log/Xorg.0.0.log --extract-edids-output-file=/storage/.config/edid.bin

type for 64bit: ./nvidia-xconfig.x86_64 --extract-edids-from-file=/var/log/Xorg.0.0.log --extract-edids-output-file=/storage/.config/edid.bin

You should see something like the following:

Found 1 EDID in "/var/log/Xorg.0.0.log". Wrote EDID for "ONK TX-NR616 (DFP-0)" to "/storage/.config/edid.bin" (256 bytes).

Now edit the Xorg config you created again and replace

Option "ModeDebug" "true"

with Option        "ConnectedMonitor" "DFP-0" Option        "CustomEDID" "DFP-0:/storage/.config/edid.bin" Option        "IgnoreEDID" "false" Option        "UseEDID" "true" It is VITAL you change the DFP number to match the one we found earlier.

In the end your config will look somthing like

Section "Device" Identifier    "nvidia" Driver        "nvidia" Option        "DynamicTwinView" "False" Option        "NoFlip" "false" Option        "NoLogo" "true" Option        "ConnectToAcpid" "0" Option        "FlatPanelProperties" "Scaling = Native" Option        "ModeValidation" "NoVesaModes, NoXServerModes" Option        "HWCursor" "false" Option        "ConnectedMonitor" "DFP-0" Option        "CustomEDID" "DFP-0:/storage/.config/edid.bin" Option        "IgnoreEDID" "false" Option        "UseEDID" "true" EndSection Section "Screen" Identifier    "screen" Device        "nvidia" DefaultDepth   24 Option        "ColorRange" "Full" SubSection    "Display" Depth      24 EndSubSection EndSection Section "Extensions" Option        "Composite" "false" EndSection
 * 1)    Option         "ColorRange" "Limited"
 * 2)    Option         "ColorSpace" "RGB"

Since we have created a new Xorg config file in a location OpenELEC knows to use as default bo 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 Modes      "1280x720" EndSubSection EndSection