Hallo,
ich besitze ein schönes Funkheadset (HyperX Cloud II Wireless), welches ich glücklicherweise am Handy wie am Computer wie am Notebook betreiben kann. Deswegen nehme ich dieses auch sehr gerne überall hin mit. Brauch ja nur noch eins.
Leider habe ich das Problem bei mir unter Manjaro und pulseaudio, dass sich eben das Default-Audiogerät umstellt beim Ausstecken auf was beliebig anderes (in meinem Fall der HDMI meiner Graka) und dann nicht wieder zurückstellt. Das habe ich einige Wochen mitgespielt, jetzt aber doch entschlossen, herauszufinden, was da vor sich geht.
https://wiki.archlinux.org/title/PulseAudio#Switch_on_connect
Mein erster Blick ins ArchWiki, welches mir üblicherweise die Lösung schon anbietet oder mir wenigstens Stichworte liefert, redet von einem misteriösen Switch on connect-Feature von PA, welches eigentlich von Haus aus schon laufen sollte. Gut, mal googlen, ist vielleicht einfach doch nicht so aktiv wie gedacht.
https://askubuntu.com/questions/158241/automatically-change-sound-input-output-device
So leicht kann es doch nicht sein? Anscheinend schon: Die Ausgabe von
$ pactl list short modules
ergibt, dass module-switch-on-port-available geladen ist, module-switch-on-connect aber nicht. Kurzerhand korrigiert per Anleitung mit
$ pactl load-module module-switch-on-connect
und schwupps, funktioniert schon. Krass :O
Jedenfalls tritt hier dann bei mir noch das andere Problem auf, dass im ArchWiki beschrieben wird, nämlich dass die Lautstärke nach dem Anschließen auf 0% geregelt wird. Das ist dann aber zu beheben durch:
$ pactl unload-module module-switch-on-port-available
Schließlich (nach eingehenden Tests) kann man das ganze persistieren in der ~/.config/pulse/default.pa
(einfach genauso eintragen wie weiter oben in der Shell, bloß ohne das pactl davor)
English version
Hello,
I own a nice wireless headset (HyperX Cloud II Wireless), which I can fortunately operate on the cell phone as on the computer as on the notebook. Therefore, I take this also very happy everywhere. Need only one more.
Unfortunately, I have the problem with me under Manjaro and pulseaudio that just the default audio device changes when unplugged to what arbitrarily different (in my case the HDMI of my Graka) and then does not reset. I played along with this for a few weeks, but now decided to find out what was going on.
https://wiki.archlinux.org/title/PulseAudio#Switch_on_connect
My first look at ArchWiki, which usually already offers me the solution or at least gives me keywords, talks about a mysterious switch on connect feature of PA, which should actually already be running by default. Well, google it, maybe it's just not as active as I thought.
https://askubuntu.com/questions/158241/automatically-change-sound-input-output-device
It can't be that easy, can it? Apparently it is: The output of
$ pactl list short modules
shows that module-switch-on-port-available is loaded, but module-switch-on-connect is not. Without further ado corrected per instruction with
$ pactl load-module module-switch-on-connect
and poof, it works already. Crass :O
Anyway, the other problem that is described in the ArchWiki occurs here, namely that the volume is set to 0% after connecting. But this can be fixed by:
$ pactl unload-module module-switch-on-port-available
Finally (after thorough testing) you can persist the whole thing in ~/.config/pulse/default.pa
(just enter the same as above in the shell, but without the pactl in front of it)