This repository provides a script to help you fix issues with Realtek audio drivers in Linux. There are two methods to resolve the issue: an automated method and a manual method.
The automated method allows you to fix the issue by simply running a script. Follow these steps:
-
Clone the repository:
git clone https://github.com/hello2himel/linux-audio-fix.git
-
Navigate to the cloned directory:
cd linux-audio-fix
-
Give execute permission to the script:
chmod +x AudioFix.sh
-
Run the script:
./AudioFix.sh
The script will automatically install the necessary tools, detect the Realtek chip, disable auto-mute, run hda-verb
commands, and reboot your system.
If the automated method does not resolve your issue, you can follow the manual process below to fix your Realtek audio drivers.
-
Update Your Motherboard BIOS: Ensure that your motherboard BIOS is updated to the latest version. Check your motherboard manufacturer's website for the latest BIOS update instructions.
-
Install alsa-utils (if not already installed): Open your terminal and type the following command to install
alsa-utils
. For Arch-based systems, use:sudo pacman -S alsa-utils
For other distributions like Ubuntu/Fedora,
alsa-utils
might already be installed. -
Launch alsamixer: In your terminal, type
alsamixer
and press Enter. If the terminal doesn't detect the command, ensure thatalsa-utils
is installed. -
Select the Realtek Sound Card:
- After launching
alsamixer
in your terminal, pressF6
to open the "Select Sound Card" menu. - You will see a list of available sound cards. The names may appear generic, such as "HD-Audio Generic" or similar, depending on your system's configuration.
- Use the arrow keys to navigate through the list of sound cards. Once you highlight a card, press Enter to select it.
- After selecting a card, if it's a Realtek chip, you'll see its details in the new menu (such as ALC897, ALC1220, etc.). This confirms that you have selected the correct Realtek sound card.
If the selected card is not a Realtek chip, you may need to check the system's audio hardware to ensure the correct card is selected.
Here’s a tutorial showing how to disable Auto-Mute:
- After launching
-
Disable Auto-Mute: Using the arrow keys, navigate to the Auto-Mute option on the right side and disable it by pressing the
UP/DOWN
arrow keys. PressESC
to exitalsamixer
. -
Install hda-verb (if not already installed): You need to install
hda-verb
to run specific commands. Install it using the following commands:For Debian/Ubuntu/Raspbian/Kali Linux:
sudo apt-get install alsa-tools
For Arch Linux:
sudo pacman -S alsa-tools
For Fedora:
sudo dnf install alsa-tools
-
Run the following
hda-verb
commands: These commands modify audio configurations:sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x1b sudo hda-verb /dev/snd/hwC0D0 0x20 0x477 0x4a4b sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf sudo hda-verb /dev/snd/hwC0D0 0x20 0x477 0x74
-
Reboot Your System: After executing the commands, reboot your system to apply the changes:
sudo reboot
Git is used to clone the repository onto your system. This allows you to download the necessary scripts and files directly from the source repository.
Command:
git clone https://github.com/hello2himel/linux-audio-fix.git
The chmod
command is used to change the permissions of the AudioFix.sh
script, allowing it to be executed.
Command:
chmod +x AudioFix.sh
alsamixer
is a terminal-based utility to control the volume and settings of your sound card on Linux. We use it to disable the auto-mute function, which is known to cause audio issues with some Realtek sound chips.
Command:
alsamixer
hda-verb
is a tool used to send specific commands to the audio hardware via the hda
driver. It helps in fine-tuning the audio driver settings, which can help resolve issues like no sound or mic problems.
Commands:
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x1b
sudo hda-verb /dev/snd/hwC0D0 0x20 0x477 0x4a4b
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf
sudo hda-verb /dev/snd/hwC0D0 0x20 0x477 0x74
Updating your motherboard BIOS can fix compatibility issues with various hardware, including sound cards. A new BIOS version may have improvements or fixes related to your Realtek sound card.
If alsamixer
doesn't detect your sound card, ensure that alsa-utils
is properly installed. You can try reinstalling it.
If the automated script does not fix the issue, try following the manual method. The manual method involves more direct control over your system's audio settings, including disabling auto-mute and running hda-verb
commands.
No, after successfully running the hda-verb
commands and rebooting your system, the changes should persist. You shouldn't need to run them again unless there's a system update or other issue that causes the settings to reset.
Yes, this fix should work on most Linux distributions that use the ALSA sound system, such as Ubuntu, Fedora, and Arch Linux. You may need to adjust some commands depending on your distro's package manager.
If the automated method doesn't work for you, follow the manual steps to resolve the issue. By disabling auto-mute and running hda-verb
commands, you should be able to fix the Realtek audio driver issue on Linux.