0

I have Ubuntu 15.10 installed on my notebook HP EliteBook 755 G2 that has 2 audio cards:

00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri HDMI/DP Audio Controller
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01)

Internal speakers are working fine but headphones aren't. Googling I've found this configuration for alsa:

$ cat /etc/modprobe.d/snd-hda-intel.conf 
alias char-major-116 snd
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel
options snd-hda-intel id=Generic_1 index=0
options snd-hda-intel id=Generic index=1
options snd-hda-intel model=hp,headset-mic  

But it doesn't solve the issue in my case. I have upgraded the bios to the last version, but it doesn't solve the issue in my case.

I think that ALC3228 is associated to headphones, but I'm not sure.

This alsamixer screenshot for my first audio device

This alsamixer screenshot for my second audio device

Luca
  • 1

1 Answers1

1

I have the same notebook and had the same problem. I fixed it, in Ubuntu 15.04 and 16.04-alpha (I use the MATE flavor of both), by including only a line for model=,headset-mic in /etc/modprobe.d/snd-hda-intel.conf. I.e.:

$ cat /etc/modprobe.d/snd-hda-intel.conf
options snd-hda-intel model=,headset-mic

The comma character makes it apply to the 2nd audio device which is the Azalia one that controls the internal headset. The 1st one, the HDMI/DP one, will default and doesn't seem to need the "hp" from that ALSA configuration you found, but I haven't tried my HDMI/DP.

The fix in the kernel has recently been made. The problem was reported to the ALSA developers and a fix is now in the official 4.5 kernel: https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=f883982dc1b117f04579f0896821cd9f2e397f94

The fix has also been requested to be included in Ubuntu 16.04: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1550765

I think the fix has also been backported to a few of the maintained older kernel versions.

With a kernel with the fix, you don't need the snd-hda-intel.conf file.

Without a fixed kernel, I also have a very annoying weird squeaky background noise in the headphones. This has also been fixed in the kernel in the same commit, but with an older kernel without it you can manually fix it in a couple ways depending on the kernel version. I don't know what version is the boundary.

With Ubuntu 16.04-alpha's 4.4.0 kernel, I fixed it by disabling Loopback Mixing as recommended by an ALSA developer, e.g. via alsamixer. (But if the kernel fix makes it into the release of Ubuntu 16.04, this won't be necessary.)

With Ubuntu 15.04's (and maybe others') older kernel that doesn't have Loopback Mixing for our device, you can use the white_noise_fix.py script from http://xps13-9333.appspot.com/root/usr/local/bin/white_noise_fix.py, as described at http://xps13-9333.appspot.com/#background_noise and Noise from headphones. You'll probably want to run it at boot time, which I do by invoking it from /etc/rc.local, i.e. add this line to /etc/rc.local: /usr/local/bin/white_noise_fix.py

With white_noise_fix.py, when my notebook resumes from sleep, the background noise comes back, so I manually run sudo /usr/local/bin/white_noise_fix.py. I think you might be able to automate this with a pm-utils script in /etc/pm/sleep.d but I haven't tried that.

You might also want to do what those articles I linked say to do to disable the power saving mode of the audio card to prevent pop noises. I did this in Ubuntu 15.04 but I don't really know if it was needed.

(I'd also found the configuration you showed, and it didn't work for me either. It was from an Arch Linux user, and I think the lines other than the model option one interfere with what Ubuntu already does for the audio device.)