Mythbuntu + Nvidia, HDMI and HD video + audio

After fighting with Cent7 for quite a while and having several issues, I decided to try Mythbuntu. It has a much newer version of Myth packaged with it, and has appeared to be simpler in nearly every way.

However, although the process is supposed to be simpler, there were still many tricks that needed completed for it to work properly. So as I went through the process, I updated my documentation from Cent 7 to reflect what needs done in the different distribution.

The card

I purchased an Nvidia off-brand ASUS GeForce GT 430 Video Card (without fan) for around $70 new because I wanted it to be quiet.  However, there are many alternatives like the cheaper ASUS GeForce GT 430 low profile with fan or the ASUS GeForce GT 440 with fan, but the important thing is that you get one that is compatible with the VDPAU library – this library is what provides the best hardware acceleration for HD video playback.  MythTV maintains a good list of chipsets that VDPAU supports.

In addition, I wanted my Myth box to be out of sight for both visual appeal and to prevent machine noise around my entertainment center.  So, I purchased a long HDMI cable for this purpose.  CAUTION – I actually struggled with this.  At first I bought what looked like a really nice cable – name brand, CL3 rating and 3D supported.  I found out later that the gauge of the wires used in this cable are terribly small, which caused huge problems with reflection (the best way I can describe reflection is comparing the problem to the old analog term “ghosting”).

Thanks to Amazon’s fantastic return policy, they took the old cable back and I then purchased a Tartan 40 foot HDMI cable instead.  This one had larger 24 AWG wires in it and a lot more insulation – it is noticeably thicker.  This cable, although the same length and run the same way, presents a crystal clear picture.

Getting audio to work through HDMI

Out of the box, the video worked perfectly with Mythbuntu. But out of the box the audio did not, so some changes were necessary to get audio over HDMI and the configuration of Alsa.

We need to discover some information about your device:

$] sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
	Subdevices: 1/1
	Subdevice #0: subdevice #0

From the above, you will notice that my Nvidia card is card 0.  The other important thing to note is that the input I’m connected to (HDMI) is device #3.

You can also gather this information / confirm this by:

$] cat /proc/asound/card0/eld#3.0
monitor_present         1
eld_valid               1
monitor_name            SAMSUNG

connection_type         HDMI
eld_version             [0x2] CEA-861D or below
edid_version            [0x3] CEA-861-B, C or D
manufacture_id          0x2d4c
product_id              0x3c7
port_id                 0x20000
support_hdcp            0
support_ai              0
audio_sync_delay        0
speakers                [0x1] FL/FR
sad_count               1
sad0_coding_type        [0x1] LPCM
sad0_channels           2
sad0_rates              [0xe0] 32000 44100 48000
sad0_bits               [0xe0000] 16 20 24

Change the card0 to match which card number your Nvidia device is, and eld#3.0 should match the device number (3).  Worst case, you can iterate through the different options until you find the one that shows your TV.

Now, with the information that we’ve gathered above, lets modify some configs.

asound.conf

The alsa configuration file (located in /etc/asound.conf or /etc/alsa/asound.conf) needs to be modified to reflect the information we’ve gathered.

  1. First, remove any other garbage in there
  2. Now add the following lines, using the card# and device# that you found earlier:
pcm.!default {
	type hw
	card 0
	device 3
}

ctl.!default {
	type hw
	card 0
	device 3
}

alsa-base.conf

Next is the alsa-base.conf found in /etc/modprobe.d/ folder.  Again with the information that you found above about your device# that is connected to your monitor, use one of these (where X in eld#X.0 corresponds to your device number):

  • eld#0.0 -> 0x101
  • eld#1.0 -> 0x102
  • eld#2.0 -> 0x104
  • eld#3.0 -> 0x108
  1. Comment out any other configuration in this file, especially a line performing:  install snd-pcm ….
  2. Add the following line, updating the probe_mask to match the hex number in the list above:
options snd-hda-intel enable_msi=0 probe_mask=0x108

Group permissions

By editing /etc/group, make sure both the “audio” and “video” groups contain your user and/or the user that will be logged into the system when doing audio/video playback.

Reboot

Now that everything has been updated, you should be able to perform one last final reboot.

Fixing audio issues

If audio still isn’t working, your card may be muted. This is easily fixed using pavucontrol:

sudo apt-get install pavucontrol

Then run it, making sure things aren’t muted. Check both the configuration tab and the output tab.

Fix some annoyances

There are a few really annoying parts of the new Gnome, especially when using it as a media center:

Auto-login to media center user

Gnome settings (System tools -> Settings) > Users > Unlock > Automatic Login > On

Disable screen lock

Gnome settings > Privacy > Screen Lock > Off

Disable screen shield

Clone the extension repo into the correct location:

git clone https://github.com/lgpasquale/gnome-shell-extension-disable-screenshield.git ~/.local/share/gnome-shell/extensions/disable-screenshield@lgpasquale.com

Reload GnomeShell:

Press ALT + F2 then enter r and press Enter.

Activate the extension:
Applications > Utilities > Tweak Tool > Extensions > On

Conclusion

You should now have HD video and audio.  One thing to remember – your TV will always report that it only supports 2 channels.  So if you want to support more than 2 channel audio, you’ll want to run your HDMI to your receiver first, then on to your TV.  This, however, may have an effect on the information returned about video resolution, I’ve not tested this connection method.