[pulseaudio-discuss] Problem with switch-on-connect

Tanu Kaskinen tanuk at iki.fi
Wed Feb 3 19:45:45 PST 2016


On Thu, 2016-02-04 at 00:03 +0300, Nikolay Amiantov wrote:
> Hi all,
> 
> I have a laptop with an internal audio output device and wireless
> headphones with a USB dongle which registers itself as an another
> device. I want fallback device and all current and future audio streams
> to automatically switch to headphones when I plug them in. From reading
> manuals, it seems I need combination of two modules:
> 
> * module-switch-on-connect to switch all current streams and fallback
> device to the new one on connect;
> * module-stream-restore restore_device=false to forget all device
> settings, so all new streams are connected to the fallback device, which
> should be headphones.
> 
> Alas, it doesn't work for me -- on connection the fallback device is
> switched, but not current streams neither future ones. If I kill
> pulseaudio and clear ~/.config/pulse things seem to work correctly for
> some time, but stop after that! I haven't yet been able to understand
> exactly what is needed to happen for this to stop working.
> 
> Any ideas what should I do? Thanks in advance!
> 
> I use pulseaudio 7.1 on NixOS (a Linux distribution).
> My configuration file:
> https://github.com/abbradar/dotfiles/blob/master/default.pa

Do you use KDE? If you load module-stream-restore with
restore_device=false, and the fallback sink is set correctly, the only
reason I can think of why streams would not go to the fallback sink is
that module-device-manager is loaded. The module is not in default.pa,
but start-pulseaudio-x11 loads it when run as part of KDE session
initialization, and I think KMix might load it too if not already
loaded. When things don't work, does "pactl list modules" show module-
device-manager?

-- 
Tanu


More information about the pulseaudio-discuss mailing list