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.]

30 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 dshadowwolf · · Score: 3

      Nah, I've had similar problems with PulseAudio in the past. Sometimes it's a vendor configuration issue and sometimes it's just that Pulse tries to be smart and fails at it. When I have no need for PA (never, these days, since it is required by Skype) I don't install it because of those problems I've had in the past. Lately I've been using Fedora 19 and Fedora 20 and have not had a problem. Nor have I had a problem with it running a recent OpenSUSE or an "alternative" distribution like Sabayon.

      Calling someone asking a question like this a "smear campaign" against Linux - or, as another commenter has done, a "smear campaign agaisnt Lennart Poettering", well... I have a philosophical disagreement with Mr. Poettering over how systemd is consuming all kinds of other projects in the name of faster boot times. But I will not attempt to smear him, except to say that the way systemd has turned into something similar to the bloated beast that is the Windows 'svchost.exe' makes me think that the age of the classic Unix "do one thing and do it well" is over in Linux-land.

    4. 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...

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

      I found the Poettering!

    6. Re:are the debian support forums down? by Anon+E.+Muss · · Score: 3, Informative

      ... the way systemd has turned into something similar to the bloated beast that is the Windows 'svchost.exe' ...

      +1 to the anti-systemd sentiment.

      -1 to using svchost.exe to make your case. svchost is just a container process. The real issue is the Windows architecture/philosophy that encourages a proliferation of services.

      (I like Unix and I like Windows. Each has their place. Trying to turn one into the other is a big mistake.)

      --
      The key sequence to access my Slashdot bookmark in Firefox is Alt-B-S. I don't believe this is a coincidence.
    7. 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!

    8. Re:are the debian support forums down? by cgdae · · Score: 3, Informative

      Apologies if people think i shouldn't have posted this question to slashdot. I did a fair amount of googling to try to figure things out, to no avail. I didn't know whether my sound problems were caused by Debian or PulseAudio, so i figured Slashdot would cover both bases.

      Aside from wanting to find a fix for my audio problems, i think the issue of Skype requiring a particular sound library is worthy of discussion on slashdot, as it the general UI issue of whether 'clever' behaviour should be easy to disable.

      Oh, and i'm most definitely not a Microsoft troll, e.g. my day job involves working on some fairly hard-core linux debugging software.

      --
      http://op59.net/
    9. 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."
    10. Re:are the debian support forums down? by ColaMan · · Score: 3

      Hi there, Tox pusher. Did you not even read the very first few sentences he posted? The one that said :
      I use Skype because for $15/m I can have unlimitted calling to local numbers in Thailand, from the US. And can make unlimitted US calls, too. Outbound only, inbound costs extra. I have it for my wife.

      So you like Tox. That's great. It doesn't have all the features of Skype. Some of that is good (one-click government eavesdropping) some of that is bad (POTS integration). And yes, one of the 'features' of Skype is the fact that it's got a very large user base. So you're not just convincing Grandma to swap over, you need to convince Grandma's friends that she also talks to, and so on and so forth. And they just don't see the need for 'secure encrypted communication that only they have the keys to'. They're just (mostly) talking shit and waving to each other.

      Open your eyes a bit and admit those problems, and people will start taking your opinion more seriously. Tox may be a solution for you (and maybe me, it looks interesting), but it's not a solution for the masses, because they already have an adequate solution.

      --

      You are in a twisty maze of processor lines, all alike.
      There is a lot of hype here.
    11. Re: are the debian support forums down? by dshadowwolf · · Score: 3, Insightful

      And why, if its not doing what it was created to do, then, would I keep it around at all? This type of "you can do what you want, but it needs to be this way" crap is why I've stepped out of most online and open-source communities. I can see the "this is how it's done" type of thing for electronics - most of the time there is only one way to do something in electronics...

      You know what, fuck it - I'm spending too much time discussing this and not enough time working on the API wrapper-layer I need to create for some paying work. I'll check back Sunday or Monday.

    12. Re:are the debian support forums down? by Khyber · · Score: 3, Informative

      "Pulseaudio was a royal PITA until about 5 years ago. By then the kinks have been worked out and it works rather well."

      Nope, still fails for me on a modern dual-core 64-bit system.

      " The only thing worse than Pulseadudio was the cruft that it replaced."

      Not even close. OSS worked more reliably and still does.

      " People who still complain about it either have very weird hardware or run old systems and just like to complain about old things..."

      2012 laptop. 1.6GHz 64-bit dual core, 8GB RAM, 6-channel surround through optical, typical RealTek. Not even close to weird or old.

      I've been using Linux since 1998. PulseAudio is a piece of shit, period. I can't even unplug my headphones without having to reset three volume/audio options to make my speakers output.

      Pulseaudio can't even do ASIO properly. It's a broken piece of crap.

      --
      Still waiting on Serviscope_minor to wake up to fucking reality and realize that Jessica Price isn't going to fuck him.
  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 sjames · · Score: 3, Informative

      Most people who care at all about audio kill off PA. ALSA handles it much better by itself. I killed off PA when I got tired of having all video I watched look like the dubbed martial arts movies where the lips and the audio have nothing to do with each other.

      You might be surprised to learn that many people don't install PA at all and things work just fine.

    7. 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

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

      He was a co-developer on Avahi and was implementing an already defined API. For the most part though, Avahi just handles the hostname resolution which is a small project. It may (or may not) be capable of more but I have never seen anything more used in practice.

      Systemd more closely resembles pulseaudio in scope. I doubt there would be many complaints about pulseaudio if it was only used for the system beep.

      System init is much too important to risk on that track record without some really good evidence of a strong design. The hairball dependency tree suggests this is heading in the pulseaudio direction, not the avahi direction.

    9. Re:Editor Troll by Randle_Revar · · Score: 3, Informative

      >PulseAudio was great when ALSA didn't exist,

      ALSA not only existed, but was the standard in Linux for years before PA (then PolypAudio) was created.

      ALSA - 1998
      ALSA as default - 2003 (2.6.0)
      PA 0.9 - 2006
      PA default in Ubuntu - 2008

  3. Feature not a bug by Anonymous Coward · · Score: 3, Informative

    Its just returning to the last master volume setting you had when the headphones were plugged in. You should be seeing Master change between two values when you switch, just adjust that of you want to change it. Every other OS does this as well.

    If you aren't seeing that intended behavior then go report it to Debian not Slashdot.

  4. 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.

  5. Get thee back under that bridge by ihtoit · · Score: 3, Interesting

    PDNFTT. ...and to the OP: try posting in the correct forum. Hint: it isn't Slashdot.

    --
    Political debates have me rolling my eyes so much I think I got optical whiplash. I should sue. - Foamy The Squirrel
  6. 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.

  7. 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).

  8. 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!
  9. Already fixed by Tester · · Score: 3, Informative

    This is a known bug that has already been fixed. You should complain to whoever maintains the Debian package to include the patch.