7

I'm in the process of getting 20.04 setup after having upgraded from 19.04, and part of it is getting my MM keys to work with spotify. While trying to make the custom shortcuts, I have run into a problem. On pre-existing system shortcuts, the MM keys on my keyboard are registered as valid inputs, and can be assigned:

enter image description here

However while trying to assign a keybind to a custom shortcut, the keypress is not recognized, and I am left on this screen:

enter image description here

What I have tried so far:

  • As suggested in the comments, followed this post's suggestion of disabling default play/pause keys from dconf-editor. No change.
  • I tried with a second keyboard (also with media keys), to no avail
  • I tried to bind a key and unbind it, also no help
  • Looked around in gnome-tweaks in case something got added/updated but couldn't find anything.
  • Came across this post, however, the solution there now shoots an error:
david@david-pc:~$ gsettings set org.gnome.settings-daemon.plugins.media-keys previous ''
expected value:
  (empty input)
  ^
  • After updating to kernel 5.4.0-28-generic, the media keys worked briefly, then seemingly randomly stopped again. After rebooting, the media keys started working again, then promptly stopped working after around 15 minutes.

Is this a bug, or am I doing something wrong? Either way, I would love an answer/workaround.

David
  • 3,367
  • Same exact problem! Also following this with no luck -to save you the hassle-: https://askubuntu.com/a/1011096 – abdullahkady Apr 27 '20 at 12:50
  • 1
    @abdullahkady Didn't work, tried disabling from dconf-editor, but same deal. – David Apr 27 '20 at 13:06
  • 1
    Yup, I'm saying it doesn't work either so that you can add to the original post to save people from going through the same hassle. It's really annoying, hopefully some solution comes up – abdullahkady Apr 27 '20 at 13:14
  • So regarding "media keys worked briefly", if you just need to assign them to Spotify I think I've figured it out -not sure, maybe it's just coincidence-. Whenever you reboot, open Spotify application before anything else, use the media keys to play, and then they will work fine through this session. – abdullahkady May 05 '20 at 05:26

1 Answers1

15

It's a conflict with Chrome.

When I disable media key support via the config (chrome://flags/#hardware-media-key-handling). I was able to use media keys with Spotify without any additional Ubuntu configuration.

pd5rm
  • 166
  • Worked for me as well! – Ed'ka Sep 01 '20 at 07:56
  • Sorry that it took so long for me to get to this, but thank you so much :) Wouldn't have thought of that – David Dec 03 '20 at 23:54
  • I wish there was a way for Chrome and everything else to work in harmony, because when I disable this setting, the media keys work everywhere else except chrome. They seem to be in exclusive-or conflict. – darksky Dec 23 '20 at 07:11
  • Worked for me for Ubuntu22 with Microsoft Edge (which I have instead Chrome), but path to config option a little bit other: edge://flags/#hardware-media-key-handling – Green Joffer Mar 02 '23 at 16:50
  • This didn't work for me at first, and then I realized that my media keys were all disabled in the Ubuntu Keyboard (hotkey) settings. After I rebound the hotkeys in Ubuntu for Media Keys then this fix worked for me. – th317erd Nov 21 '23 at 19:53