celluloid icon indicating copy to clipboard operation
celluloid copied to clipboard

MPRIS media keys aren't working on Cinnamon

Open areographe opened this issue 5 years ago • 9 comments

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:

  1. Open Celluloid
  2. 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.

areographe avatar Sep 13 '20 11:09 areographe

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.

gnome-mpv avatar Sep 13 '20 15:09 gnome-mpv

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.

areographe avatar Sep 13 '20 15:09 areographe

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'.

gnome-mpv avatar Sep 13 '20 16:09 gnome-mpv

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.

areographe avatar Sep 13 '20 23:09 areographe

Can you check if this patch fixes the problem for you?

gnome-mpv avatar Sep 14 '20 12:09 gnome-mpv

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?

areographe avatar Sep 20 '20 10:09 areographe

I think I can reproduce the bug now. Does it start working if you uncheck Enable media keys support in the Preferences dialog?

gnome-mpv avatar Sep 20 '20 14:09 gnome-mpv

I tried unchecking that setting and restarting Celluloid but it still isn't working unfortunately.

areographe avatar Sep 20 '20 23:09 areographe

I also have this problem on Manjaro XFCE.

orangebowlerhat avatar Mar 16 '24 20:03 orangebowlerhat