Slashdot Mirror


Ask Slashdot: Stop PulseAudio From Changing Sound Settings?

New submitter cgdae writes Does anyone know how to stop PulseAudio/Pavucontrol from changing sound settings whenever there is a hardware change such as headphones being plugged in/out or docking/undocking my laptop ? I recently had to install PulseAudio on my Debian system because the Linux version of Skype started to require it. Ever since, whenever i dock/undock or use/stop using headphones, all sound disappears, and i have to go to Pavucontrol and make random changes to its 'Output Devices' or 'Speakers' or 'Headphones' tab, or mute/unmute things, or drag a volume slider which has inexplicably moved to nearly zero, until sound magically comes back again. I've tried creating empty PulseAudio config files in my home directory, and/or disabling the loading of various PulseAudio modules in /etc/pulse/*.conf, but i cannot stop PulseAudio from messing things up whenever there's a hardware change. It's really frustrating that something like PulseAudio doesn't have an easy-to-find way of preventing it from trying (and failing) to be clever.

[In case it's relevant, my system is a Lenovo X220 laptop, with Debian jessie, kernel 3.14-2-amd64. I run fvwm with an ancient config.]

17 of 286 comments (clear)

  1. are the debian support forums down? by Selur · · Score: 4, Insightful

    Sounds more like a question for a support forum than for slashdot,...

    1. Re:are the debian support forums down? by Anonymous Coward · · Score: 5, Insightful

      Sounds more like a question for a support forum than for slashdot,...

      It's part of a paid smear campaign, intended to establish a belief that Linux is difficult and unreliable. Have you noticed how every discussion about Linux/Foss on Slashdot is centered on these weird corner-cases that almost nobody in the real world ever sees?

      That's because a certain mainstream OS vendor has a lab full of people trying to find flaws and publish them. DiceDot, of course, happily oblige$...

    2. Re:are the debian support forums down? by X0563511 · · Score: 4, Funny

      Don't forget to uninstall Pottering. PulseAudio was just the beginning.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    3. Re:are the debian support forums down? by Anonymous Coward · · Score: 5, Interesting

      Pulseaudio was a royal PITA until about 5 years ago. By then the kinks have been worked out and it works rather well. The only thing worse than Pulseadudio was the cruft that it replaced. People who still complain about it either have very weird hardware or run old systems and just like to complain about old things...

    4. Re:are the debian support forums down? by Aighearach · · Score: 4, Insightful

      Yeah, or are just trolling. I'm going to say this whole post is a giant troll that dice fell for. They thought they were trolling linux, but they were really trolling systemd. Whoops!

    5. Re: are the debian support forums down? by kaladorn · · Score: 4, Informative

      Skype has actually gotten considerably worse since MS bought it.

      --
      -- Mal: "Well they tell you: never hit a man with a closed fist. But it is, on occasion, hilarious."
  2. Editor Troll by twistedcubic · · Score: 5, Insightful

    This is an obvious troll, but not from the OP. This is a troll by the editor, Timothy, to encourage discussion of the PulseAudio author, Lennart Poettering, and systemd.

    1. Re:Editor Troll by dshadowwolf · · Score: 4, Insightful

      It very well could be, but why not ignore the trolling or turn it on it's head by actually answering the question and not getting into deep discussions or flame wars about the creator of the software in question?

      (Note: as I've said in another comment, I have a philosophical difference of opinion with Mr. Poettering, but I refuse to attempt a smear campaign - even though I might have contributed to one in the past, I've come to the conclusion that it's not worth my time)

    2. Re:Editor Troll by Rich0 · · Score: 4, Insightful

      Yup. If posted on a typical distro support forum this would get a clear answer in about 3 posts.

      Instead we'll get 300 "helpful" posts on slashdot where the closest to being helpful comes out to "stop using skype and pulseaudio" but most will be off-topic banter about Lennart and systemd...

      Slashdot must be dying and this stuff has to be some kind of deliberate effort to attract eyeballs by making slashdot the premiere place for flamewars. Half the summaries and headlines are completely misleading as well, generally designed to maximize sensation and banter.

      News articles should give everything away in the first three lines, and should give half of everything away in the headline. They shouldn't be teasers. You shouldn't have to read the original article to figure out what the summary got wrong. If I'm in a hurry I want the condensed version of the news, not misinformation substituted for news.

      I don't know why I even bother here any more. The changes to the discussion system were annoying enough. It seems like the content has gone downhill as well.

    3. Re:Editor Troll by sjames · · Score: 4, Insightful

      Is it really smearing when you look at how someone's last major project went when judging how well their current project is likely to work?

    4. Re:Editor Troll by Aighearach · · Score: 4, Insightful

      Except he probably just needs to turn off "automatically adjust mixer levels" in Skype, and stop blaming PulseAudio. The hate leads to the blame, in this case. If he didn't know what to hate, (for reasons that are logic errors) then he'd have to ask instead, "what software is connected to my sound subsystem and adjusts the mixer levels automatically?" That would be a question that might lead to the answer. But starting from logic errors and hate, they seek out PulseAudio to blame it. And are wrong, mean, and dumb asses, all at the same time.

      Also some audio players fiddle the mixer, when allowed. They think they're helping. I personally went back to an old unforked xmms. Still compiles!

    5. Re:Editor Troll by Aighearach · · Score: 4, Informative

      You don't even have to stop using Skype. You only have to:

      1) Not decide to blame PulseAudio even before you know what is wrong
      2) Open the Skype settings
      3) Turn off the correctly named default setting "automatically adjust mixer levels."

      For most people, who aren't part of some sort of hateful social movement focused on attacking one man for having a good job, that is actually only a 2 step process. But even neckbeards should be able to manage it with the extra step.

    6. Re:Editor Troll by Anonymous Coward · · Score: 5, Informative

      Except you're completely wrong. This is a known bug in ALSA which has been fixed upstream but is still present in Debian stable.

      This is the patch which introduced the bug:

      http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=de7c3eff0e371ce155403bbcdcf81ee79266fa0f (note author lol)

      And this is the patch that fixed it:

      http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=ef0e588c76fbad4112193d311e51a60d18b44282

  3. Editor Troll by Anonymous Coward · · Score: 4, Interesting

    It's a pretty good example of the half assed work. Seems a reasonable place to start.

  4. Pulseaudio is a synthom, It's not to blame. by goruka · · Score: 5, Informative

    Disclaimer: I wrote plenty of open source audio apps for linux, even worked with professional audio hardware with embedded linux.

    Pulseaudio is just another victim of the attitude from the linux kernel developers of kicking a problem to userland when they should really be solving it.
    Userspace audio mixers are OK for many applications, such as a video player, desktop sounds, listening to mp3s, etc. as long as such applications don't need low latency. If you need videogames, pro-audio stuff, or even real-time video editing you need low latency and here is the problem happens. You need somehow a way to ensure that the low latency audio thread gets notification quickly and gets priority in the scheduler (because the buffers are small), while the regular latency audio just needs to accumulate more data into buffers.

    But the problem is, that you have only one DAC, and different streams might request different configuration parameters, such as bit depth, sampling rate, channels, etc. In any serious OS, the kernel will open a stream with the maximum settings for real-time, and will ensure it gets the needed attention, while it mixes and resamples the audio that comes from the regular OS sound buffers over it. Linux kernel developers are against this, and the justification is that resampling should not happen in the kernel. As a result, asks user space to solve the problem. Pulseaudio is an attempt to solve that problem, and does what the kernel should be doing in userspace, but unfortunately it just doesn't work very well. Linux is not a "real time" OS and scheduling can still fuck you your user-space audio.

    Back in the day, OSS handled this perfectly, but when it was replaced by ALSA (an extremely bloated and over-designed API and driver architecture) hell began, so please don't blame PulseAudio for this, this is purely the fault of kernel developers.

  5. Short answer: use apulse by Anonymous Coward · · Score: 4, Informative

    To those commenters saying "don't use Skype": Skype is a proprietary protocol that can only interact with other Skype users, and Skype is very popular and so hard to avoid. I was once offered a remote interview on Skype, only to fail because I have no Windows and Skype for Linux was a piece of crap multiple major versions behind (yeah, with a week more to play I might have gotten it to half-way work with Wine, but who cares?).

    To those saying "kill pulse": that's not an option when software depends on pulse (rather than, say, offering it as an option, which still may require that it be present for the dynamic libraries). https://github.com/i-rinat/apulse seems to eliminate pulse audio and still allow apps linking to it to work. I've not tested it with Skype, nor have I checked if there is a Debian package for it that can be used as a drop-in substitute (I use Gentoo, and that's where I found it).

  6. Re: Are any of them able to use the Skype network? by Technician · · Score: 4, Informative

    Yes, but not in a very graceful fashion. The one I use on occasoion is ippi.com as a SIP provider. You can Google the proceedure to use the Skype/SIP gateway.

    In a nutshell, the gateway is like dialing 9 on a PBX and outside callers needing to use an automated attendant to reach an extension, so you need to educate your Skype contacts on how to use it.

    The cumbersome interface uses a Skype proxy for outgoing calls where the caller is ippi.com as the caller, and to call in from Skype, you add the poxy as a contact, then when connecting to the proxy, the caller is sent a text that needs to be replyed to with the "SIP extension" you are calling, so it does not support Skype directly. The caller needs two pieces of information to contact you, the Skype to ippi friend, then your sip user ID. For example if I used my slashdot handle, which I don't, my SIP address would be sip:technician@ippi.fr. The Skype caller would need to call the gateway Skype2ippi and then respond to the automated text and enter technician to ring my SIP phone.

    Outgoing calls are simpler. I enter the full gateway/skype string into the speed dial settings on IPPI, so to call one of my friends, I just pick up the phone and speed dial them. IPPI speed dialer uses 2 digit speed dialing so you can save 99 contacts.

    This works great with either a SIP softphone, or a hardware device such as an ATA and analog phone or an IP phone such as one of the Grandstream models.

    The service does not provide video, only an audio connection.

    --
    The truth shall set you free!