Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media keys sometimes stop working #331

Closed
damian101 opened this issue Jun 10, 2019 · 10 comments · Fixed by #352
Closed

media keys sometimes stop working #331

damian101 opened this issue Jun 10, 2019 · 10 comments · Fixed by #352

Comments

@damian101
Copy link

 * Cinnamon version 4.0.10-2
 * RebornOS (Arch)
 * Nvidia Quadro P4000 Mobile, nvidia-dkms 430.14-8
 * 64 bit

The media keys (play, pause, next/previous track) sometimes stop working. After rebooting everything works fine again.

@damian101 damian101 changed the title media keys stop working media keys sometimes stop working Jun 10, 2019
@DemonTPx
Copy link

DemonTPx commented Nov 11, 2019

This happens to me as well. It seems that closing the application that responds to the media keys causes this. This is probably related to this issue: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/45

I get these errors in my ~/.xsession-errors when they stop working:

(csd-media-keys:2932): media-keys-plugin-WARNING **: 08:59:20.240: Error calling method GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.xplayer was not provided by any .service files

Running killall csd-media-keys fixes it for me.

@mondalaci
Copy link

Cinnamon 4.4.8 is also affected, and the suggested workaround works.

@indierodo
Copy link

Could be related: the output of csd-media-keys --verbose shows that is creating a proxy for opened apps. For example

I open chromium and start playing music on spotify.
I hate that song, so I press 'next' media key.
$ csd-media-keys --verbose

(csd-media-keys:16681): media-keys-plugin-DEBUG: 13:27:56.724: Calling method 'HandleKeybinding' for media-keys
(csd-media-keys:16681): media-keys-plugin-DEBUG: 13:27:56.724: Launching action for key type '15' (on device id 0)
(csd-media-keys:16681): media-keys-plugin-DEBUG: 13:27:56.724: Media key 'Next' pressed
(csd-media-keys:16681): media-keys-plugin-DEBUG: 13:27:28.882: calling Next over dbus to mpris client org.mpris.MediaPlayer2.chromium.instance2597

The media keys plugin creates a proxy for chromium first, so the keys don't work.
I close chromium, then this happens:
$ csd-media-keys --verbose

(csd-media-keys:16681): media-keys-plugin-DEBUG: 13:27:54.857: Creating proxy for for org.mpris.MediaPlayer2.spotify
(csd-media-keys:16681): media-keys-plugin-DEBUG: 13:27:56.724: Calling method 'HandleKeybinding' for media-keys
(csd-media-keys:16681): media-keys-plugin-DEBUG: 13:27:56.724: Launching action for key type '15' (on device id 0)
(csd-media-keys:16681): media-keys-plugin-DEBUG: 13:27:56.724: Media key 'Next' pressed
(csd-media-keys:16681): media-keys-plugin-DEBUG: 13:27:56.724: calling Next over dbus to mpris client org.mpris.MediaPlayer2.spotify

And now it works.

@xhpohanka
Copy link

I'm also affected by this issue.

and this is what I see in .xsession-errors

** (csd-media-keys:1441): WARNING **: 07:47:40.049: Unable to get default sink
** (csd-media-keys:1441): WARNING **: 11:47:53.281: Unable to get default sink
** (csd-media-keys:1441): WARNING **: 16:07:37.440: Unable to get default sink
** (csd-media-keys:1441): WARNING **: 16:37:18.355: Unable to get default sink
** (csd-media-keys:1441): WARNING **: 07:41:05.569: Unable to get default sink
** (csd-media-keys:1441): WARNING **: 10:32:24.090: Error calling method GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.cantata was not provided by any .service files
** (csd-media-keys:1441): WARNING **: 10:32:27.086: Error calling method GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.cantata was not provided by any .service files
** (csd-media-keys:1441): WARNING **: 10:32:27.548: Error calling method GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.cantata was not provided by any .service files
** (csd-media-keys:1441): WARNING **: 10:32:30.052: Error calling method GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.cantata was not provided by any .service files
** (csd-media-keys:1441): WARNING **: 10:32:30.384: Error calling method GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.cantata was not provided by any .service files
cinnamon-session[1389]: WARNING: t+247998,87065s: Application 'cinnamon-settings-daemon-media-keys.desktop' killed by signal 15

After killing it immediately works again

@leigh123linux leigh123linux transferred this issue from linuxmint/cinnamon Apr 19, 2021
@DemonTPx
Copy link

I haven't had problems with this issue anymore for some time and am cinnamon 4.8.6. What version are you running, @xhpohanka ?

@mondalaci
Copy link

Also running Cinnamon 4.8.6 and no issues for months.

@xhpohanka
Copy link

I'm on up to date Arch linux.

$ cinnamon --version
Cinnamon 4.8.6

My computer is a laptop so maybe it can be caused by attaching and detaching various keyboards?

@xhpohanka
Copy link

xhpohanka commented May 4, 2021

I was just affected again by this strange behavior.

Each press of media key fires this message in .xsession-errors

** (csd-media-keys:1663): WARNING **: 10:53:45.150: Error calling method GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.smplayer was not provided by any .service files

When I start smplayer, then it is correctly controlled by media keys, but after closing it is still the same. Can the issue be in smplayer? Is it possible that it is not unsubscribing from dbus correctly? Even in such case I would expect some robustness in csd-media-keys to be able to handle unexpected situations.

I still do not know exact way how to reproduce.

@mhoran
Copy link
Contributor

mhoran commented Dec 7, 2021

I believe this bug may have been inherited from gnome-settings-daemon: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/45. Applying this patch should resolve: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/87/diffs.

@xhpohanka
Copy link

I'm testing csd-media-keys with this patch. So far it seems that my issues are gone. Let's wait few days more...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants