Latest News Posts

Social
Latest Forum Posts

Disabling NVIDIA’s HDMI Audio Under Linux

Posted on July 15, 2011 9:30 AM by Rob Williams
Bookmark and Share

For those who don’t use Linux, or do use Linux but aren’t aware, the audio system found within the OS is horrible. Not in quality, features or performance, but rather in configuration and execution. Since I began using Linux in 1999, and moved to it full-time in 2004, the bulk of my most frustrating troubles have had to do with audio, and a recent problem only solidifies that fact further. This time though, it’s not an audio card at fault, but rather the HDMI audio chip built into NVIDIA’s GeForce graphics cards.

Alright, let me back up for a moment. Linux’s audio system doesn’t suck per se – if it works. Pulseaudio is easy to use but has some obvious limitations, and ALSA can be difficult to configure unless your setup is extremely simple. I don’t mean to discredit any of the hard work that the developers of these projects pour into them; I’ve simply had many bad experiences with both solutions over the years.

A couple of months ago, I moved from an AMD Radeon graphics card to an NVIDIA GeForce, and though the video and 3D worked great, I encountered a problem with my audio. Post-driver install, my browser simply wouldn’t output audio on sites like YouTube, while it worked fine everywhere else. Curious, I loaded up ‘alsamixer’ and saw something like this:

NVIDIA's HDMI Under Linux

When alsamixer is launched, the default audio card is displayed, which in this case is ‘HDA NVidia’, or to be more specific, ‘Nvidia GPU 18 HDMI/DP’. When a card is made default by your Linux OS and you don’t want it to be, it can be difficult to remedy the problem. In some cases, you can simply load up the sound preferences in your distro of choice and configure things there, but not all distros have such a benefit, and in some cases where they do, the problem may still not be fixed after you alter things to your liking (I experienced this months ago with KDE 4.x).

If you’ve stumbled on this post, chances are good that you simply don’t want the HDMI audio on the graphics card or aren’t running something like an HTPC. In my experience, the only easy way to fix this problem is to completely remove the kernel module (driver) that’s guilty of shooting up your ride. Which one could that be? HDA Intel. That’s right, an Intel audio driver that impacts NVIDIA’s HDMI.

You can verify this by opening up a terminal and entering superuser mode (su or sudo -s) and typing in ‘lspci -vv’, then scanning for the NVIDIA audio device. The key thing to look for in this blob of text is ‘Kernel driver in use’, which in this case is in fact HDA Intel.

NVIDIA's HDMI Under Linux

Note! If the HDA Intel kernel module is removed, no audio cards that rely on it will function. Many on-motherboard solutions do use HDA Intel, so please run ‘lspci -vv’ as a superuser to scan for all audio devices to make sure that’s not the case. It can be assumed that if you do have an on-board HDA Intel chipset, the driver wouldn’t have defaulted to the NVIDIA card in the first place.

There are two main solutions I’ve found for accomplishing the goal of disabling/removing the NVIDIA HDMI driver, with the first one being the easiest. It’s also the one that didn’t work for me in my distro of choice (Gentoo), but I’m confident it will work for most – especially Debian users.

Method #1 – Blacklisting

As is all-too-common in the Linux realm, no two distros like to do certain things the same way, and where blacklisting modules is concerned, that’s especially the case. What I recommend is heading to Google and typing in ‘blacklisting modules (your distro here)’ to find out the proper process, as you could risk doing more harm than good if done incorrectly.

On Debian OSes (or Ubuntu, Pinguy OS, Elementary, etc), the file you’ll be wanting to edit is ‘/etc/modprobe.d/blacklist.conf’. You will need to enter superuser mode to edit this via ‘vi’ or ‘nano’. I prefer nano since it’s simpler. Your terminal command should look like this:

techgage rwilliams # nano -w /etc/modprobe.d/blacklist.conf

Inside this file, you will see a large collection of examples and modules already being blacklisted. In vi, you can hit ‘i’ to edit and then go to the last line in the file, while in nano you can simply scroll to the bottom. Once there, add this:

blacklist snd_hda_intel
Note: You might need dashes instead of underscores; eg: snd-hda-intel

When done, you can hit ‘Ctrl + X’ and then enter and ‘y’ in nano or ‘:w’ and ‘:q’ in vi to save and quit. After a reboot, the NVIDIA HDMI driver will hopefully have gone the way of the dodo.

Method #2 – Removing the Kernel Module

This method assumes you know how to edit and compile a kernel, as explaining it in depth would require a dedicated article in itself (please let us know if you’d enjoy such an article). If your kernel sources are installed, you should be able to recompile your kernel without much worry. On many systems, you simply need to load up a terminal, enter superuser mode, then go to /usr/src/yourcurrentkernelversion/ and then type in ‘make menuconfig’.

