spotify-adblock icon indicating copy to clipboard operation
spotify-adblock copied to clipboard

Media Keys not working.

Open JoshCodeStuff opened this issue 3 years ago • 6 comments

Found an issue, could just be how I started it but who knows. I have a Corsair K55 RGB and the play/skip buttons do not work (they work with just regular spotify though). I am running the latest version of Manjaro Cinnamon on Kernel 5.14.7-2. Let me know if you need any other data.

spotify.desktop:

[Desktop Entry]
Type=Application
Name=Spotify
GenericName=Music Player
Icon=spotify-client
TryExec=spotify
Exec=kdocker -q -o -l -i /usr/share/icons/Papirus/64x64/apps/spotify.svg env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify

The media keys also do not work when this is run from command line:

LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify

JoshCodeStuff avatar Oct 03 '21 16:10 JoshCodeStuff

Same issue for me, using the same Keyboard and running Arch 5.14.14-arch1-1 + KDE plasma

gooosz avatar Nov 08 '21 21:11 gooosz

try to install playerctl

nenoro avatar Nov 23 '21 20:11 nenoro

try to install playerctl

I gave this a try. nothing happened. I tried the blocker on MXLinux (XFCE) and it works flawlessly. Must be an arch/manjaro thing or maybe cinnamon?

JoshCodeStuff avatar Dec 01 '21 20:12 JoshCodeStuff

(Using Arch and Cinnamon, same issue) I found a workaround on the spotify forums, someone tried using dbus instead of the "media keys" for their song controls. My keyboard had dedicated media keys (and were bound appropriately in keyboard shortcuts) so I unbound them and used these commands instead:

https://community.spotify.com/t5/Desktop-Linux/Basic-controls-via-command-line/td-p/4295625

hope that helps!

xenanthropy avatar Dec 25 '21 17:12 xenanthropy

This might not be your problem, but whenever I've had a problem with media keys not working in Spotify on Ubuntu, I've tracked it down to Google Chrome eating the media keys. The default behaviour in Chrome was changed some time back to enable this. Turn if off here: chrome://flags/#hardware-media-key-handling

atatdotdot avatar May 09 '22 08:05 atatdotdot

I use Firefox and had the same problem. I had to toggle media.hardwaremediakeys.enabled from true to false in about:config.

realnc avatar Aug 19 '23 23:08 realnc