If you boot your nVidia GPU based OpenELEC box before the TV/AVR and you see a black screen on boot - follow this guide to create an edid.bin file that tricks Xorg into thinking the TV/AVR are powered on at boot time. This example will NOT work on Intel or AMD GPU's.

Before you proceed make sure you understand why you would need to do this.

First ensure your HTPC is powered on and you can see the Kodi home screen.

Now open an SSH session to your OpenELEC machine. Once logged into the console we need to work out the DFP number. Type:

grep ": connected" /var/log/Xorg.0.log | head -n 1

You should see message like the following:

[3241512.110] (--) NVIDIA(0): SAMSUNG (DFP-0): connected

Note the DFP number - in this example it is DFP-0 but yours may be different.

To extract EDID data we need we need to place Xorg into debug mode. First we stop Xorg:

systemctl stop xorg.service

Next we clone the xorg.conf to the config override location in /storage/.config:

cp /etc/X11/xorg-nvidia.conf /storage/.config/xorg.conf

Then we edit the file with sed to enable debug mode:

sed -i 's/"ModeDebug" "false"/"ModeDebug" "true"/g' /storage/.config/xorg.conf

The device section in the modified file should look something like this:

 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 restart Xorg:

systemctl start xorg.service

Extract the RAW binary EDID information from the debug /var/log/Xog.0.log to a file:

nvidia-xconfig --extract-edids-from-file=/var/log/Xorg.0.log --extract-edids-output-file=/storage/.config/edid.bin

The command should output something like:

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

Now we edit /storage/.config/xorg.conf - set ModeDebug back to false (edit the word true to false) and uncomment the following lines:

 Option         "ConnectedMonitor" "DFP-0"
 Option         "CustomEDID" "DFP-0:/storage/.config/edid.bin"
 Option         "IgnoreEDID" "false"
 Option         "UseEDID" "true"

Make sure 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         "ModeDebug" "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"
 #    Option         "ColorRange" "Limited"
 #    Option         "ColorSpace" "RGB"
  SubSection     "Display"
   Depth       24
  EndSubSection
 EndSection
 Section "Extensions"
  Option         "Composite" "false"
 EndSection

Finally we stop/restart xorg.service to disable debug mode and use the new edid.bin file:

systemctl restart xorg.service

If all has gone to plan Xorg now detects the EDID file and the order of powering on equipment no longer matters!