NVIDIA's HDMI Under Linux

The location of the driver is as follows:

Device Drivers
> Sound card support
>> Advanced Linux Sound Architecture
>>> PCI sound devices
>>>> Intel HD Audio

NVIDIA's HDMI Under Linux

You have two options at this point, Uncheck the option entirely, or turn it into an M to bundle it as a loadable module instead. The latter option would allow you to instead load the module at will rather than have to recompile your kernel if you want it back. In my PC, I have a dedicated audio card I use for both my speakers and headphones, so I removed it entirely.

It should be noted that ‘Intel HD Audio’ in itself is a tree, and inside is an HDMI/DP option. Simply disabling this instead of the entire HD Intel driver may work for you, but it didn’t for me. Even if I had everything unchecked inside of this tree, my OS would still default to the NVIDIA HDMI.

Once you’re finished, compile and copy the kernel to your /boot folder (you may wish to not overwrite your currently-used one for safety reasons).

NVIDIA's HDMI Under Linux

After a reboot, your audio card should default to the one you want, with the NVIDIA HDMI nowhere in sight. Go ahead, breathe that sigh of relief.

Wrapping Up

This might be one of the worst news posts I’ve ever written. Though it was well-researched and I have the experience to back things up, there have been few issues to give me headaches quite like these, so I’m sure there must be easier ways to accomplish this task other than the two methods I just provided.

The best possible fix for this problem would be for NVIDIA to allow the disabling of HDMI audio (this wouldn’t affect the video) inside of its control center. Normally such a thing wouldn’t be needed, and it wouldn’t be in Windows, but because the Linux audio system can be sketchy at best, having the option to simply click a button to disable it would be hugely welcomed.

Unless no one ever speaks up about what’s been written here, I can’t consider this news post ‘finished’. I fought with myself when deciding whether or not to write it, but in the end, since it’s such a frustrating problem, I decided to. I’d love input, and I am sure if others are Googling for a solution to the same problem, they’ll appreciate some clear-cut options.

If you have had success or a lack of it with either of these solutions, or have solutions of your own, please don’t hesitate to post in our related thread!

