You are not logged in.
Ever since the replacement of pulseaudio by pipewire, the output device port setting is not retained over logins. I have one sound device which has, according to pavucontrol, two ports: Speakers (which are the laptop's built-in speakers) and Headphones (which is the laptop's combo jack). I want this set to Headphones. I set it in pavucontrol and it works. However, whenever I log in again, including the "login" when returning from locked screen, this changes back to Speakers and I have to manually go to pavucontrol and switch back to Headphones. This also happens when a condenser mic (which has its own batteries) that is already connected is turned on by its own switch.
The "Headphones" port is marked as unplugged although the jack is firmly plugged in and the output works just fine. I had other problems regarding the single combo jack my laptop has. I had to use hdajackretask to make the external mic work but this was so much long ago I don't remember the details.
I'm running GNOME 40.0.
I would be very glad if someone could help me resolve this issue. It's not at all critical but extremely annoying.
Last edited by zegkljan (2021-07-28 05:58:52)
Offline
I did not upgraded since 2 weeks, has pipewire forcedly replaced pulseaudio?
If not, why don't just stick with pulseaudio?
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
I did not upgraded since 2 weeks, has pipewire forcedly replaced pulseaudio?
If not, why don't just stick with pulseaudio?
While a viable solution, I'd rather fix the issue than run away. It should work, so I'd like to make it work. Maybe it is a manifestation of a bug in pipewire(-pulse) discovering of which might help the developers make the thing better. Or it might help someone else struggling with the same issue that for some reason cannot revert back to pulseaudio.
Offline
pipewire is probably "intelligent" and detects that nothing is plugged in, so it switches ports. You should try to fix the jack detection or find a way to disable it for your card I think.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Disclaimer: I'm learning(?) pipewire and haven't tried this yet*! Make backups first...
You might try
pw-cat -p --list-targets
(or [c]pw-cli ls Node[/c])
then
pw-metadata 0 default.audio.sink.name <the name from pw-cat output>
For example, on my simple setup* I get
$ pw-cat -p --list-targets
Available targets ("*" denotes default): alsa_output.pci-0000_00_0e.0.analog-stereo
* 39: description="Built-in Audio Analog Stereo" prio=1009
Then:
$ pw-metadata 0 default.audio.sink.name alsa_output.pci-0000_00_0e.0.analog-stereo
(* I tried it but I only have one output and it was already the default, so that didn't change, or break, anything.)
"If you do not change direction, you may end up where you are heading." -- L.T.
Offline
I'm just bumping this thread because I'm having this exact same issue. It's really frustrating because whenever my screen auto locks, after a few minutes of inactivity, my audio switches to my laptop's speakers instead of the plugged in speakers. It's driving me nuts while cooking or doing anything else!
If I find a solution, I'll post back here. But if anybody has any help to aid, I would sincerely appreciate it! Thank you.
Offline
This fixed it for me: https://wiki.archlinux.org/title/PipeWi … _reconnect
I may have to do that every time I move my laptop, but that's good enough for me!
Offline
I solved it by playing around with hdajackretask. I found a configuration that makes pipewire/pulse/alsa/whatever detect the jack states correctly. It will probably be different for different hardware. For my laptop (Acer TravelMate TMP648-MG-554H) I set the following for Realtek ALC282:
Black Mic, Left side; Pin ID: 0x18 -> Override, Microphone
Pink Mic, Right side; Pin ID: 0x19 -> Override, Not connected
Black Headphone, Right side; Pin ID: 0x1b -> Override, Headphone
Marking as solved.
Offline
I'll try your fix @zegkljan.
I realized that my fix probably did nothing -- my audio still switches to the internal laptop speakers on lock. When I run `systemctl suspend` and then resume, it works fine and my audio doesn't switch. It's only when I'm AFK and my machine auto-locks that the audio jumps.
Also, that Arch Wiki link has the pipewire-media-session in the wrong place. For me, it seems to be living in `~/.config/pipewire/media-session.d`. I noticed because, upon reboot, that folder the wiki tells to you delete (`~/.config/pipewire-media-session/*`) is never restored.
I'll write back if I'm still experiencing this issue. Fingers crossed that `hdajackretask` works though!
Offline
I found another solution - increase your headphones priority in
/usr/share/alsa-card-profile/mixer/paths/analog-output-headphones.conf
, so pipewire chose them when list of available profiles changes (HDMI display connect/disconnect in my case).
Offline