Volume knob on keyboard sometimes controls non selected output device

Sometimes I will select one of the 2 output devices I have and as soon as I turn the volume knob on my keyboard, it adjusts the volume of the non-selected output device. The only way I can force it to adjust the selected output devices’ volume is by clicking the volume bar of the selected output device in the bottom right corner sound volume applet. This has been occurring quite frequently lately and is a bit of a pain.

So this only occurs sometimes? Not all the time? And when you selected the output devices, was it done via the same applet or another GUI interface?

For now, perform two simple tests.

Test 1:
Open a terminal and run this command, which detects any audio-related events.

pactl subscribe

Then, while the command is running, select an audio device (via the GUI, like you did before). If an audio event is detected, the command will print out a bunch of text in the terminal. If you didn’t see any text printed, then it likely means that there is a bug in that GUI audio tool - clicking it doesn’t switch an audio device like it’s supposed to.

Test 2:
Compare the outputs of pactl list sinks | grep "Active Port" before and after you select an audio device using the GUI tool. If an actual switch occured, that command will most probably return different outputs.

I would say it happens about 25% of the time and yes always via the sound applet in system tray.

This test printed commands in terminal each time I would use the applet to switch between both output devices.

This test I was unable to execute. I wrote the command in konsole and it gave me an error. What was I supposed to write in place of “active port” ?

You’re supposed to type the command verbatim. Does pactl list sinks give errors as well?

This means that the applet did switch when you clicked on it. The second test will confirm whether the correct device is switched to.

On my system, for instance, the output of that command is this:

It’s because you made a typo in the first attempt. Take a look at the screenshot you sent. You forgot to include list in the command.

Correct, that’s why I quickly deleted my reply, but you beat me to the punch. The command works and upon entering it a few times after switching the output device back and forth, it gives the same result.

That is interesting indeed. Unfortunately, I can barely keep my eyes open. So I’ll have to wait till tomorrow to diagnose this further. Maybe other users will come along and figure it out in the meantime.

No problem, there is no urgency for this one. Thanks and have a good sleep!