Linux distro: openSUSE Tumbleweed Plasma version 5.10 Just updated to KDE Plasma 5.10, from 5.9.5. Now, activating the screen locker disables my media keys. This is a significant regression, and probably related to the work done to make media playback controls appear on the lock screen. Steps to reproduce 1. Open any MPRIS-compatible music player (tried Amarok and Lollypop) 2. Start playing a song 3. Use your keyboard's built-in media playback keys and verify that they work 4. Lock the screen using any method (suspend, manual locking- makes no difference) 5. Unlock the screen 6. Use your keyboard's media keys again Expected results The media keys should still work. Actual results: The Media keys no longer work.
Once this problem has manifested, if you lock the screen again, the media playback keys work from the lock screen itself! So it seems like whatever is grabbing control of the media keys for the lock screen isn't giving up that control once the lock screen goes away.
Not much of a workaround, but restarting X restores proper control of the media playback keys.
I can confirm this. However, I'm using custom shortcuts (e.g. Meta+S for pause) and they are not working on the lock screen (can't test Media Control keys as I don't have them).
Confirming OS:Manjaro KDE 5.10 Media keys not working after screen lock
Same for me. Media keys are working before the lock, during the lock but not after unlock. Another lock - keys are available again on lock screen, but still not after unlock. Arch Linux, Plasma 5.10, Qt 5.8.
Does it work again if you restart plasmashell after unlocking the screen? It should then re-claim the keys. I'll investigate.
Yes, restarting plasmashell restores proper functionality. So we have another, better workaround: killall plasmashell; plasmashell > /dev/null 2>&1 & disown
I'd like to chime in. Pause shortcut is not working on lockscreen for me. If it is unrelated then I can create new bug report.
Now that you mention it, Piotr, I see that as well. Only the forward and back hardware buttons work on the lock screen. The play/pause button seems to very rapidly do play and pause, restoring the music to whatever status it already had.
Ok, so we have some weird issues here. What you have pointed I've applied to two applications VLC and Spotify. For Spotify right now (during lock screen): Next/Previous buttons cause skipping not one but two tracks. Pause/Play works normal. For VLC: Next/Previous buttons work, Play/Pause does nothing. I can't tell if it's doubled. This is particulary interesting, because I think Spotify normally behaves like this: Every event is doubled. Double-skips tracks and pauses-unpauses track instead of pausing. I don't know if it is Spotify's issue or Plasma's, but when I'd recently thought that this is no longer happening - here we go. So in essence, looks like Next/Previous on lock screen behave as they should, but play/pause is doubled?
Oh, and restarting plasmashell does not seem to work for me. Neither with kquit/kstart nor killall and executing plasmashell.
Patch: https://phabricator.kde.org/D6095
To write up what's hpapening. The lockscreen loads the MPRIS dataengine, that engine registers the global shortcuts. (see multiplexer.cpp) One component can't steal grabs from another, but because the dataengine uses a brand new action collection with a branch new component "Media Controls" it's not technically stealing the controls, simply re-registering a second copy of the same component. Doing that is a bit weird. Rather than having code for the applet to grab the shortcuts again the moreobvious solution is to simply not register new shortcuts from the lockscreen. IMHO we should move the shortcut handling from the dataengine to something else which our MPRIS applet can load. Dataengines should be read only data fetchers; therefore not doing this.
I've tested your patch. My problem of pause/play not working on lockscreen is gone. Or I'm just lucky.
Git commit 7bd909fa3a4f70bf4c03c43b025f7ed65c2e5b5c by David Edmundson. Committed on 05/06/2017 at 12:37. Pushed by davidedmundson into branch 'Plasma/5.10'. Only enable MPRIS global shortcuts on demand Summary: The lockscreen uses the MPRIS dataengine. This leads to two applications registring the service using the same component name which leads to the shortcuts not working when the lock screen closes. We want to have the applet register the shortcuts, but not every dataengine user. Ideally this shouldn't be in the dataengine either because DataEngines are read only. This moves the logic to the service which is writable and registers the shortcuts for the multiplexer there when requested from the applet. FIXED-IN: 5.10.1 Test Plan: Opened media player. Used play/pause shortcut. (the only one my keyboard has) Reviewers: #plasma, broulik Reviewed By: #plasma, broulik Subscribers: broulik, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D6100 M +4 -0 applets/mediacontroller/contents/ui/main.qml M +58 -0 dataengines/mpris2/multiplexedservice.cpp M +5 -0 dataengines/mpris2/multiplexedservice.h M +0 -49 dataengines/mpris2/multiplexer.cpp https://commits.kde.org/plasma-workspace/7bd909fa3a4f70bf4c03c43b025f7ed65c2e5b5c
*** Bug 380868 has been marked as a duplicate of this bug. ***
*** Bug 380509 has been marked as a duplicate of this bug. ***
*** Bug 380877 has been marked as a duplicate of this bug. ***
This does not seem to be fixed for me. OS: KDE neon 5.10 Plasma: 5.10.2 I'm not quite sure about what makes the mediakeys stop working, but at the moment they are not working. Restarting plasmashell does not fix the problem. On the lockscreen everything is working as expected (including the playpause button). Any logs/debug info that I could provide?
The fix should have made it into 5.10.1, so if you're still using 5.10, it won't be fixed yet for you.
I'm using Plasma 5.10.2
Same for me. Media keys are not working, if I assign them to the actions of "Media Controller". Though they work, if I assign them to e.g. Amarok. Looks like "Media Controller" hasn't "subscribed" those keys properly, because nothing shows up at dbus-monitor. I'm using Plasma 5.10.3 (also had this issue with .2).
Just noticed that it's not just about the media keys. Doesn't matter which keys I assign to "Media Controller" actions, it doesn't work at all. Let me know, if I can help with more information :)
I have the same issue using Cantata 2.0.1 in Plasma 5.10.5 on Fedora 25, Media Controller shortcuts do nothing at all, even after restart.
Kai, is there still a bug here?