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.]
[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.]
Sounds more like a question for a support forum than for slashdot,...
wow slashdot? - slow news day?
Ok - how was that for a sarcastic frist p0st
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.
I have the same problem with a Leonov0 T420, fvwm, kernel 3.16x, Fedora, but usually all I need to do is select the proper output device to get sound back.
$ pulseaudio --kill
There, that ought to do it.
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.
It's a pretty good example of the half assed work. Seems a reasonable place to start.
X201 same issue.
pulseaudio -k
I remember those heady days. Sound just worked.
Or Google the problem. Though, since MS is paying for this Slashdot puff-piece, maybe we should give them their money's worth?
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
Lennart a Microsoft plant.
Any way to make pusle audio to remember the last configuration profile selection. Does it work for you? My pulse audio forgets it after each restart.
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.
The problem here is not Pulseaudio.
The problem here is Skype. Get rid of Skype. Problem solved.
Unfortunately there isn't a -1 Stupid.
I run a consumer notebook with E450 APU inside. My Fedora 20 setup can barely handle pulseaudio. It stutters, sound gets out of sync, halts, high cpu usage. I googled for the sympthoms and found something to change a setting inside pulseaudio.conf which I did. Most issues are gone, sadly the stuttering and cpu usage is still there. Never had that with ALSA only.
This'll keep it from muting and unmuting random channels (a problem I tend to have on Ubuntu systems with Pulseaudio, less so on others). It's got some weird side effects in terms of muting channels at boot on one system I've tried it on, so...
In /etc/pulse/default.pa , comment out the line (by adding a '#' symbol in front of it)
"load-module module-switch-on-port-available".
Is this a technical support article on /.?
"If any question why we died, Tell them because our fathers lied."
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 neat things you CAN do with it, IF you can figure out how. Its just that no mortal human (myself included) can make heads nor tails of the frikking thing.
"Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
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).
This is *not* news for nerds, or stuff that matters. Take this question to a tech forum. Get it off the damn news site.
Timothy, what has gotten into you? You're making this site suck more and more every day.
Please stop.
You need to use SystemD with that...
If it were a Linux user he/she would already know where to post this question and/or get the answer. Pulseaudio does not have this problem anyway.
Since when is this TechSupportDot?
Have some hot grits down your pants.
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 be fun to try a dB meter to know exactly
Maybe its time to review the whole audio stack, everything from the Kernel to user land UI.
It seems to me that there are a lot of audio issues in Linux, everything from low legacy to complex UI issues. I know that if you want to do advanced things you need to install something like Jack Audio, but why? Why cant Linux have a really good state of the art sound api and applications?
If you look at the Mac, it has extremely easy UI (weird name, Audio MIDI Setup), but at the same time, professional auto software is written for it, and you see it everywhere. Its kind of become the defacto standard for audio people. You have to ask the question, why? Why cant Linux do the same?
Users want skype - but not the pulseaudiuo that skype now requires. The long term solution is to get skype developers to drop the unnecessary pulseaudio.
The solution that works today:
1. Set up jack & ALSA to create a virtual soundcard that is sw-mixed into your real soundcard. Not "easy", but doable. Talk to jack experts on various linux audio forums - they sometimes do this sort of stuff for other reasons.
2. Set up pulseaudio to (mis)manage the virtual soundcard - not the real one. Not that hard, pulseaudio is not confused by a machine that has several soundcards. The fact that the other is "fake" is of no consequence.
After this, skype sound will be routed through pulseaudio and into alsa - and from there to jack and the real soundcard. If pulseaudio messes up anything, only skype will be affected. The rest of your system will run without pulseaudio interference.
1) Unintsall PulseAudio
2) Mail a box of your own feces to Lennart Poettering
The new version of Skype isn't strictly necessary to log in to Skype, you can check the "log me in when Skype starts" box and then go back to the previous Skype version. For that matter, you could use Mumble, Ekiga, or some other system that actually gives you choice. Why upend your sound system just because Microsoft has decided to break their token Linux client for Skype? Pulseaudio has always been a mess, and ALSA is doing all the real work anyway, so why bother with PA? The new version of Skype is literally the only application I've ever encountered that requires it. You can even set up features like voice effects and recording, that one might have used Pulseaudio or Jack for otherwise, under bare ALSA using the asoundrc file.
Few days ago i came across a new package called 'apulse' that emulates pulseaudio. You could try that.
A few posts down, there is a suggested fix. It seems this is a known bug.
libreoffice.org/bugzilla/show_bug.cgi?id=59217
I was a tepid Ubuntu user between Edgy and Hoary. Eventually I got bored with spending days fixing PulseAudio settings after every 6 month upgrade and went back to Windows. A couple of years ago I hopped back on the Linux bus (via Mint Maya Mate).
Touch wood, PulseAudio is now as invisible as it always should have been. It still imposes restrictions on things it shouldn't touch (want your home directory on an NTFS partition? Tough), but it no longer falls flat on its face over the most basic part of its duties (just play the f**king sound damnit).
I hope systemd matures more quickly.
P.S. Not pointing fingers, but Palimpsest also sucked last time I was obliged to use it.
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.
Non-Linux Penguins ?
see http://superuser.com/a/816072
Use mumble for voice chat. Its free and its not spyware.
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 API across all versions of unix.
whenever you do those actions you mentioned in the original post, an ACPI event is created and there is a chance some scripts are executed. Check google for how this works. The solution is you either modify the existing scripts so that they stop doing whatever it is that you don't like, or create your own scripts.
Linux has always had this problem, even with server stuff. I don't know what you've been using all this time...
also, what's with the "wHish" ?
You are looking for padevchooser I guess
This is a bug which was fixed back in January: http://mailman.alsa-project.org/pipermail/alsa-devel/2014-January/071156.html
This has absolutely nothing to do with pulseaudio by the way, since the volumes are set by alsa and udev. It is still Lennart's fault though, because he wrote the udev support patch for alsa, and then didn't update it when udev rule syntax was changed.
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:
https://opentokrtc.com/
https://vline.com/
... you already did smear him in a parenthetical comment -- in which, btw, you claimed to not want to smear him. Please fuck off.
(No, I won't be logging in anymore since the recent "Ask Florian Müller".)
Very interesting that you note sound devices being a userspace issue, when it really has to do with hardware, device, kernel drivers etc. Sure.. USB brings this devices to userland as well, but if its handled properly in kernel land, hooks could provide some control into Userland. I used to compile (2.4) kernels and work in bttv, tda, emu10k and so for TV and sound cards and it just worked (a lot of it, but it was predictable!). Then I stopped compiling my own kernels and tried to do it in /etc/modprobe.conf, but that got crazy between kernel updates and Pulse and Alsa and OSS getting all blurry. So much for history. Where are we now, years later? Does a lInux desktop user have to dabble in /etc/modprobe.conf ? Doesnt make much sense to me. From working with Udev under RH6 at work, udev is working predictably with ethernet devices, seems a valid model. How about we start with a soundconfig utility that captures a systems setup at that moment, and spits out a consistent lattice work of device configurations. Users dont care about /dev/dsp01, or incomplete mixer apps, we just want sound to work.
Time for a new Political party in the US (or two!) One is off the rails Other cant pony up a leader.
...from being installed. Seriously, if I wanted easy audio and midi, there is and always was ALSA. If I wanted something more advanced with routing and shit, there is JACK. Reading just the article summary should give you enough reasons to avoid this failed attempt at linux sound. PulseAudio feels like the Systemd of linux sound. Oh wait...
Captcha: unionise, lol.
Since exactly when is Skype FOSS?
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!
If only my Mac could match that ease of use and power!
Nuff said.
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.
While it is not actually a virus, seriously the best solution for Pulse Audio is to remove it. Once I had extracted it my sound system not only worked but used fewer resources. It is more difficult today then when I first did it but it is not a big effort all in all.
Many of the services started by the recent Fedora distributions have no purpose for a desktop user. It would seem that their developers all use laptops while wandering around from network to network. Typing furiously no doubt. Shut down blue tooth services, wireless and the dreaded pulse audio.
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.
vi ~/.emacs # I'm probably going to Hell for this.
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.
Any guest worker system is indistinguishable from indentured servitude.
I wonder if your laptop is one of those that makes the sound system disappear when there is nothing plugged into the jacks. Seems like that would make it hard for pulseaudio to keep its senses.
Now that gnome and maybe the kernel require systemd, how soon will it be before systemd requires pulseaudio, just because?
This is the main reason why I use Windows 7. After 15 years of struggling with different flavours of Linux I had it enough. Every good working thing in Linux was eventually dismantled in order to be rewritten from scratch, because it was not pedantically well written and in all cases the new piece of software was worse and previously existing functionality was no longer there. It has always concerned video and audio which are the basic ingredients of any successful operating system.
put an adaptor in your audio jack that will stop the computer from knowing there are headphones being plugged in and out. Problem solved.
Thank you for demonstrating why using something other than Skype itself is not a feasible solution for the average user.
It is dangerous to be right when the government is wrong.
Oh my god I'm not the only one with this annoying problem!!
The only programs that I have encountered that don't work well with alsa without the need for a sound system on top of alsa are the ones with project leads that purposefully don't follow ALSA documentation.
I apologize for my lack of comprehension, and I am not trying to be a grammar Nazi, but I have a great deal of difficulty underdstanding this statement. I really did try; even to the point of doing tree graphs and venn diagrams of the sentence.
What I get is: Projects with leads who don't follow ALSA documentation are projects which don't need additional sound systems, and yet still don't work well with ALSA. (therefore maybe they DO need an additional sound system?)
or
The programs which don't work well with ALSA are the ones which don't have a sound systems on top, because the leads aren't following documentation.
Either way, I get that one needs to follow documentation and put a sound system on top. Is that what you intended?
or did you want to say that if you follow ALSA documentation, extra layers will not be required? (From context I expect the latter, but I can't get my brain to graph it that way.)
McFly777
- - -
"What do people mean when they say the computer went down on them?" -Marilyn Pittman
Why the fuck would you want to? That's retarded.
Friends don't let friends use Poetterware
I've done everything in my reach (even asked in the pulseaudio mailing list) about that issue. All the suggestions that worked for other people did not work for me.
I finally realised that, as people have been saying for the past 7 years, pulseaudio is unusable. I migrated from Skype to Google Hangouts (which loses absolutely nothing in functionality). I use skype to text people, but for video calls, I only use Google Hangouts.
Funfact: Videoconferences are free on Hangouts. Also, its way faster, less buggy and higher quality audio and video stream.
tl;dr Skype is increasingly sucky, runaway from it. Pulseaudio has always been bad and will remain bad for the next 5 years. Run away from it.