Recommended Posts

Radium

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 post
Share on other sites
Mindovermaster

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

Link to post
Share on other sites
Radium

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 post
Share on other sites
n_K

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 post
Share on other sites
Radium

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 post
Share on other sites
+Dick Montage

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?

Link to post
Share on other sites
Radium

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 post
Share on other sites
simplezz

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 post
Share on other sites
Radium

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 post
Share on other sites
simplezz

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 post
Share on other sites
n_K

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 post
Share on other sites
Radium

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 post
Share on other sites
n_K

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 post
Share on other sites
simplezz

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 post
Share on other sites
Radium

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 post
Share on other sites
n_K

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 post
Share on other sites
Radium

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 post
Share on other sites
n_K

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 post
Share on other sites
Radium

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 post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Billus
      Hi everyone (PC specs in sig)
       

       
      So I received the prompt to upgrade my version of Windows to version 1803. Lo and behold, it failed to install. I am currently on version 17127.1 (rs4_release). I've narrowed it down to the Realtek driver being incompatible with both 17127 and 1803. I've tried downloading the latest Realtek driver (https://www.catalog.update.microsoft.com/Search.aspx?q=6.0.1.8409) but I continue to get the green screen. The driver from Asus is also almost 2 years out of date.
       
      The actual error code that is spat out is: SYSTEM_SERVICE_EXCEPTION (rtkvhd64.sys).
       
      I won't be replying for some time due to it being almost 7.30am in Australia. I've been up all night trying to solve this issue. I'm hoping my fellow Neowiners will be able to help me out.
       
      Thanks!
    • By Cameron12
      So last night i switched off my computer and when i turned it on in the morning my headphones had a lot of static, i tried them in my brothers pc and they worked perfectly, i noticed a few things, i can hear fine if i turn my defualt device to USB PnP sound device, bt with that i cant hear the position of people in my games, i need realtek , i also noticed when that when i select my headphones as Front speaker out in realtek hd audio manager i can hear faint sound but mostly static, ive even tried my bros headphones, they do the same thing except with much less static, its worth noting that i have windows 10 64-bit vs 1709, i5 2400 3.1ghz, MSI H61M-P31/w8 mother board. Plz help me with suggestions as to what i should do next.
       
    • By DreyerSmit
      Arch Linux host cites freedom of speech defense, after using offensive domain name
      by Dreyer Smit

      Arch Linux, one of the many open-source distributions based on the free kernel, has been embroiled in controversy after one of the hosts, known as 'Alucard', used an offensive mirror address for one of the packages available to fellow users. However, after this came to light when another user complained, the host responded by saying that his 'freedom of speech' was being suppressed by the complainant.



      The domain name 'loli.forsale' prompted a user by the name Florian to complain that a friend was extremely offended by the address, and asked that it be changed immediately. Loli is a term that describes under-aged girls in Hentai, according to Urban Dictionary, which paired with 'for sale' is objectively offensive.

      Even though this was changed, he went on to defend this choice by referring to his 'freedom of speech', likening the complaint of the offensive content to oppression. Beyond that, he discussed the time and effort he put into the Arch Linux project. However, this was immaterial to the domain name in question. The defendant had to allegedly obtain professional assistance in his lengthy response due to a disability. His question read as follows:

      According to a user on Reddit by the name of 'fameistheproduct', this isn't the first time something in the community has offended some users. At one point, the system automatically generated license codes that could be regarded as offensive by some. The offending content has since been removed by the organization.

      Source: Reddit | Image via Faster Land

    • By gcaw
      New Surface Studio update brings "Hey Cortana" Wake on Voice support from Modern Standby
      by Andy Weir

      Microsoft has released a new update for the Surface Studio, three months after its last updates arrived. Like the updates that it rolled out for the Surface Book and Pro 4 earlier this month, this latest addition for its desktop PC is only being made available to Surface Studios that have been upgraded to the Windows 10 Creators Update, which Microsoft released last week.

      Microsoft isn't upgrading the Surface Studio with new firmware, though. Instead, the latest update only includes a new "Realtek High Definition Audio(SST)" driver - version 6.0.1.8061, which "enables Wake On Voice from Modern Standby".

      The company detailed its plans to support that feature at its WinHEC conference in December, although it was originally demonstrated by Intel in 2015. It will allow users to 'wake' their PC from a screen-off, low-power, standby state, simply by saying "Hey Cortana", much like on the Xbox One.

      This was possible - to an extent - in the Windows 10 Anniversary Update, but effectively required PCs to be fully powered-up, with only the screen in a 'sleep' mode; in fact, Microsoft's own documentation acknowledged that the Anniversary Update "provides a checkbox to entice users to prevent automatic system sleep, such that 'Hey Cortana' can listen even when the screen is off." The Creators Update introduces 'true' Wake on Voice support for the entire PC from a Modern Standby state (also known as 'S0ix' - you can learn more in this PowerPoint deck from Microsoft), and the new Realtek audio driver is needed to enable it on the Surface Studio.

      That functionality will no doubt be welcomed by the lucky few who have purchased a Surface Studio. So far, it's only been available in the US, but it's launching today in three new markets.

      Source: Surface Studio Update History (Microsoft) via MSPoweruser

    • By JustinCharlier
      Researchers show how hackers can use headphones as microphones to spy on you
      by Justin Luna

      Headphones have always done what we expect them to do-- play tunes and sounds, practically blocking out the noise of the outside world. While we know that they give a one-sided listening experience, researchers might have found a loophole that opens the possibility of a third-party entity listening in on us instead.

      Researchers over at the Ben Gurion University in Israel have created a piece of code concept they dub as 'Speake(a)r'. It was designed to demonstrate how hackers could find a way to hijack a computer to record audio, even if the device's microphones have already been disabled.

      This technique re-purposes the speakers in earbuds and headphones into microphones, capturing vibrations in the air and converting them into electromagnetic signals. This will then enable the hackers to quietly capture audio without the knowledge of the owner.

      “People don’t think about this privacy vulnerability,” says Mordechai Guri, the research lead of Ben Gurion’s Cyber Security Research Labs. “Even if you remove your computer’s microphone, if you use headphones you can be recorded.”

      This trick apparently isn't new anymore, with YouTube videos demonstrating how to exactly make this possible. However, unlike the ones in the video-streaming website, the Gurion researchers exploited a little-known feature of Realtek audio codec chips, which reverses the computer's output channel as an input channel.

      With many Realtek audio chips out there, the hack can practically be done on any computer, whether you are running Windows, or macOS. “This is the real vulnerability”, says Guri. “It’s what makes almost every computer today vulnerable to this type of attack.”

      Guri states that there is no simple software patch to stop the possible eavesdropping attack. Given the Realtek codec chip is a feature in itself and not a bug, the problem reportedly can only be solved by replacing and redesigning the audio chip in future computers.

      While this type of attack is indeed alarming, hacks like Speake(a)r are not generally something to be highly worried about, especially for those who don't really mess around with computer systems. It is currently only a proof-of-concept, and most likely won't become a mainstream thing when it comes to hacking anytime soon. Still, in today's era of cybersecurity, it always pays to give extra care to what we do with our computers, in order to keep ourselves safe from criminals.

      Source: WIRED via The Next Web