How To Install The Realtek HD Audio Driver In Linux

Realtek is one of the leading audio component manufacturers today, and many motherboards come with a built-in Realtek sound card. While the VCR processes sound through the video card (for HDMI output), some applications may require the 3.5mm audio jacks. If your project requires using audio out and the motherboard manufacturer does not provide Linux drivers, follow these instructions.

Navigate to http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false

Check the box to agree to the terms listed and click “Next”. We know that our motherboard manufacturer did not provide a driver, so this is quite all right.

Scroll down to the bottom of the page where the Unix (Linux) drivers are listed. Choose the latest version, and click the download mirror closest to you.

Once the tarball is downloaded, locate it in your file explorer and extract it (or do it through the terminal). Open a terminal window and navigate to the new folder containing the extracted files.

From the terminal, execute the following to extract the driver source code (where “xx” is the version number in the filename) :

tar xfvj alsa-driver-xx.tar.bz2

Now you must compile the source code:

cd alsa-driver-xx
./configure --with-cards=hda-intel
make
make install

Once the source code is compiled and installed, reboot the machine. From the terminal, execute alsamixer and unmute the main channel. Screen Shot 2015-04-07 at 10.01.29 PM

22 thoughts on “How To Install The Realtek HD Audio Driver In Linux”

  1. My Linux Zorin OS9 has the driver already installed. However the motherboard has a special jack that has to be activated. In Windoze it is done by the realtek driver software. It senses that you plugged in the speakers to the rear panel jack and uses it. No problem. But in Linux while you can bring up alsamixer it has no option in it to turn on the rear panel jack and/or to detect it. I still get sound from the internal speaker, or I can plug into the front panel headphone and it plays fine from that in either OS. But I want to use the rear panel jack instead. Line Out. Just wonr. I dont know if there is a jumper on the motherboard to eliminate the internal speaker to force it over to the rear panel, if there is that would resolve it. However I would rather not waste time to figure that one out. Or maybe that would end up being an easier way. Any thoughts?

    1. I have to admit, I don’t know much about Zorin OS (designed for world domination by Christopher Walken, perhaps?). Have you tried using the driver directly from Realtek instead of the pre-installed one? All else failing, before you get too involved trying to solve the problem using software, I would suggest checking the documentation on the motherboard. There may indeed be a jumper that you have to move.

      On a side note, I tend to not use “pre-built” versions of Linux for this very reason. I’ve learned through trial and [a lot of] error that you’re almost always better off starting from the ground up. Even with later versions of Ubuntu, I’ve found that it’s easier to start with the basic, stripped-down installation and add support as necessary to avoid conflicts. Good luck!

  2. From what I see all over the internet, this is the way to install this driver, however I am not able to do that.
    When I “make” I receive following errors/warnings:
    cc1: some warnings being treated as errors
    make[3]: *** [/home/dawid/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/pcm_native.o] Error 1
    make[2]: *** [/home/dawid/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore] Error 2
    make[1]: *** [_module_/home/dawid/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.19.0-32-generic’
    make: *** [compile] Error 2

    Then when I “make install”
    cc1: some warnings being treated as errors
    make[3]: *** [/home/dawid/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/pcm_native.o] Error 1
    make[2]: *** [/home/dawid/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore] Error 2
    make[1]: *** [_module_/home/dawid/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.19.0-32-generic’
    make: *** [compile] Error 2

    I use Linux Mint 17.3

      1. It seems to me that the installer was made for older kernel, Mint might have different path names or just misses some dependencies, I was not able to find out at last. I went through whole internet (including your link which brings up same problem) and found nothing so I decided to just leave it. I have sound, its just slight background white noise that annoys me and tells me the driver must not be perfect. About Mint – its good system, based on Ubuntu so not much difference, many packages that were built for ubuntu work under Mint and most of all – it has Cinnamon desktop, I cant stand Unity.

  3. Hi,
    only for try i installed the realtek driver.
    During installation a errors ocurr.
    now mi sound is 0

    Please, How can i revert this installation?

    thanks

  4. Thanks a lot.Thats info is very usefull.
    But or sad, that i’d maked was install another kernel, and the sound were reconfigured.
    Thanks for the info

  5. When I use ‘make’ at the end I get the following error:

    /home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.c: In function ‘snd_info_version_read’:
    /home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.c:1065:22: error: macro “__DATE__” might prevent reproducible builds [-Werror=date-time]
    “Compiled on ” __DATE__ ” for kernel %s”
    ^
    cc1: some warnings being treated as errors
    scripts/Makefile.build:258: fallo en las instrucciones para el objetivo ‘/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.o’
    make[3]: *** [/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.o] Error 1
    scripts/Makefile.build:403: fallo en las instrucciones para el objetivo ‘/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore’
    make[2]: *** [/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore] Error 2
    Makefile:1402: fallo en las instrucciones para el objetivo ‘_module_/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa’
    make[1]: *** [_module_/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa] Error 2
    make[1]: se sale del directorio ‘/usr/src/linux-headers-4.4.0-24-generic’
    Makefile:167: fallo en las instrucciones para el objetivo ‘compile’
    make: *** [compile] Error 2

    And when I use ‘make install’ the following error:

    if [ -L /usr/include/sound ]; then \
    rm -f /usr/include/sound; \
    ln -sf /home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/include/sound /usr/include/sound; \
    else \
    rm -rf /usr/include/sound; \
    install -d -m 755 -g root -o root /usr/include/sound; \
    for f in include/sound/*.h; do \
    install -m 644 -g root -o root $f /usr/include/sound; \
    done \
    fi
    find /lib/modules/4.4.0-24-generic/kernel/sound -name ‘snd*.*o’ | xargs rm -f
    find /lib/modules/4.4.0-24-generic/kernel/sound -name ‘snd*.*o.gz’ | xargs rm -f
    find /lib/modules/4.4.0-24-generic/kernel/sound -name ‘ac97_bus.*o’ | xargs rm -f
    find /lib/modules/4.4.0-24-generic/kernel/sound -name ‘ac97_bus.*o.gz’ | xargs rm -f
    make[1]: se entra en el directorio ‘/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/include’
    make[1]: No se hace nada para ‘modules_install’.
    make[1]: se sale del directorio ‘/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/include’
    make[1]: se entra en el directorio ‘/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore’
    mkdir -p /lib/modules/4.4.0-24-generic/kernel/sound/acore
    cp snd-hwdep.ko snd-page-alloc.ko snd-pcm.ko snd-timer.ko snd.ko /lib/modules/4.4.0-24-generic/kernel/sound/acore
    cp: no se puede efectuar `stat’ sobre ‘snd-hwdep.ko’: No existe el archivo o el directorio
    cp: no se puede efectuar `stat’ sobre ‘snd-page-alloc.ko’: No existe el archivo o el directorio
    cp: no se puede efectuar `stat’ sobre ‘snd-pcm.ko’: No existe el archivo o el directorio
    cp: no se puede efectuar `stat’ sobre ‘snd-timer.ko’: No existe el archivo o el directorio
    cp: no se puede efectuar `stat’ sobre ‘snd.ko’: No existe el archivo o el directorio
    /home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/Rules.make:48: fallo en las instrucciones para el objetivo ‘modules_install’
    make[1]: *** [modules_install] Error 1
    make[1]: se sale del directorio ‘/home/paul/Descargas/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore’
    Makefile:206: fallo en las instrucciones para el objetivo ‘install-modules’
    make: *** [install-modules] Error 1

    1. I can’t be completely certain because I’m not fluent in Spanish Bash, but when I have “make” errors, there is usually some dependency that’s missing.

      Check the documentation on the Realtek fora; that will probably help. Also, just to verify: what distro are you using?

  6. tar xfvj alsa-driver-0001-LinuxPkg_5.18rc8.tar.bz2 ??? or tar xfvj 0001-LinuxPkg_5.18rc8.tar.bz2 ??? which one?

    1. What is the name of the file you downloaded? It should be alsa-driver-0001-LinuxPkg_5.18rc8.tar.bz2 unless you renamed it at some point.

  7. I tried this since the sounds on my XPS 9550 sounded tiny in Ubuntu, but now I am not getting any sound at all from my speakers. I tried make uninstall and still cannot get sound. I am new to Linux, can you help in any way?

    1. You should check the Dell forums. They do a lot of work “above and beyond” for the Linux market, and should know exactly what kind of eccentricities their hardware is going to exhibit with Ubuntu drivers. For now, invoke sudo alsamixer and verify that all the channel volume “sliders” are up. It’s also possible that your sound card is not compatible with the driver. Sorry I can’t be much more help, but that’s definitely where I’d start!

  8. Hi!, I had the same errors of michthunder

    make

    make -C /lib/modules/4.8.0-49-generic/build SUBDIRS=/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa CPP=”gcc -E” CC=”gcc” modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.8.0-49-generic’
    CC [M] /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/wrappers.o
    CC [M] /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/misc_driver.o
    CC [M] /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/sound.o
    CC [M] /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/init.o
    CC [M] /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/memory.o
    CC [M] /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.o
    /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.c: In function ‘snd_info_version_read’:
    /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.c:1065:22: error: macro “__DATE__” might prevent reproducible builds [-Werror=date-time]
    “Compiled on ” __DATE__ ” for kernel %s”
    ^~~~~~~~
    cc1: some warnings being treated as errors
    scripts/Makefile.build:289: recipe for target ‘/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.o’ failed
    make[3]: *** [/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.o] Error 1
    scripts/Makefile.build:440: recipe for target ‘/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore’ failed
    make[2]: *** [/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore] Error 2
    Makefile:1491: recipe for target ‘_module_/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa’ failed
    make[1]: *** [_module_/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.8.0-49-generic’
    Makefile:167: recipe for target ‘compile’ failed
    make: *** [compile] Error 2

    and after
    sudo make install
    if [ -L /usr/include/sound ]; then \
    rm -f /usr/include/sound; \
    ln -sf /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/include/sound /usr/include/sound; \
    else \
    rm -rf /usr/include/sound; \
    install -d -m 755 -g root -o root /usr/include/sound; \
    for f in include/sound/*.h; do \
    install -m 644 -g root -o root $f /usr/include/sound; \
    done \
    fi
    find /lib/modules/4.8.0-49-generic/kernel/sound -name ‘snd*.*o’ | xargs rm -f
    find /lib/modules/4.8.0-49-generic/kernel/sound -name ‘snd*.*o.gz’ | xargs rm -f
    find /lib/modules/4.8.0-49-generic/kernel/sound -name ‘ac97_bus.*o’ | xargs rm -f
    find /lib/modules/4.8.0-49-generic/kernel/sound -name ‘ac97_bus.*o.gz’ | xargs rm -f
    make[1]: Entering directory ‘/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/include’
    make[1]: Nothing to be done for ‘modules_install’.
    make[1]: Leaving directory ‘/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/include’
    make[1]: Entering directory ‘/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore’
    mkdir -p /lib/modules/4.8.0-49-generic/kernel/sound/acore
    cp snd-hwdep.ko snd-page-alloc.ko snd-pcm.ko snd-timer.ko snd.ko /lib/modules/4.8.0-49-generic/kernel/sound/acore
    cp: cannot stat ‘snd-hwdep.ko’: No such file or directory
    cp: cannot stat ‘snd-page-alloc.ko’: No such file or directory
    cp: cannot stat ‘snd-pcm.ko’: No such file or directory
    cp: cannot stat ‘snd-timer.ko’: No such file or directory
    cp: cannot stat ‘snd.ko’: No such file or directory
    /home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/Rules.make:48: recipe for target ‘modules_install’ failed
    make[1]: *** [modules_install] Error 1
    make[1]: Leaving directory ‘/home/mr_mister/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore’
    Makefile:206: recipe for target ‘install-modules’ failed
    make: *** [install-modules] Error 1

    If these are dependencies problems, how do i solve them?

Leave a Reply