Skip to content

Pipewire switching audio output on screen lock

Since a recent update to pipewire whenever my desktop locks (in i3 and sway) the sound output is switched from the headphone jack (my external speakers) to my laptop speakers. I've had a read through the wiki page on pipewire and I'm still not sure how to stop this behaviour from occurring. Can anyone help?

journalctl -xe shows nothing which is what I expected, so I tried pactl subscribe to monitor the changes but I'm not familiar with pipewire and I don't know what the output means:

❯ pactl subscribe
Event 'change' on card #39
Event 'change' on sink #42
Event 'change' on card #39
Event 'change' on server #4294967295
Event 'change' on card #39

Edited 30 Mar 2021. We only hold this version.

5 points0 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
5 · 100% up
Kind
Text
ID
mdrrap

Author

13
posts
260
comments
9
media
View profile

1 comment

This will be bumping a dead thread just wanted to make sure it has an answer as I also encountered this page upon searching hopefully to help anyone who encountered the same issue. On my situation the issue stems on pipewire-media-session.service it resets sink to default when light-locker kicks in but works fine when restarting and logout. The workaround I did was I stopped that service before lightlocker-command -l in xflock4 then right after ran a daemon that will watch for login event upon detecting will start the service again. I used this script found on this link and modified it to fit my needs https://newbedev.com/light-locker-run-script-on-screen-lock-unlock. Make sure to also add a delay before starting the service back again. Hopefully this helps.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.