Source: Techgage

  • Scott Freeland

    Thanks! Exactly what I needed to know how to diagnose and solve.

  • rjrich

    Thanks!!! The unwanted HDMI audio driver was driving me crazy. Your post solved the problem. I used the blacklist option, and it worked beautifully. I never would have thought to look for “snd-hda-intel”. Now my audio in KDE is back under control. Thanks again.

    • http://www.facebook.com/deathspawner Rob Williams

      I’m glad it helped! I ironically had to refer back to it myself last month :D

  • Stevie Dillo

    Thanks for the posting!
    I’ve been tinkering and searching for a method to add an HT-Omega Claro+ to my SolusOS distro for a year and finally found your post. I disabled the HDA in BIOS and thankfully am able to output HDMI audio from the nVidia card to my AV receiver with Linux-Mint. I can swear I had an audio control option in the nVidia panel once upon a time but no more. I’ll use your method #2 instructions to try modifying my kernel so I can use my audio card.

    PS Your suggestion to post a compile a new kernel method is intriguing. If you haven’t done so already as your post dates back to 2011.

    Thanks again for your work.

    • http://www.facebook.com/deathspawner Rob Williams

      Thanks for the nice comments, and I’m glad the fix helped! I’ve been pondering that kernel compile article for a little while, and I’d still like to do it. A fair bit of research is involved to make sure what I write is relevant for everyone. I only have strong experience with one single distro, so I’ll need to branch out a bit before I tackle such an article ;-)

  • John B

    WOW!!! I have been going NUTSO RINGO! I have been to many message forums including linux mints, which as of now offerred no help whatsoever. Blacklisting worked for me…not at first it didn’t. The command ‘blacklist snd-hda-intel’ didn’t work. I did not want to mess with the kernal any more than I already did to get the newest nvidia “Video card driver” installed. So I went into my control panel and looked up “system information” You can learn a lot from this panel so I went to ‘kernal modules’ and looked up the name of the driver, “the exact typing of it”…it was ‘snd_hda_intel_hdmi’, notice the underscores in the name and not dashes, plus the extra word ‘hdmi’ so I said what the heck blacklisting is easy enough to change if it don’t work. So I blacklisted this name and bingo upon restart, I had built in audio back again! No more Nvidia HDMI hair pulling conflicting, every expletive you can think of…it is gone and my sound is working upon reboot! Your wording may differ slightly from mine so don’t be so fast to give up on blacklisting, it is a lot safer than rebuilding a kernal. I hope this may help someone else I wouldn’t want my worst enemy to go through the amount of reinstalls, and drive wipes, and every time I checked “built in audio” it would reset itself on a reboot like a damn plague that just took over the place. :D

    So Thank You so much for my Easter Egg! Happy Easter!

    • http://www.facebook.com/deathspawner Rob Williams

      Glad you got things working! I have a feeling that HDMI module is new… I haven’t seen it before. As for the dashes instead of underscores, I think that’s more of a distro configuration thing, or, the kernel changed things since this article was published (I haven’t had to use this fix for quite a while).

  • DrLex

    Guess what: I have an ATI-based board with a built-in Realtek ALC892 sound card that needs snd-hda-intel to work. But the first sound card is always set to the built-in HDMI. I can fix this through asound.conf, no problem. But there is another typical Linux sound problem.

    Typical for these Realtek things is that some voodoo parameters need to be passed to the kernel module to fix clicking sounds while recording. Adding something like “options snd-hda-intel position_fix=2″ to modprobe.d/alsa-base.conf should work. But it does nothing, because it seems that all options are applied to the first snd-hda-intel based card, which is of course the useless HDMI.

    I have been fighting for hours to either get that HDMI thing obliterated, or to force the ALC892 to get ID 0 instead of 1. It seems hopeless. The intro to your article is perfectly accurate: configuring sound in Linux is a nightmare.

    • http://www.facebook.com/deathspawner Rob Williams

      That’s beyond frustrating. I’m at a loss at the moment as to how to bypass this, unless there’s ANOTHER switch that specifically disables the HDMI portion of the driver. It’s easy to suggest just going the add-in route as well to ignore the GPU entirely, but so many audio cards simply use the snd-hda-intel driver. My main audio card is an ASUS Xonar, so I’m fortunate enough to be able to avoid that hassle.

      If I think of anything I’ll post here again.

    • http://www.facebook.com/deathspawner Rob Williams

      Alright, so I’m not sure when this change happened, but in recent kernels, the Intel HDA driver has gone module, as this screenshot shows. Here, you could disable the HDMI/DisplayPort portion while leaving everything else intact (like the Realtek). If you’re able to upgrade your kernel to a recent version and recompile, that should solve your problem.

      • DrLex

        That looks promising, I’ll look into it when I get back to work. Thanks! But first, a relaxing weekend without fighting snd-hda-intel.

        • http://www.facebook.com/deathspawner Rob Williams

          Enjoy your weekend. If you need some help next week just hit-me-up.

      • DrLex

        Nice try, but no cigar. The snd_hda_codec_hdmi module is gone alright, but the device is still there, only without controls.
        I found out that it is possible to disable specific cards by supplying the probe_mask parameter to modprobe, but there is no way to disable the HDMI device without disabling the Realtek, it seems they are fused together. There should be a way to prevent the GPU from presenting its HDMI audio device at all. Theoretically, using the kernel parameter radeon.audio=0 should work, but it does not.
        In the meantime I have verified that we did not have the distorted audio with an older kernel in Debian Squeeze. We may revert to that one, or simply plug in an USB sound card.

        • DrLex

          All right, I fixed it. The trick is that when giving module parameters to snd-hda-intel, it is possible to give comma-separated lists to pass the arguments to the different cards. Otherwise, when giving only a single argument, it will always be applied to the first card. Passing an argument to the second card only can be done by starting the argument with a comma.
          Because I cannot be sure that the HDMI card will always be at position 0, I simply spam the magical fix parameter to both cards like this in /etc/modprobe.d/alsa-base.conf:

          options snd-hda-intel position_fix=3,3

          At first I thought it was possible to select a certain card (the one I needed is “SB”) by using e.g. “snd-hda-intel id=SB position_fix=3”, but what this will do is renaming the first card to “SB”, which is of course enormously confusing.

          • http://www.facebook.com/deathspawner Rob Williams

            I am glad you got things working! Thanks a ton for the information. Sorry for your hassles… I know how it is.

  • slacker

    Thanks much! The blacklist method worked flawlessly for me with newly installed Slackware 14.

    • http://www.facebook.com/deathspawner Rob Williams

      If it can work for a slacker, it can work for anyone! Glad it worked ;-)

  • bladerunner6978

    “…the HDMI audio chip built into NVIDIA’s GeForce…”,

    AND ATI’s Radeon HD* cards are ABSOLUTE shite !!! HDMI audio in Linux is garbage, and we all know it.

    Instead, I ALWAYS disable these utterly uselss non-standard hdmi-crap.
    And i’m talking 2013 here ?! -can you imagine, and even after ALL these
    years Linux still can’t get this “audio” thing together. (or even
    Printer’s -:LoL).
    Pick your MB maker, I don’t care if it’s asus,
    gigabyte,… they ALL stick crappy audio-chips onto their MB’s -because,
    they don’t care -as long as it works in Windoze, that’s all that
    matters to these guys -even to this day.

    …comon’ we ALL (Linux-User’s) know full well about that sad truth.

    Anyway, it doesn’t matter whether it’s ALSA (which I find much better,
    and more configuravble), Or Pulseaudio. -It all has to do with this crap
    passed-off HDMI audio chip junk.

    You’re best and permanent
    headache-free option in Linux, is (junk that HDMI cable first), then
    simply use a good quality DVI-D (dual-link) cable, and yes, there’s a
    reason why “EVERY” (good-quality) Video card STILL uses DVI-D (dual-link
    capablilty). -just ask any “Professional” Videographer,…

    2nd
    thing is, do NOT use any of these On-Board Motherboard audio chips
    either – they are just cheap quality crap, “disable” them in uefi/bios.

    Instead
    , invest in your favourite “AUDIO-Card”- PCI, and/or PCI-Express, or
    even a good external USB Audio peripheral, will make a world of
    difference.

    And I do mean the older the better, (avoid
    plug-n-pray crap), why?, because, I’m telling you, second to the crap
    hdmi-audio-chips, the on-board Motherboard audio chips are just as bad,
    if not worse, and the Intel HDA seems to be a purposeful mess within
    Linux ?!

    Ok, so sure, you’ll need an extra audio patch
    cable,…, but that’s it. -anything is better than beating yourself up
    fighting over this HDMI Audio/Video mess, in Linux.

    In the end,
    with a separate Sound Card, DVI-D (instead of HDMI-cable), and separate
    Audio cable, you will be rewarded with a much better Audio/Video
    experience, and performance, in Linux, most especially, if you’re making
    an HTPC build.

    There will be NO solution regarding this hdmi
    audio mess in Linux, until some very-much-needed changes start happening
    between these (Upstream) PC-Motherboard Hardware manufacturers’, AND
    the Upstream Linux Development Communities.

    In other words,
    complain to Asus, complain to MSI, complain to Gigabyte, complain
    to….. It is, afterall, THEM, that have to start building more
    Linux-friendly hardware devices for us all. !

    :)

    • http://techgage.com/ Rob Williams

      “HDMI audio in Linux is garbage, and we all know it.”

      I have heard that. To be honest, I’ve never had to deal with it… except to disable it.

      I agree almost entirely with everything you wrote here, but this article isn’t about USING HDMI, it’s about disabling it at the kernel level because it tends to take precedance over the audio solution you WANT to use. This isn’t so much an issue with a distro that manages things for you very well, but if you use a more hands-on distro or happen to run into an issue, this guide is relevant.

      That said, this guide is out-of-date a little bit at this point since the kernel changed some of its options around.

  • rwmcfa1

    not sure whether it matters or not, but the kernel driver was showing as “snd_hda_intel” for me rather than snd-hda-intel and all of the other modules in blacklist.conf used _ over – as well. after adding that it worked flawlessly. thanks!

    • http://techgage.com/ Rob Williams

      It’s been a little while, so I’m not sure what caused my modules to be – instead of _. Either way, both my Gentoo and Linux Mint installs use _, so I am going to assume that’s the standard. Will edit the article to reflect that, thanks!

  • shayneo

    FFFFFFFFFFF If I disable the hda_intel one, it’ll also disable the intel sound hardware on the motherboard that I *WANT* to use.

    GODDAMN IT.

    • http://techgage.com/ Rob Williams

      This article is out-of-date, because current kernels have a submenu underneath the hda-intel choice. Inside that you’d have to disable the HDMI option, and then recompile. Then you should have your onboard audio available but no HDMI, because support wouldn’t be compiled.

  • http://cowsthatgomoo.blogspot.com osirisgothra

    verified as snd_hda_intel (geforce GT family), if its not being used you can (usually outside of X after shutting down or after executing a ‘stop lightdm’ or ‘stop kdm’ or whatever dm you got), just ‘sudo modprobe -r snd_hda_intel’, and blacklist the thing too, then you wont have to restart the machine, which is not good if you are on a network server or something, or have (what i call) skipping-rocks-wired network. Usually we run linux because we depend on never having to reboot unless both the power is out AND the UPS has run out of steam, in which case i doubt the local internet connection would be up anyway, unless you have a generator, run satelite, etc… heh

    • http://techgage.com/ Rob Williams

      The problem with disabling all of snd_hda_intel is that a lot of onboard audio solutions actually use this, so while it’d get rid of the HDMI problem, it’d remove a lot of people’s primary source of audio.

      It’s really too bad this is so complicated. It really shouldn’t be.

Recent Tech News
Recent Site Content