You are not logged in.

#1 2022-03-27 08:41:56

Enrico1989
Member
Registered: 2018-07-05
Posts: 329

[SOLVED] Keyboard volume knob can't increase the volume after suspend

I've bought this Roccat keyboard. As you can see, it has a knob to change audio volume.

The problem is that it can't increase the volume above the level at which the computer was last suspended.

Scenario:

0. assume the volume is 100%
1. set the volume to 79% (it's unimportant wether I've set it to that value via the know or other means, e.g. pavucontrol)
2. suspend via `systemctl suspend`
3. wake up from sleep
4. try increasing the volume above 79% via keyboard knob

Step 4 fails: the volume doesn't go above 79%. Only down.

Clearly I can use pavucontrol to pull it up to 100%, at which point the knob can again span the whole 0-100% range.

(I also posted the question on unix.stackexchange 3 weeks ago or so, but I haven't received any answer since.)

Last edited by Enrico1989 (2022-11-12 18:48:10)

Offline

#2 2022-11-12 18:47:54

Enrico1989
Member
Registered: 2018-07-05
Posts: 329

Re: [SOLVED] Keyboard volume knob can't increase the volume after suspend

Well, the problem was very easy to solve.

In my .config/i3/config, I had this

bindsym XF86AudioRaiseVolume exec amixer -q set Master 1%+ unmute && pkill -RTMIN+1 i3blocks
bindsym XF86AudioLowerVolume exec amixer -q set Master 1%- unmute && pkill -RTMIN+1 i3blocks

which uses amixer to change the volume (and unmute if the audio is muted) and notify i3blocks unpon usage of the know (or the volume+/- buttons if the keyboard had those).

The fix was to change

amixer -q set

to

amixer -q -D pulse sset

in the lines above.

The idea came from looking at how the i3blocks' custom blocklet here uses amixer (see the line)

In reality I've verified that important part is

-D pulse

and not the change from

set

to

sset

which I don't what is for.

Offline

Board footer

Powered by FluxBB