So, the first problem I faced experiencing Ubuntu 16.04 for the first time is that when I plugged in my earphones, there is a slight crackling sound in the left earphone.
The problem is related to Realtek’s ALC 295 Audio Device in my HP Pavillion 15 but you can give it a try for other laptops as well.
I searched online for this issue but couldn’t find solution to my problem. It may be because of not-so-appropriate search keywords. But after some days of more research, I finally found the solution to this problem and today I’m going to share it with you.
Steps you need to follow if you are experiencing distortions in your left earphone:
- First open terminal on your Ubuntu machine using Ctrl+Alt+T.
- Install alsa and alsa-tools package using this command:
sudo apt-get install -y alsa alsa-tools
and enter your password. - Now copy the whole block of following code and press Enter :
printf '#!/bin/bash hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x67 hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x3000 ' > sound-script.sh sudo chmod +x ./sound-script.sh && ./sound-script.sh
(We are basically creating a bash script to make the necessary changes and then we’ll execute the script every time our system wakes up from suspend or boots.)
- Now if you’re getting some “permission denied” message simply execute the command: sudo ./sound-script.sh If not, skip this step.
- Once, the above commands are executed successfully, check the sound. You can check the sound be searching “Sound” app on your computer and then click on Test Sound.
- If it resolves the issue, we are good to go. Now we want to make the script run everytime our system wakes up from suspend or boots. Execute the following commands :
##Make the script run on wakeup from suspend. sudo mv ./sound-script.sh /lib/systemd/system-sleep/
- Now execute the command and choose the editor by pressing the number on before that editor. Choose the easiest one.
sudo crontab -e
- After that just add the following line in the end of the file
@reboot /lib/systemd/system-sleep/sound-script.sh
- Use the shortcut to exit the file and save the file by pressing “Y”.
- You can check if the cron job was successfully created or not by doing
sudo crontab -l
which returns a list of user-specified cron jobs.
And that’s how you can say goodbye to that crackling sound.
Thanks a lot! This solved the problem for me! I’ve been looking for this everywhere.
LikeLiked by 1 person
It solved the distorted earphone sound, however, right side earphone stopped working.
Can you please help?
LikeLiked by 1 person
Try Ubuntu 18.04. It doest have any earphone problem at all
LikeLike