Linux, EDID, and the Nvidia->HDMI->Samsung HDTV

I have a video server that's connected to a Samsung 40inch 1080p HDTV. Not that long ago, I decided to upgrade the crappy video card (old old geforce) to a newer one that provided DVI/HDMI output so that I could connect it to the TV through HDMI instead of the analog VGA cable. The card is an Nvidia GeForce 9500 GT, nothing special, but it has a SPDIF cable to connect to the digital sound output on the motherboard so that it can send sound through DVI/HDMI. However, I don't have a digital sound out on my sound card, so I figured it would be fine to just leave it be. WRONG. I connect the HDMI cable to the TV, I let X use the EDID from the TV to set the 1920x1080 mode, I connect the RCA sound out from the sound card to the RCA sound in of the TV, but no sound. I ended up having to connect the sound directly to my stereo and have to switch stereo inputs whenever I want to watch something from the video server. Really annoying since I was used to not having to switch back when it was just analog VGA.

I did a little bit of reading and found that other people had the same problem, with no fixes in sight. Recently, I checked again for fixes but there was only a fix available was for Windows 7. It ended up that the EDID that the TV was providing the nvidia card was telling it that it supported sound through DVI/HDMI, and the nvidia card was then attempting to send sound through the connection (eventhough it had no sound input). When the TV got the HDMI signal, it sees that sound is turned on through there so it ignores the RCA sound input, thus, no sound. There wasn't a way in the nvidia driver to turn off sound, but the nvidia devs said there would be something like that in the future (apparently, ATI cards have that option). In one of these forums, I found a neat little fix for this: Provide your own EDID (via xorg.conf's CustomEDID option) except with the extensions removed. This would give X all that it would need to display the correct video, but would tell the nvidia card that sound through DVI/HDMI was not supported.

First, these are the specs of the machine when I did this:

  • 3Ghz Intel P4
  • Samsung LN40A550 40inch HDTV
  • GeForce 9500 GT 512MB graphics card.
  • Gentoo Linux 2.6.19-gentoo-r5
  • Xorg version 1.5.3 (recent upgrade from 1.3)
  • nvidia drivers 180.29 with acpi and gtk compiled in
First, I needed to extract the EDID from the TV. A lot of places told me I can just reconstruct it from the Xorg logs but I didn't see anything in them even with the loglevel set to 6. Next, I tried using the read-edid utility, but X complained that the EDID I got from that had bad headers. Finally, I got the nvidia-settings to give me the EDID:

# nvidia-settings --desiplay :0

This opened up the Nvidia X Server settings control panel (in gentoo, this is separate from the nvidia-drivers package), went to GPU0, then to DFP-0,then clicked on Acquire EDID. Once I saved that to a file, I could get to opening it up emacs and zeroing out the extensions. But then I had to have a right checksum. Luckily, the guys at AnalogBit had a utility that does this for you. I just ran it and I was ready to go. A few things needed to be added into my xorg.conf file now:

Option "CustomEDID" "DFP-0:/etc/X11/samsung_edid_noext.bin"

That's it. Surprisingly easy to do and now I get the same stunning 1920x1080 video from my video server with sound.