Recommended Posts

Hello

I've had a loud pop every time GDM starts and activates the sound. It also happens when the sound chip is woken up from powersaving but that pop isn't as loud and turning off powersaving doesn't help since the loud pop at startup will still be there so the powersaving isn't at fault here. Ubuntu doesn't produce a loud pop, maybe because of older drivers, I don't know. I've searched for solutions hours on end for at least two weeks now and I have not been able to solve it. I've read all forum threads regardning this issue and all of them are old and none of the proposed solutions help me. I've also compared sound related configs between my Arch Linux and Ubuntu installations and I've copied configs from Ubuntu and nothing changes. I don't know what could be at fault here. Muting the speakers at boot prevents the loud pop from happening. I do not want to turn off powersaving for the sound because it consumes enough energy for it become a concern for me since I'm on a laptop.

How do I make this work as intended and avoid the popping speakers?

Please help! :'(

Link to comment
Share on other sites

Doesn't GDM always have that sound? I remember something like that... IDK, just my 2 cents...

Link to comment
Share on other sites

Doesn't GDM always have that sound? I remember something like that... IDK, just my 2 cents...

No, it's before GDM actually shows up (no reason for it to play a welcome sound when the text terminal is still in the framebuffer) and the pop is not a sound file playing, it's an electrical discharge. It's when the sound chip is activated by the modules. The pop comes every time a new sound is played. Pulseaudio might be at blame here since it get a very loud pop when I run "pulseaudio --kill". GDM starts pulseaudio and GNOME depends on it for desktop audio. The reason the pop comes when I play a sound is because I put it into powersaving mode when no sound is played for a second or two. The powerconsumption for an idle audio codec. However, Ubuntu doesn't give me this problem at all so it I can't blame the hardware nor can I blame GDM because GDM doesn't make a sound in Ubuntu. It all seems to be caused by the HD audio, Realtek codec, ALSA or pulseaudio.

It's a laptop with Intel HD Audio (Realtek ALC3232).

Link to comment
Share on other sites

I know the issue you have, I have the same thing on a macbook and old toshiba laptop though the pop isn't very loud at all, I'd assume the answer would be that the volume needs muting before it enters/leaves power save mode - so the question is how does your audio device enter power saving mode, is it all done in hardware? If so, you'll probably have to look through the PA documentation and see if there's any options for muting/quietening the sound if nothing has been played for X time (and keep adjusting X until it stops the loud pop), that's IF PA supports this, I don't know if it does or not. If the power save mode is done using PA then there's probably options in PA to control it, you'd have to look these up.
Finally, if it's done by the drivers then you might have to pass different parameters to the drivers or reconfigure PA to do some data exchange, there might be a parameter you can supply to completely disable power saving mode which then might help you track down where the problem is occuring (driver/hardware/PA)

Link to comment
Share on other sites

I know the issue you have, I have the same thing on a macbook and old toshiba laptop though the pop isn't very loud at all, I'd assume the answer would be that the volume needs muting before it enters/leaves power save mode - so the question is how does your audio device enter power saving mode, is it all done in hardware? If so, you'll probably have to look through the PA documentation and see if there's any options for muting/quietening the sound if nothing has been played for X time (and keep adjusting X until it stops the loud pop), that's IF PA supports this, I don't know if it does or not. If the power save mode is done using PA then there's probably options in PA to control it, you'd have to look these up.
Finally, if it's done by the drivers then you might have to pass different parameters to the drivers or reconfigure PA to do some data exchange, there might be a parameter you can supply to completely disable power saving mode which then might help you track down where the problem is occuring (driver/hardware/PA)

I've tried to do that and nothing changes the outcome. I've fiddled with configs and scripts just to solve this. I spend hours every day trying to figure this out. I've tried different not-recommended options for pulseaudio, I've looked for options for snd_hda_intel and the few options availible do not address any of this other than turning off powersaving which only makes it more difficult to see if the pop remains. I've looked into ALSA configuring and that part is a jungle. The system loads the Realtek codec modules automatically and all features are availible. I've added automatic muting and unmuting for shutdown and boot, for sleep and resume. None of it helps!

Link to comment
Share on other sites

I know exactly what you mean.  I am wondering if there's some sort of power management to not have it turn off, hence no pop when turn on?

The pop is there at boot/startup with all powersaving turned off. But not when I boot into Ubuntu. I've copied several configs from Ubuntu after checking what the differences are, nothing helps.

Link to comment
Share on other sites

What happens if you blacklist the module and manually load it when the system has booted?

$ su -c 'echo blacklist snd_hda_intel >> /etc/modprobe.d/blacklist.conf'
edit /etc/mkinitcpio.conf and put '/etc/modprobe.d/blacklist.conf' in the files section.
$ mkinitcpio -p linux
$ reboot
$ modprobe snd_hda_intel

 

Link to comment
Share on other sites

What happens if you blacklist the module and manually load it when the system has booted?

$ su -c 'echo blacklist snd_hda_intel >> /etc/modprobe.d/blacklist.conf'
edit /etc/mkinitcpio.conf and put '/etc/modprobe.d/blacklist.conf' in the files section.
$ mkinitcpio -p linux
$ reboot
$ modprobe snd_hda_intel

 

