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,...
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.
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.
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
Damn right it did!
Right after you moved the jumper to change the address because of a conflict with your printer, moved the jumper to change the IRQ because of a conflict with your modem and moved the jumper to change the DMA because of a conflict with your HDD controller.
Get free satoshi (Bitcoin) and Dogecoins
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.
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).
Yeah, but the fact that you have to mess with and configure each component individually and manage all the dependencies yourself means you know what is going on rather than have some magic uber-daemon figure out what it thinks you want and then do something, but you have no idea what it actually did when it goes wrong.
[or is that systemd, i forget...]
A few posts down, there is a suggested fix. It seems this is a known bug.
libreoffice.org/bugzilla/show_bug.cgi?id=59217
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!
This is a known bug that has already been fixed. You should complain to whoever maintains the Debian package to include the patch.