Media control keys not working in KDE Plasma

I’ve noticed that media control keys (Play/Pause, Previous, Next) on my external keyboard don’t work in any of the programs I’ve tried (VLC, mpv, Audacious, Strawberry, Firefox). Other special keys, such as brightness and volume controls, work without issues. The Play/Pause button on my laptop’s built-in keyboard also doesn’t work.

After some troubleshooting, I found the following:

  • $ xev | grep keycode registers media keys correctly:
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
    request MappingKeyboard, first_keycode 8, count 248
    state 0x0, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    state 0x0, keycode 173 (keysym 0x1008ff16, XF86AudioPrev), same_screen YES,
    state 0x0, keycode 171 (keysym 0x1008ff17, XF86AudioNext), same_screen YES,
  • Shortcuts are assigned correctly in system settings, and reassigning them doesn’t help.
Shortcuts

  • The “Media Controller” background service is enabled.
Background Services

  • Downgrading libinput (1.29.1-1 => 1.28.1-1) made no difference.
  • Media control works fine via commands like playerctl play-pause, playerctl previous, and playerctl next

I’ve also come across some older posts describing similar issues ( Keyboard media keys no longer working for spotify from AUR , Media keys on lenovo keyboard SK-8823 stopped working ) but none seem to match my situation exactly.

Any help would be greatly appreciated!

Some relevant system info from inxi:

Summary

Distro: Manjaro Stable 2025-09-26
Desktop: KDE Plasma 6.3.6
Kernel: 6.12.48-1-MANJARO
Display server: x11 21.1.18

This is normal. I picked up a keyboard with a volume knob, and I wanted to press that knob to Play/Pause instead of muting audio… but when mpv’s on the table, you have to use the -/= keys to adjust volume because that’s how it’s set.

I set my volume knob to do Master volume, and if I press Ctrl that does media volume - but that won’t touch mpv, though it will adjust Strawberry volume when that’s playing.

If you then also start a video playing in Firefox, adjusting media volume will affect strawberry for me - and I can’t get to Firefox… but if I close Strawberry, then Ctrl_Volume will control Firefox’s media volume.

TL;DR there’s no magical algorithm that works out which media you want to affect - but you can always get to them via the Plasmoids…

The Plasmoid will have tabs to allow you to select individual apps, rather than allowing automatic selection; and the volume plasmoid will have separate sliders where available.

2 Likes

Hi, thanks for the reply. My problem was related to media controls, like play/pause, not to the volume control. Anyway a reboot later the media controls work again :grinning_face_with_smiling_eyes: . No idea what was the issue, initially I thought it was due to recent update, but I already had a reboot since then. Maybe something breaks after waking the system from sleep… :man_shrugging:

They are contextual, they often work with the active application, but I can guarantee that you cannot play/pause MPV with Play or Pause.

I can with mpv-mpris. :wink:

1 Like

Haha yes, I forgot that. works with mpv, but not plex-HTPC. I’m so used to -/+ with both of them…

Plex bundles its own MPV build with mpv-2.dll stripped of features like IPC or Lua scripting that mpv-mpris depends on.

So then there’s a Plex MPV Shim

1 Like