That only delays the big pop. It happens when the module is loaded but if it's the module, ALSA, pulseaudio or GDM that causes it is still the question since they all do something when the sound module is activated.

Link to comment
Share on other sites

That only delays the big pop. It happens when the module is loaded but if it's the module, ALSA, pulseaudio or GDM that causes it is still the question since they all do something when the sound module is activated.

Yes it's difficult to say with certainty when so many layers are involved. I did notice an interesting setting in Pulse Audio's daemon.conf though:

flat-volumes flat-volumes scales the device-volume with the volume of the "loudest" application. For example, raising the VoIP call volume will raise the hardware volume and adjust the music-player volume so it stays where it was, without having to lower the volume of the music-player manually. Defaults to yes.

Warning: The default behavior can sometimes be confusing and some applications, unaware of this feature, can set their volume to 100% at startup, potentially blowing your speakers or your ears. To restore the classic (ALSA) behavior set this to no.

https://wiki.archlinux.org/index.php/PulseAudio#daemon.conf

Personally, I'd disable PA and see if the problem occurs with just ALSA running. Either kill the daemon before modprobing the intel module, or turn off the autospawn in the client config.

It might also be worth posting your alsamixer levels.

Link to comment
Share on other sites

Also one thing to note in why you're not seeing this with ubuntu could be that ubuntu isn't using the power saving feature, it could be sitting idle but at full power for the duration of the time it's used.

Link to comment
Share on other sites

Yes it's difficult to say with certainty when so many layers are involved. I did notice an interesting setting in Pulse Audio's daemon.conf though:

https://wiki.archlinux.org/index.php/PulseAudio#daemon.conf

Personally, I'd disable PA and see if the problem occurs with just ALSA running. Either kill the daemon before modprobing the intel module, or turn off the autospawn in the client config.

It might also be worth posting your alsamixer levels.

I've turned off autospawning and flat volumes. None of which does anything for me. Pulseaudio is a dependency of Gnome desktop so it's hard to get it running without it. It will automatically start pulseaudio despite 'autospawn' is set to 'no'. Ubuntu with GDM & Gnome Desktop doesn't pop the speakers. So it's something at a lower level it seems, since I've copied all the ALSA and pulseaudio configs over from Ubuntu to my Arch install. I've been digging in the Arch wiki and other wikis and nothing addresses my issues and I've tried all the suggested things several times, in different combinations. Arch's wiki was the first place I went to, it contains a lot of good information.

┌───────────────────────────── AlsaMixer v1.0.29 ──────────────────────────────┐
│ Card: HDA Intel PCH                                  F1:  Help               │
│ Chip: Realtek ALC3232                                F2:  System information │
│ View: F3:[Playback] F4: Capture  F5: All             F6:  Select sound card  │
│ Item: Master [dB gain: -19,50]                       Esc: Exit               │
│                                                                              │
│     ┌──┐     ┌──┐              ┌──┐     ┌──┐     ┌──┐     ┌──┐     ┌──┐      │
│     │  │     │  │              │▒▒│     │▒▒│     │  │     │  │     │  │      │
│     │  │     │  │              │▒▒│     │▒▒│     │  │     │  │     │  │      │
│     │  │     │  │              │▒▒│     │▒▒│     │  │     │  │     │  │      →
│     │  │     │  │              │▒▒│     │▒▒│     │  │     │  │     │  │      →
│     │  │     │  │              │▒▒│     │▒▒│     │  │     │  │     │  │      →
│     │  │     │  │              │▒▒│     │▒▒│     │  │     │  │     │  │      →
│     │▒▒│     │  │              │▒▒│     │▒▒│     │  │     │  │     │  │      →
│     │▒▒│     │  │              │▒▒│     │▒▒│     │  │     │  │     │  │      →
│     │▒▒│     │  │              │▒▒│     │▒▒│     │  │     │  │     │  │      →
│     │▒▒│     │  │              │▒▒│     │▒▒│     │▒▒│     │  │     │  │      │
│     │▒▒│     │  │              │▒▒│     │▒▒│     │▒▒│     │  │     │  │      │
│     ├──┤     ├──┤     ┌──┐     ├──┤     └──┘     ├──┤     └──┘     ├──┤      │
│     │OO│     │MM│     │MM│     │OO│              │MM│              │MM│      │
│     └──┘     └──┘     └──┘     └──┘              └──┘              └──┘      │
│      43      0<>0            100<>100 100<>100  20<>20    0<>0     0<>0      │
│  < Master >Headphon Headphon Speaker    PCM      Mic    Mic Boos   Beep      │
└──────────────────────────────────────────────────────────────────────────────┘

The speaker and PCM levels are set to maximum when I use the laptop volume controls. Turning them all the way down and then setting master higher doesn't affect the poping, it only makes the sound faint but the poping as still there.

Also one thing to note in why you're not seeing this with ubuntu could be that ubuntu isn't using the power saving feature, it could be sitting idle but at full power for the duration of the time it's used.

