Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Open Source Debian

Ask Slashdot: Stop PulseAudio From Changing Sound Settings? 286

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.]
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Stop PulseAudio From Changing Sound Settings?

Comments Filter:
  • by Selur ( 2745445 ) on Saturday October 18, 2014 @12:35PM (#48176197)

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

    • by Anonymous Coward on Saturday October 18, 2014 @12:40PM (#48176231)

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

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

        • by Anonymous Coward on Saturday October 18, 2014 @01:20PM (#48176413)

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

          • Re: (Score:3, Funny)

            by Anonymous Coward

            I found the Poettering!

          • by Khyber ( 864651 ) <> on Saturday October 18, 2014 @07:54PM (#48178111) Homepage Journal

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

        • by Anon E. Muss ( 808473 ) on Saturday October 18, 2014 @01:34PM (#48176459)

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

          • What you want is a system that can be configured how you want it, not OSs that are hardwired to work one way or another that cannot be changed. There is no reason why Unix should be good at one thing and Windows good at another if the user can configure it to work the way they want and run just the services they need, but where the service they need is available if they need it. we need to get away from this "can't have vs. can have and must run" mentality. How about "can have and run only if you want".

            • How about "can have and run only if you want".

              No, because to do so every program needs to support 2^n different configurations, where n is the number of services they could potentially make use of. Most developers aren't going to bother, so in practice you either run a set of services or don't run the program. And at that point it makes sense to define a standard set which a program can expect a server or desktop to have.

              • by Khyber ( 864651 )

                "No, because to do so every program needs to support 2^n different configurations, where n is the number of services they could potentially make use of."

                And this is why we have LIBRARIES.

                Fuck, even the most basic MUCK server has the ability to program in MUF/MPI (and some have even added in Python libraries for more extensibility.)

            • With the way systemd has consumed other projects - like udev - and has become a required dependency of others - ISTR that this is true of at least one part of Gnome as of Gnome 3.14 (oddly said part does not, AFAIK, have a non-systemd counterpart even though it possibly could) - the ability to choose a different init for Linux is becoming restricted.

              In truth there is an idea I saw somewhere on the net in the last couple of months about a way to fix a lot of the problems - percieved or otherwise - with syste

              • From what I understand of systemd is that you can still set it to spawn your own init system, whether they be shell scripts or a more tradtional init program and then configure that to run your programs. All you need to do is disable the services from starting from systemd and then configure systemd to start your own init script to start your stuff. Problem solved.

                • by dshadowwolf ( 1132457 ) <> on Saturday October 18, 2014 @05:29PM (#48177559)

                  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.

                • But, why can't I just rip out systemd? Oh - because so many service projects/distros are only supporting systemd today that you have to have it around if anything you download in the distro happens to use the API of the non-POSIX POS that is systemd.

                  systemd core files are not written to disk as files - they are written to the binary log file - you have to extract the data first to run debug.

                  systemd log files are binary; you can't run grep or other text parsing tools against it for automation - unless

        • by Anonymous Coward

          Sounds like a Skype issue with arrogant / crappy MS programmers adjusting the sys volume in response to ambiant noise. Just a guess, but wouldn't surprise me. Find something better / safer / more secure than Skype.

      • by Jawnn ( 445279 )

        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?

        Well... in this case, not so much. When it comes to audio support the linux landscape is a minefield of poorly documented, often unstable crap with poor interoperability. In other words, most of it is shit. None of it works well without considerable tweaking, after spending far to much time and effort running down solutions in those support forums. Don't get me wrong. I make my living running linux boxen. I am also a semi-serious audiophile and would love to use linux in that pursuit as well. Can't do it.

      • that it dose
        i was one of the FIRST people to use pulse in fedora 6
        now back then there were issues

        Almost 10 years have past and those issues are no more

        pulse on it's own WILL NOT JUST CHANG SETTINGS

    • Perhaps they can try this new web site called google.
    • Re: (Score:3, Informative)

      by cgdae ( 996476 )

      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

      • Have you tried using pulseaudio just for skype? like identifying which libraries gets used, put them in (folder), starting manually the pulseaudio daemon if there is one, and invoke skype from terminal prefixing it with LD_LIBRARY_PATH=(folder)?
        Failing that, I had 32 bit skype in a chroot because the rest of the system was 64 it worked. One day it keep failing authorization, and then i got an email telling me i was using an outdated skype version. That must be the microsoft way.

      • I up-voted this in the firehose because sound is still a problem. As are disappearing sound settings. Ignore the noise (pun intended :-)
  • Editor Troll (Score:5, Insightful)

    by twistedcubic ( 577194 ) on Saturday October 18, 2014 @12:35PM (#48176205)
    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.
    • Editor Troll (Score:4, Interesting)

      by Anonymous Coward on Saturday October 18, 2014 @12:40PM (#48176235)

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

      • Re:Editor Troll (Score:5, Insightful)

        by Aighearach ( 97333 ) on Saturday October 18, 2014 @02:16PM (#48176693) Homepage

        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!

      • Re: (Score:2, Informative)

        by Anonymous Coward

        I usually start by deinstalling pulseaudio. Fixes the problems every time.

    • Re:Editor Troll (Score:5, Insightful)

      by dshadowwolf ( 1132457 ) <> on Saturday October 18, 2014 @01:00PM (#48176323)

      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)

      • Re:Editor Troll (Score:5, Insightful)

        by sjames ( 1099 ) on Saturday October 18, 2014 @01:34PM (#48176461) Homepage Journal

        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?

        • As far as I know, Pulse Audio is the only other major project that Lennart Poettering has been the lead developer for that has been shown to be broken in major ways for any length of time. Another of his projects is Avahi, which appears to work perfectly and not have any major problems. To point at his decision with PulseAudio to try and mimic the MacOS and Windows sound systems - and the repeated breakages introduced by that code until quite late in its lifetime (and after it's functionality was no longer

          • Re:Editor Troll (Score:4, Insightful)

            by sjames ( 1099 ) on Saturday October 18, 2014 @06:35PM (#48177775) Homepage Journal

            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.

    • by cobbaut ( 232092 )

      Maybe, but it is a persistent and annoying problem.
      Whenever I unplug the audio, all sound is gone until i start xfce4-mixer and enable sound again. (Retina Macbook with Debian) A solution would be welcome.

    • Re:Editor Troll (Score:4, Insightful)

      by Rich0 ( 548339 ) on Saturday October 18, 2014 @01:32PM (#48176449) Homepage

      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.

      • Re:Editor Troll (Score:5, Informative)

        by Aighearach ( 97333 ) on Saturday October 18, 2014 @02:20PM (#48176727) Homepage

        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.

        • Re:Editor Troll (Score:5, Informative)

          by Anonymous Coward on Saturday October 18, 2014 @05:20PM (#48177527)

          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:

;a=commit;h=de7c3eff0e371ce155403bbcdcf81ee79266fa0f (note author lol)

          And this is the patch that fixed it:


    • It is not a troll. The term "troll" is an abused and meaningless term and without really any identifiable meaning anymore except one that is entirely subjective. You assume that if someone posts something that you disagree with that automatically it means that they are just trying to make a strike at you, when in fact its most likely that its an honestly held position. Maybe the initial meaning of the term troll was a message posted with opinions that are not honestly held by the poster, the problem is you

  • Feature not a bug (Score:3, Informative)

    by Anonymous Coward on Saturday October 18, 2014 @12:40PM (#48176233)

    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.

    • Can you turn it off? No? Bug.

      Assuming you know better than a user (when it comes to output) is always a bug.

    • by sjames ( 1099 )

      It doesn't seem like that is it. He plugs in headphones, volume goes away. He sets volume to something reasonable. That reasonable settinmg SHOULD then be considered the last master volume setting he had when the headphones were plugged in, but apparently that doesn't happen.

      • by dargaud ( 518470 )
        I have no idea what 'master' is even supposed to mean. Since the device that is in use is actually selected in the [Audio settings][Device Preference], what is the point of having a 'master' ?
        • by Qzukk ( 229616 )

          I have no idea what 'master' is even supposed to mean.

          Once upon a time when ye were but a wee lad, we had sound cards with multiple channels for cd audio, midi output, wav output and so on. Legends say some cards even had separate controls for left and right speakers, and many a story was told of people who heard ghostly music through one speaker as if they were only hearing half of the song.

          Back then, you could adjust those channels separately or use the "master volume control" to set all of them at once.

          • by Khyber ( 864651 )

            Ah, good old ISA sound cards. Potentiometers for volume control. REAL power amps on-board.

            Sound cards today suck.

    • by Khyber ( 864651 )

      " Every other OS does this as well."

      I can assure you Windows sure does not from 95-Win 7. Not even the intelligent RealTek drivers with jack-sensing do that.

  • X201 same issue.
    • I have used a T61p, a T400 and am now using a T510 - all have had PulseAudio installed because of Skype or another program that required it. I have not had a problem with it on these systems at all. All three of those ran OpenSUSE 12.3, Fedora 19 or Fedora 20. The problem here might be that the hardware does things that Pulse doesn't expect, which throws off whatever heuristics or simple selection code PA might be using. I know that with the Dell Inspiron 1420 I had about 7 years ago there was an issue wher

  • by ihtoit ( 3393327 ) on Saturday October 18, 2014 @12:49PM (#48176269)

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

  • by goruka ( 1721094 ) on Saturday October 18, 2014 @12:59PM (#48176317)
    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.
    • They made alsa so they would not be used as free bug testers and squashers like they did when the OSS sound system was in the kernel.

      • They made alsa so they would not be used as free bug testers and squashers like they did when the OSS sound system was in the kernel.

        Oh the hypocrisy.

        "Free bug testers and squashers" - that is exactly what the user community is for every OSS project, ever.

        See what I did there?

        • The difference is that the company behind OSS was using them so they did not have to pay a cent and then turn around and sell the result to customers of UNIX and BSD as a complete drop in sound system.
          And at the same time try to get linux users to pay them for using it.

    • Its only major fault was that it was one-process-at-a-time but that would have - IMO - been pretty easy to fix. But instead they came up with the non portable (to other versions of unix) dogs dinner called ALSA. Christ, trying to program with that API is like trying to cycle with your legs tied around your head. It works - just - but it could have been made a LOT simpler.

      Personally I think X windows should manage sounds as well as video allowing networked sound apps and there should be just a single sound A

    • Re: (Score:2, Insightful)

      by Anonymous Coward

      This FUD needs to stop. PulseAudio is not for low latency audio and never was. Further, low-latency in usespace audio has been brilliantly worked out for nearly a decade now with the Jack daemon (JACKd). That this has been "kicked to userspace" by the kernel devs is a non-statement: it *does* belong in userspace and intelligently engineered systems, with low-latency in mind, work beautifully from userspace.

      Please do not attack the kernel.

      • And so if you want both generic audio and low latency audio you need TWO sound systems on top of a THIRD one and at least two of them (Pulseaudio, ALSA) are configured by editing empty or semi-empty config files on the command line.
        All so that maybe (not sure if that configuration is easily possible or makes sense) an ALSA application sends sounds to Pulseaudio (which emulates ALSA), which outputs to Jack which pipes it to ALSA.

        I'm not necessarily against all that stuff but distros should support configurat

  • I think the PA gui control programs are the biggest issue, Pavucontrol and the other tools are just utterly confusing and obtuse. Typical developer designed UI paradigm, make a widget for each configuration parameter instead of thinking through the use cases and constructing some abstractions that make sense to the user and not the developer. Once the configuration is properly presented and a task-oriented UI is constructed around that I don't think PA will give people so many issues. There are a lot of nea

    • You can do neat things but they require writing hardly discoverable crap in a configuration file. E.g. I was delighted to be able to get an optional downmixing from stereo to mono, which I wanted for years (be it on Windows, ALSA, ALSA + pulseaudio, or as a hardware feature - the latter can be found on 1970s amps).
      But you have to scrounge the web then write this in the adequate place in the file system : "load-module module-remap-sink master=alsa_output.pci-0000_04_04.0.analog-stereo sink_name=mono channels

      • Yeah, I'm still trying to figure out how to record a Skype call. I'm sure its perfectly straightforward for any of the PA developers. I just haven't even been able to wrap my head around their terminology and concepts.

        • Simply launching Audacity and picking the right "input" allowed me to capture the same sound that pulseaudio sends to speakers.
          Possibly a second Audacity instance can be used to record what enters the PC through microphone. Then investigate using two simultaneous tracks in Audacity. Would that be working and good enough?

  • by Anonymous Coward on Saturday October 18, 2014 @01:13PM (#48176393)

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

  • I dislike that pulseaudio doesn't set its volume at what was the last value, when I boot and autologin to my desktop. The sound control applet (or is it a tray icon) does remember, but it registers after twiddling it up or down.
    As I use an amplifier at 100% volume and Alsamixer is set at -2dB that result in very loud sound coming from the music player or video player etc. if I forget about it. Fortunately the amp is low powered and 2x12 watts so I guess the sound comes out at around 100 decibels only. Would

  • A few posts down, there is a suggested fix. It seems this is a known bug.

  • Entirely unrelated - are you using the 8188ce wifi card in this? Or did you switch to the Intel card? I find wifi on my x220 will continually die and need to toggle the radio switch to restart it.
  • And if you throw buetooth speakers into the mix it turns into a complete nightmare that only a reboot can fix. Sometimes.
  • I ran into that same problem with Skype's latest release. Rather than giving Pulse a fourth chance to burn me, I decided it might be time to give WebRTC a try.

    I'm so glad I did. OS-independent browser-to-browser video chat worked fine. I used Chromium on linux while my friend used Chrome on OSX. The latest Firefox release supposedly supports h.264, so it might work as well. Here are a couple of call set-up sites in case you'd like to try it for yourself: [] []

  • sudo apt-get remove pulseaudio

    It'll never touch your settings again!

    Also, it's incredibly poorly designed, and they won't take patches that fix things.

  • Already fixed (Score:4, Informative)

    by Tester ( 591 ) <olivier.crete@oc ... inus threevowels> on Saturday October 18, 2014 @08:19PM (#48178191) Homepage

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

  • PulseAudio is a piece of crap. Uninstall it, uninstall Skype, and use something else like Ekiga. Don't let a minor pissant program like Skype pull in the SystemD of audio.

  • This sounds like an interrupt conflict. If the USB device and audio device share the interrupt and (because of hardware misconfiguratin) pluging in/out of usb causes sound device's interrupt handler to run, it could be reading garbage data and using it as the new config settings.

Man is an animal that makes bargains: no other animal does this-- no dog exchanges bones with another. -- Adam Smith