You are not logged in.

#1 2016-12-08 23:45:14

frix
Member
Registered: 2011-05-02
Posts: 27

White noise on Asus UX501VW after resuming from suspend

I am having trouble fixing a strange white noise on an Asus UX501VW laptop that's starting right after resuming from suspend. Other people appear to have the same issue. From what I could gather this happened even after a normal boot in the past, but now only occurs after suspend with the 4.8 kernel.

One thing I noticed : in the Gnome Settings panel the audio device changes from "Headphones - Built-in Audio" to "Dummy output". Sound keeps on working after resuming, however, just with the noise.

I have tried playing with alsamixer and pavucontrol, but the noise doesn't appear related to either ALSA or Pulse's volume, so its certainly coming from something lower in the stack. And that's where my knowledge ends. Anything I can do to debug this?

lspci output :

00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
	Subsystem: ASUSTeK Computer Inc. Device 1080
	Flags: bus master, fast devsel, latency 32, IRQ 128
	Memory at dd328000 (64-bit, non-prefetchable) [size=16K]
	Memory at dd300000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: [50] Power Management version 3
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

Last edited by frix (2016-12-08 23:45:58)

Offline

#2 2016-12-26 22:14:09

riX2000
Member
Registered: 2013-09-11
Posts: 11

Re: White noise on Asus UX501VW after resuming from suspend

I had the problem with white noise on the same laptop, I fixed it by setting the driver in /etc/modprobe.d/alsa-base.conf

#/etc/modprobe.d/alsa-base.conf
options snd-hda-intel model=dell-headset-multi

After a reboot it worked.

Problem is though, now, a week later, I get no sound at all through the headphone jack. If I run

alsactl init 0

i get sound again, but with the white noise back..

Last edited by riX2000 (2016-12-26 23:03:04)

Offline

#3 2018-03-14 22:25:41

frix
Member
Registered: 2011-05-02
Posts: 27

Re: White noise on Asus UX501VW after resuming from suspend

I finally got fed up with this and went on trying to fix it myself.

TL;DR : This is a hack, but run the following commands after resuming from suspend to run a full codec configuration again, which appears to fix the white noise :

systemctl --user stop pulseaudio pulseaudio.socket
echo 1 | sudo tee /sys/class/sound/hwC0D0/reconfig
systemctl --user start pulseaudio pulseaudio.socket

My laptop is using a Realtek ALC668 codec chip, which is, as far as I could tell, well-supported by Linux. However, the Intel HD Audio architecture (to which the codec is connected) exposes tons of options, parameters and coefficients, and something goes wrong when resuming. I have yet to identify which option is causing the white noise, but at least I can turn it off in a reproducible way.

A couple of useful tools I found :

* A low-level debug interface is exposed by the kernel at /proc/asound/card0/codec#0 (for the first codec of the first card).

* The hda-analyzer tool from git://git.alsa-project.org/alsa.git analyzes this file and is great for peeking under the hood. For now it needs to be run with the following incantation under Gnome/Wayland 3.26 :

xhost si:localuser:root; sudo GDK_BACKEND=x11 python2 hda-analyzer/hda_analyzer.py

* The codecgraph tool is also a good way to visualize how audio streams are routed through the hardware.

* The snd-hda-intel model=dell-headset-multi line activates device-specific quirks (pin configurations, coefficients, etc.) instead of the default. This may work (if the hardware if laid out in a similar way on your laptop) or leave you without sound (if the hardware is wired differently).

Hope this helps other people looking at the same issues.

Last edited by frix (2018-03-14 22:26:52)

Offline

Board footer

Powered by FluxBB