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

 


This entry was posted in HOW-TOs and tagged , , , , , , , , , , . Bookmark the permalink.

9 Responses to How to fix NVidia HDMI Audio in Ubuntu 12.04

  1. Dean says:

    Thanks! worked for me

  2. Sushil Kumar says:

    Hi, I am having Dell E6420 laptop and Ubuntu 12.04 is installed. I tried above setting. Now Video is comming on my LED TV. But still sound is not comming.

    After doing sound settings also, in Sound Output HDMI port is not comming. Please help.

  3. dante says:

    Thanks! It worked.

  4. Doesntmatter says:

    Thank you, man. You helped me alot !!!

  5. Prgs says:

    If hi type “sudo alsacti store” it says that command don’t exist ???

    Can yout tell me the correct command?

  6. Prgs says:

    Many thanks for this tip ;) … after 6 hours try to get sound on, in hdmi, and break nvidia settings, i finally have sound in HDMI ;)

  7. Karl Garcia says:

    I am also experiencing same problem.
    I don’t know but still this one doesn’t work for me. Or is it the speakers that I am having a problem already?
    Thanks, I will have to try this again.

    My blog : comment perdre des hanches 

  8. Umair says:

    great tips that your share us very informative

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>