5

My laptop model number is 15-bc051nr. I get a static-y noise in my left earphone whenever I listen to music on Ubuntu 16.04. Works fine on Windows though

  • 1
    Please provide the details of the chipset for your audio by copy/pasting the result of lspci -v | grep -i audio for a better answer :) – Rinzwind Jan 19 '17 at 20:54
  • Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31) Subsystem: Hewlett-Packard Company Sunrise Point-H HD Audio...... This is what I get – HMK Jan 20 '17 at 14:48
  • does ` lspci -vv| grep snd` show Kernel driver in use: snd_hda_intel? – Rinzwind Jan 20 '17 at 15:51
  • Yes it does show that – HMK Jan 21 '17 at 20:19
  • That should be fine then. I am doubting installing any kind of other driver will be the answer. But also not sure what the answer is :P – Rinzwind Jan 21 '17 at 22:06
8

Here's the fix that I found while googling for the issue. I too had the same issue regarding crackling sound from the left headphone speaker. The problem is related to Realtek's ALC 295 Audio Device.

Firstly install alsa and alsa-tools package :

sudo apt-get install -y alsa alsa-tools

Next, execute the following commands, copy pasting the whole code-block at once into bash (For newbies, we are essentially 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.) :

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 && sudo ./sound-script.sh

Once, the above commands are executed successfully, check the sound. You may check it here for both the speakers : http://www.audiocheck.net/audiotests_stereo.php

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, add the following line after doing sudo crontab -e

sudo crontab -e

Paste this line in the file :
@reboot /lib/systemd/system-sleep/sound-script.sh

And save the file and exit the editor. 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.

Hope it helps. Thanks!

Source: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1648183

  • Hey I tried this but I keep getting permission denied. Why is that – HMK Sep 7 '17 at 15:31
  • You probably don't have the permissions to edit the file. Are you sure you are using sudo, or that you are the root user? Also, would you please elaborate on where you're getting stuck? Maybe, that way I'll be able to help you better. – Mayank Sharma Sep 14 '17 at 19:44
  • Thanks, it worked when I did from root. Why does this need to be run everytime the system reboots? – HMK Sep 14 '17 at 21:01
  • 1
    That's because you didn't schedule the job in crontab. I think you missed up some step after sudo crontab -e or maybe goofed up somewhere after that. You can check if you have the job properly scheduled using sudo crontab -l , wherein you will see @reboot /lib/systemd/system-sleep/sound-script.sh . If you're still stuck, you might have to google have to schedule cron jobs, depending upon which distro you are using. – Mayank Sharma Sep 15 '17 at 19:16

protected by Community Feb 23 '18 at 15:04

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.