XF86 media control and notifications stop working after locking the screen
System details
Dell Vostro 7620, Intel i7 12700H, 16Gb memory, Omarchy 3.1.1
What's wrong?
Both my laptop and USB keyboard have buttons for media control (volume, play/pause, mute, etc). The buttons work, I use them often. Same for the buttons on my headset.
When I need a few minutes AFK, I lock the screen. When I come back these buttons don't work anymore. None of them.
Special case: the headset volume buttons do work, but they don't show the toast notification I usually see. And the play/pause button still doesn't work. Also, the "precise" keybinds using ALT also don't work.
Debugging
I tried using wev to identify whether the button is being identified or not, but not even wev logs the button presses, from either keyboard.
PS: I'm still new to Linux and Omarchy, if you believe this issue should be moved to a different repo, lmk.
I have a similar issue with my Lenovo X1 Carbon on Omarchy 3.3.4
Sometimes my volume, brightness, and mic keys just don't register any input. Using wev I can see that the media functions are not being registered, however when using fn + mute for example, the fn1 key is registered.
In ~/.local/share/omarchy/default/hypr/bindings/media.conf the laptop volume and LCD brightness is changed with swayosd-client.
When I ran the command to change the volume manually in the terminal - swayosd-client --monitor "$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name') --output-volume raise" and got the following error:
Could not connect to SwayOSD Server with error: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
I ended up just running swayosd-server & and that allowed me to use my volume and LCD brightness keys but only while the terminal was still active. Only a full restart fixes my issue.
I ended up just running
swayosd-server &and that allowed me to use my volume and LCD brightness keys but only while the terminal was still active. Only a full restart fixes my issue.
Ah good catch I just had this happen to me. There's actually an omarchy-restart-swayosd command which will fix it for you without having to keep some terminal hanging around.
I ended up just running
swayosd-server &and that allowed me to use my volume and LCD brightness keys but only while the terminal was still active. Only a full restart fixes my issue.Ah good catch I just had this happen to me. There's actually an omarchy-restart-swayosd command which will fix it for you without having to keep some terminal hanging around.
Even better catch. Should've guessed there would be something like that already. Thanks :)
Considering there is a command for it, should this command be added somewhere so it runs automatically when logging in / unlocking the screen?
Considering there is a command for it, should this command be added somewhere so it runs automatically when logging in / unlocking the screen?
Honestly this seems like a great idea, so I second this
Just bumping this issue, this began happening to me fairly consistently after waking up my computer after it sleeps, and running omarchy-restart-swayosd worked. I also agree with mghextreme and iamfeelinblue on this, restarting if the server is failing as seen in tallvincent's observation seems like a good thing to do each time when waking up.
I opened #5656 for this.
The failure mode I saw matches the earlier comments here: the XF86 bindings still call omarchy-swayosd-client, but swayosd-server is gone, so D-Bus returns org.freedesktop.DBus.Error.ServiceUnknown.
The PR moves swayosd-server into a user systemd service, enables the packaged swayosd-libinput-backend.service, and keeps omarchy-restart-swayosd working against the service. That should cover the lock/suspend case without needing to restart it by hand after wake.