How to fix NVidia HDMI Audio in Ubuntu 12.04

I get HDMI video working fine with my Sony 32″ LCD TV as external screen. But audio has been a problem for long time. Here is a simple technique to enable audio through HDMI so that you can enjoy the high quality sound through TV or Home Theatre System.

Motherboard: M3N78-EM based on NVIDIA GeForce 8300 Chipset

Operating System: Ubuntu 12.04 Precise Pangolin

Here is my VGA controller information:

$ lspci | grep VGA

02:00.0 VGA compatible controller: NVIDIA Corporation C77 [GeForce 8300] (rev a2)

1. First we need to ensure that NVIDIA proprietary driver is installed. Ubuntu installed the NVIDIA driver by default while installing (I had opted for third party software installation option during installation). System Settings -> Additional Drivers  should show the dialog as shown below. In shell, you can see “nvidia” for the command “lsmod | grep nvidia”.

2. Configure the screen connected to HDMI Port. In case of NVIDIA, Ubuntu provided System Settings -> Displays tool does not detect the external Display. But NVIDIA provides a powerful GUI based settings tool, which makes the job easier. This tool can be accessed through dash by typing “NVIDIA” -> “NVIDIA X Server Settings” -> “X Server Display Configuration”. Don’t forget to click “Save to X Configuration File” to save your changes before quitting.

3. Select the HDMI Audio as output device in Volume Indicator (on top bar) -> Sound Settings… -> Output -> HDMI / Display Port.

The above steps should get the job done. If not you can check status of S/PDIF settings. It should not be muted. You can check with “alsamixer” command. The following screenshot shows S/PDIF muted.

Select the muted S/PDIF bar and press M to unmute it. It should be as shown in the below screen.

It should fix the issue. You should be enjoying the audio over HDMI now. Now you can make it permanent by issuing “sudo alsactl store” command which will save the above settings.

In case you did not get succeed, you may try the following tweak.

Create a file called /etc/asound.conf (if there is a file already, just backup that file) with following content and reboot the machine.

pcm.!default hdmi:NVidia
pcm:iec958 hdmi:NVidia

 

12 comments

Leave a Reply

Your email address will not be published. Required fields are marked *