Turning off powersaving doesn't prevent the pop at startup. So turning off powersaving is not a solution. Turning off powersaving is not a proper solution either way since that's not the way it's meant to be done. Laptops need powersaving modes for all the devices or the battery will drain faster. I'm trying to squeeze out more time out of this laptop.

This seems to be a driver problem, doesn't it?

Link to comment
Share on other sites

I'm not saying it's a solution I'm just saying it might be ubuntu isn't doing power saving stuff, and that's why you see it in arch but not ubuntu, but yes to me it points to driver/config issue.

Link to comment
Share on other sites

I've turned off autospawning and flat volumes. None of which does anything for me. Pulseaudio is a dependency of Gnome desktop so it's hard to get it running without it. It will automatically start pulseaudio despite 'autospawn' is set to 'no'. Ubuntu with GDM & Gnome Desktop doesn't pop the speakers. So it's something at a lower level it seems, since I've copied all the ALSA and pulseaudio configs over from Ubuntu to my Arch install. I've been digging in the Arch wiki and other wikis and nothing addresses my issues and I've tried all the suggested things several times, in different combinations. Arch's wiki was the first place I went to, it contains a lot of good information.

Just run twm from the terminal instead of GDM. Has this always been the case, or just since you installed Gnome/Pulse, etc?

Another option is to load the module manually with powersaving disabled to see conclusively whether that's the cause. Unload it first ofc.

$ modprobe snd-hda-intel power_save=0 power_save_controller=N

Check Ubuntu's /etc/modprobe.d/alsa-base.conf in case it uses a custom module initialisation.

Link to comment
Share on other sites

I'm not saying it's a solution I'm just saying it might be ubuntu isn't doing power saving stuff, and that's why you see it in arch but not ubuntu, but yes to me it points to driver/config issue.

Arch comes with no powersaving enabled and the pop at startup has been there since sound got enabled. So if powersaving were to blame then it would be equal on both Arch and Ubuntu. The only powersaving done out of the boxes is that which

Just run twm from the terminal instead of GDM. Has this always been the case, or just since you installed Gnome/Pulse, etc?

Another option is to load the module manually with powersaving disabled to see conclusively whether that's the cause. Unload it first ofc.

$ modprobe snd-hda-intel power_save=0 power_save_controller=N

Check Ubuntu's /etc/modprobe.d/alsa-base.conf in case it uses a custom module initialisation.

Thanks for the hint on going through pure Xorg+twm. I had to get rid of the pulse references in /etc/asound.conf (replaced with a simple dmix configuration) and then reboot. I was able to use aplay and play sound files in xterm inside twm. A big pop when I started pulseaudio. Killing it and then starting it again after a while would create a pop again. But using pure ALSA sound without pulseaudio seems to be free from the pops. So PulseAudio is to blame here! Now I'm trying to remove references in GDM+GNOME from using PulseAudio. There's a reference in /etc/xdg/autostart/ which I need to sack. I'll come back when I've sorted this out.

PulseAudio got updated to 7.0 quite recently. I hope they get to work and fix these pops that people are getting here and there.

Link to comment
Share on other sites

Arch comes with no powersaving enabled and the pop at startup has been there since sound got enabled. So if powersaving were to blame then it would be equal on both Arch and Ubuntu. The only powersaving done out of the boxes is that which

It doesn't come with powersaving for CPU or GPU or HDs but that doesn't mean it doesn't come with powersaving, powering down the audio hardware has been around since the 90s, it's built into probably almost every on-board sound chip on desktop and laptop hardware, the driver itself WILL do powersaving if it can detect the system has support for it, as you're doing in the modprobe 'power_save=0' must be appended if you want to disable audio power saving, otherwise it will be on.

Link to comment
Share on other sites

It doesn't come with powersaving for CPU or GPU or HDs but that doesn't mean it doesn't come with powersaving, powering down the audio hardware has been around since the 90s, it's built into probably almost every on-board sound chip on desktop and laptop hardware, the driver itself WILL do powersaving if it can detect the system has support for it, as you're doing in the modprobe 'power_save=0' must be appended if you want to disable audio power saving, otherwise it will be on.

Yes, it has been off and it removes the pops between sounds but the popping problem hasn't been solved since a loud pop is still heard when pulseaudio start. Gnome is dependent on pulseaudio and I don't know how to make ALSA work just fine in Gnome. Gnome insist on starting pulseaudio despite telling pulseaudio clients not to autospawn. I've also removed the references to pulseaudio in /etc/asound.conf.

Link to comment
Share on other sites

Not sure if it'll mess up gnome or not, but for a temporary solution you can rename the PA executables (as root) or force uninstalling the PA package and ignoring dependancies using pacman then reboot, login to gnome and try your alternatives.

Link to comment
Share on other sites

I downloaded and compiled Linux 4.3 RC4 and used the Arch config found in /proc/config.gz.

The popping is now gone, it seems. So much fiddling when I could've done this much earlier. It all pointed towards PulseAudio since aplay could play anything without a pop and modprobe wouldn't cause the speakers to pop if I was inside a desktop environment that didn't depend on PulseAudio (such as Gnome).

Marking this as SOLVED!

Link to comment
Share on other sites

This topic is now closed to further replies.