MPRIS media keys aren't working on Cinnamon
Overview Description:
On Cinnamon 4.6.7 (OS is Manjaro) I used to use mpv with the mpv-mpris package and that worked fine, as do other players (e.g. Cinnamon's Xplayer, Lollypop, etc). Just switched to Celluloid and for some reason it's not responding to any media key presses.
Steps to Reproduce:
- Open Celluloid
- Press any media key
Actual Results: No response.
Expected Results: Play/Pause/Next/Previous should work.
Version: 0.19
Additional Information: Thought it might be related to having Chromium open, which sometimes grabs media key presses, but the problem happens even with Chromium closed.
I can't reproduce this. I tested with Cinnamon 4.6.7 running on Manjaro inside a VM, and the keys worked as expected. I used xdotool to generate key presses because my keyboard doesn't have media keys, but that shouldn't make any difference.
Thanks for testing that in VM. I just tried using xdotool key XF86AudioPrev and xdotool key XF86AudioPrev and neither worked with Celluloid, but both worked with Lollypop and Pragha. I should mention that the Cinnamon panel applet for sound/volume control also includes MPRIS Play/Pause/Previous/Next buttons and those work when Celluloid is open, it's just the media keys that don't (including through xdotool). Do you have any suggestions for how I could pin down the cause of the key-presses not working for Celluloid but still working for other apps?
Actually, I've actually just tried mpv with mpv-mpris again and that's no longer working. I'll just reboot and see if it was a crash or bug for some daemon that caused this.
Do you have any suggestions for how I could pin down the cause of the key-presses not working for Celluloid but still working for other apps?
Might be a good idea to try monitoring D-Bus messages to/from Celluloid/mpv and compare them with other players'.
Celluloid:
method call time=1600039911.264686 sender=:1.1129 -> destination=:1.29 serial=8721 path=/org/cinnamon/SettingsDaemon/KeybindingHandler; interface=org.cinnamon.SettingsDaemon.KeybindingHandler; member=HandleKeybinding
uint32 11
method call time=1600039911.265702 sender=:1.29 -> destination=:1.950 serial=1798 path=/org/mpris/MediaPlayer2; interface=org.mpris.MediaPlayer2.Player; member=PlayPause
method return time=1600039911.265750 sender=:1.29 -> destination=:1.1129 serial=1799 reply_serial=8721
method return time=1600039911.266545 sender=:1.950 -> destination=:1.29 serial=283 reply_serial=1798
Xplayer:
method call time=1600040117.392013 sender=:1.1129 -> destination=:1.29 serial=8804 path=/org/cinnamon/SettingsDaemon/KeybindingHandler; interface=org.cinnamon.SettingsDaemon.KeybindingHandler; member=HandleKeybinding
uint32 11
signal time=1600040117.393878 sender=:1.29 -> destination=:1.7823 serial=1857 path=/org/gnome/SettingsDaemon/MediaKeys; interface=org.gnome.SettingsDaemon.MediaKeys; member=MediaPlayerKeyPressed
string "Xplayer"
string "Play"
method return time=1600040117.393985 sender=:1.29 -> destination=:1.1129 serial=1858 reply_serial=8804
Pragha:
method call time=1600039952.457020 sender=:1.1129 -> destination=:1.29 serial=8756 path=/org/cinnamon/SettingsDaemon/KeybindingHandler; interface=org.cinnamon.SettingsDaemon.KeybindingHandler; member=HandleKeybinding
uint32 11
signal time=1600039952.458479 sender=:1.29 -> destination=:1.7816 serial=1832 path=/org/gnome/SettingsDaemon/MediaKeys; interface=org.gnome.SettingsDaemon.MediaKeys; member=MediaPlayerKeyPressed
string "Pragha"
string "Play"
method return time=1600039952.458597 sender=:1.29 -> destination=:1.1129 serial=1833 reply_serial=8756
Both Xplayer and Pragha respond to media key presses, but Celluloid doesn't.
Can you check if this patch fixes the problem for you?
Hey, sorry about the delay! I just applied that patch to the AUR package 'celluloid-git' and built it, and it doesn't seem to fix the problem. What can I do to test/help?
I think I can reproduce the bug now. Does it start working if you uncheck Enable media keys support in the Preferences dialog?
I tried unchecking that setting and restarting Celluloid but it still isn't working unfortunately.
I also have this problem on Manjaro XFCE.