SUMMARY A media device that sends KEY_PLAY (HID consumer usage 0xB0) as a *held* key -- rather than a momentary tap -- causes mprisservice to enter a rapid Play/Pause toggle storm (~25 Hz) on the active MPRIS player, for as long as the key is held. The player UI visibly flickers many times per second. Root cause is a combination in libkmpris/kded/mprisservice.cpp: 1. Qt::Key_MediaPlay is bound to onPlayPause() -- the play/pause TOGGLE -- not to the idempotent onPlay(). (enableGlobalShortcuts(): addGlobalShortcut("playpausemedia", ..., Qt::Key_MediaPlay, &MprisService::onPlayPause). onPlay()/onPause() exist and are idempotent, but onPlay() has no key bound.) 2. The held media key is autorepeated at the desktop key-repeat rate *above* the evdev layer and re-triggers the global shortcut ~25 times/second. 3. Each activation calls onPlayPause(), which reads the player's current PlaybackStatus and flips it -- so successive repeats produce Play/Pause/Play/Pause... Triggering device: Bose QC Ultra Headphones over USB. Their wear-sensor "resume" command is emitted as KEY_PLAY and held down continuously while the headphones are worn (released only on the next ear transition). Over Bluetooth (AVRCP) the same device sends momentary passthrough commands, so the issue does NOT occur -- it is specific to a held media key over USB HID. STEPS TO REPRODUCE 1. Have an MPRIS-aware player playing (tested: Spotify; also reproduced with Chromium). 2. Deliver a *held* media-play key: KEY_PLAY pressed and held with no immediate release. With the Bose QC Ultra over USB this happens automatically while the headphones are worn; it can also be reproduced by emitting a held XF86AudioPlay / KEY_PLAY. OBSERVED RESULT - While KEY_PLAY is held, the active player receives a rapid, strictly-alternating stream of Pause/Play MPRIS method calls at ~40 ms intervals (about 25 Hz). The player UI flickers many times per second. - Captured: 247 MPRIS Play/Pause calls (roughly 101 Play / 101 Pause), all sent by kded6 (mprisservice) to org.mpris.MediaPlayer2.spotify, with 247/247 falling inside the windows during which KEY_PLAY was held (press->release windows of 6.8 s and 16.2 s in the capture). - The input device shows only the single held key: evtest on the USB HID node shows KEY_PLAY value=1 (press) and the matching value=0 (release) seconds later, with ZERO kernel autorepeat (value=2) events. So the ~25 Hz repeat is synthesized above evdev (compositor / global-shortcut layer) and amplified into alternating commands by the toggle handler. EXPECTED RESULT A held media-play key should not produce a rapid play/pause oscillation. Either (or both): (a) media-transport global shortcuts should ignore key autorepeat (a held play key should act once), and/or (b) Qt::Key_MediaPlay should be bound to the idempotent onPlay() rather than the toggle onPlayPause(), so repeats are harmless no-ops. ADDITIONAL INFORMATION - Diagnosis: dbus-monitor (session bus, org.mpris.MediaPlayer2.Player) showed all calls originating from kded6; evtest on the device input nodes localized a single held key (USB HID Consumer Control), with the Bluetooth AVRCP node showing zero events; unloading the kded module (qdbus6 org.kde.kded6 /kded unloadModule mprisservice) eliminates the storm entirely, and reloading restores it. - Workaround for affected users: disable the device's auto-pause feature, or avoid the USB connection (Bluetooth is unaffected). SOFTWARE/OS VERSIONS - Plasma: 6.6.5 (plasma-workspace 6.6.5-2) - Qt: 6.11.1 - OS: Arch Linux, kernel 7.0.12-arch1-1 - Audio: PipeWire 1.6.6 + WirePlumber + pipewire-pulse - Trigger device: Bose QC Ultra Headphones over USB (HID Consumer Control)
Hardware doing Hardware things... never seen a headset do something dumb like that. My headset sends pause when I take it off and sends play when I put it back on. That said, the Play/Pause button found on most keyboards is Key_Play. As far as I can tell this is on purpose [1]. I think your only option would be to unset the shortcut or get a different headset. [1] https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=1071717
We do support dedicated "pressed" vs "press and release" shortcuts in KGlobalAccel so in theory we could support "press and hold" for play, if anyone is willing to implement it.
(In reply to Kai Uwe Broulik from comment #2) > We do support dedicated "pressed" vs "press and release" shortcuts in > KGlobalAccel so in theory we could support "press and hold" for play, if > anyone is willing to implement it. I'd be happy to investigate working out a debounce or multi press sink detection of sorts.
(In reply to Kai Uwe Broulik from comment #1) > Hardware doing Hardware things... never seen a headset do something dumb > like that. My headset sends pause when I take it off and sends play when I > put it back on. > > That said, the Play/Pause button found on most keyboards is Key_Play. As far > as I can tell this is on purpose [1]. I think your only option would be to > unset the shortcut or get a different headset. > > [1] https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=1071717 It's a Bose QC Ultra 2. Entirely possible it's just got crap firmware - it's already notorious for pausing playback if you lean forward too far.
I can repro this with just keyboard media shortcut. I think it would make sense to not allow it being held in this case. Operating System: KDE Linux 2026-06-15 KDE Plasma Version: 6.7.80 KDE Frameworks Version: 6.28.0 Qt Version: 6.11.1 Kernel Version: 7.0.12-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 3600 6-Core Processor Memory: 16 GiB of RAM (15.5 GiB usable) Graphics Processor: AMD Radeon RX 6600
I can only reproduce this with a shortcut set in the KCM. If I hold down my keyboard's physical play/pause key, it doesn't happen. So I guess we should turn off auto-repeat for this action.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/7275
Git commit 608faad2551c8ba8375d102fda8c23051a836c7b by Niccolò Venerandi. Committed on 23/10/2026 at 09:50. Pushed by niccolove into branch 'master'. libkmpris: Don't auto-repeat the global play/pause shortcut Holding down the key bound to "Play/Pause media playback" made playback toggle rapidly between playing and paused for as long as the key was held. We thus disable auto-repeat here. M +4 -1 libkmpris/kded/mprisservice.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/608faad2551c8ba8375d102fda8c23051a836c7b
Git commit d64b6a2226e0dfe6c59c4671f7e6c83fdcf427e8 by Niccolò Venerandi. Committed on 23/10/2026 at 09:51. Pushed by niccolove into branch 'Plasma/6.8'. libkmpris: Don't auto-repeat the global play/pause shortcut Holding down the key bound to "Play/Pause media playback" made playback toggle rapidly between playing and paused for as long as the key was held. We thus disable auto-repeat here. (cherry picked from commit 608faad2551c8ba8375d102fda8c23051a836c7b) Co-authored-by: Niccolò Venerandi <niccolo@venerandi.com> M +4 -1 libkmpris/kded/mprisservice.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/d64b6a2226e0dfe6c59c4671f7e6c83fdcf427e8