Circumvent volume keys not working in Plasma 6

The last update bringing Plasma 6 was mostly smooth, until I find out my volume shortcuts don’t work anymore. I searched similar posts in the forum but strangely have found none. However, I know I’m not an isolated case because I have found other reports online. I guess it must be some hardware specific issue…

Anyway, for those with this problem there’s a simple solution. Since redefining the shortcuts doesn’t work (it must be a QT or a Plasma bug), you can set personalized shortcuts directly to pactl (pulseaudio’s command-line tool).

  1. For those who use pipewire, like me, make sure you install pulseaudio support (you probably already have it):
    sudo pacman -S --asdeps pipewire-pulse

  2. Create a new personal shortcut in Plasma’s shortcuts’ window:

A dialog will appear, where you’ll enter the command to change the volume. For example, for the shortcut to increase the volume by 5%:

/usr/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%
  1. Then, you set the shortcut you want to execute the command:

  2. Repeat the process for the shortcut to lower the volume. Apply and you’re done.

This will work until the bug is resolved, if ever, and the default shortcuts work again.

Cheers,

PipeWire users should have pipewire-pulse installed already

pactl can also set the default sink volume using @DEFAULT_SINK@ or the sink number instead of using the sink name
wiki.archlinux.org - PipeWire - Setting overall or individual channel volume

1 Like

Yes, @DEFAULT_SINK@ is a better solution, considering nowadays it is common to switch between different devices.

I’ll edit my post, thanks.

I don’t use @DEFAULT_SINK@ myself because I have only one sink in PulseAudio.
It was mentioned a few times in older topics by i3wm users to fix volume keys if they installed PulseAudio

I use specific sink names for troubleshooting because it is shown in the data and I can show the logical sequence to using it. But having volume keys following default-sink would be a better option for multiple sinks. So I will add to it as an alternative option (with a back-link to this topic) and let users decide which one they prefer

KMix sound mixer installation helped me.