I recently ran into an issue where my Media Keys were not working on Linux Mint. They would work if I rebooted, however, they would eventually stop working.

I found other users having the same issue.

The root of the issue appears to be that csd-media-keys is sending the Play/Pause, Next and Prev commands to the wrong application.

So far there has been no resolution from the Linux Mint developers, so I wanted to document a workaround.

Step 1: Install playerctl

Run the following command in a terminal to install playerctl:

sudo apt install playerctl -y

Step 2: Delete the built-in keyboard shortcuts

Search for Keyboard in the Linux Mint search menu and go to the Shortcuts tab.

In the Sound and Media category, look for the following keyboard shortcuts: Play, Previous track, Next track.

For each entry, click the Keyboard binding and press backspace to clear it.

Step 3: Add custom keyboard shortcuts

In the Categories pane, go to Customer Shortcuts

Click Add custom shortcut

Add the following shortcuts:

NameCommand
Play/Pauseplayerctl play-pause
Next Trackplayerctl next
Previous Trackplayerctl previous

Be sure to map a keybinding in the Keyboard bindings pane

That should be all you need.