Black God

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

 

10 comments for “How to fix NVidia HDMI Audio in Ubuntu 12.04

  1. Paul
    August 27, 2013 at 6:09 pm

    Finally … can’t beleive I had to search for HOURS to find a fix for this … actually, I can’t beleive there is a need for a fix! Sound through HDMI should work without jumping through those hoops!

    Fixed my Mini ITX onboard GF 9300! YAY!

  2. Dean
    May 9, 2013 at 8:55 pm

    Thanks! worked for me

  3. Sushil Kumar
    November 8, 2012 at 7:29 pm

    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.

  4. dante
    August 31, 2012 at 12:24 am

    Thanks! It worked.

  5. Doesntmatter
    July 26, 2012 at 7:09 pm

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

  6. June 18, 2012 at 8:46 am

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

    Can yout tell me the correct command?

    • June 18, 2012 at 8:50 am

      Forget what i say… i have take in alsactl the l for an i :(

  7. June 18, 2012 at 8:28 am

    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 ;)

  8. June 5, 2012 at 11:28 am

    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 

  9. May 1, 2012 at 12:59 pm

    great tips that your share us very informative

Leave a Reply

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