You are not logged in.

#1 2018-03-05 21:31:05

Sleepful
Member
Registered: 2017-08-14
Posts: 30

[SOLVED]Volume keys affect wrong audio output -HDMI instead of analog

I have two monitors, I connect them through an HDMI cable but I connect my speakers through the analog headphone port. The HDMI and the Headphone port both show as sound cards in alsamixer, the problem is that when I use the volume function keys they only change the volume of the HDMI one, which I'm not using. I can change the volume of the analog output through the volume widget in KDE, but I cant change it through my volume function keys, even when it is selected as the default. How do I fix this?

Edit: Disconnecting the HDMI and restarting doesn't solve the problem, the HDMI sound card is still there and it's still the one affected by FN keys



SOLVED:


im using Sxhkd, that's how i got the volume keys to work on the laptop, but they were hardwired to the card #0, and I guess the first time i connected the hdmi monitor it created a different card #0, so it was just a matter of changing the code in the sxhkd config file to the card #1:

XF86AudioLowerVolume 
	sh -c "pactl set-sink-mute 1 false ; pactl set-sink-volume 1 -5%"

XF86AudioRaiseVolume
	sh -c "pactl set-sink-mute 1 false ; pactl set-sink-volume 1 +5%"

XF86AudioMute
	pactl set-sink-mute 1 toggle

Last edited by Sleepful (2018-03-05 21:44:52)

Offline

Board footer

Powered by FluxBB