You are not logged in.

#1 2017-09-23 08:48:22

nbd
Member
Registered: 2014-08-04
Posts: 389

[SOLVED] Sound doesn't unmute through the "Mute" key

I think I have seen on the forum a post header describing a similar problem but cannot find that post. I'm using Pulseaudio and have the problem that I can mute the sound with the Mute keyboard key, but next presses of the key don't unmute the sound.

I found in the Internet a recipe to solve the problem by assigning to the Mute key the command:

amixer -D pulse sset Master toggle

and it works OK when run from the terminal. But it doesn't work with the Mute key. I'm using XFCE and assigned the command to the XF86AudioMute key in the "Keyboard/Application Shortcuts" settings dialog.

I have Pavuc installed and the sound can only be unmuted through it. Unmuting through the XFCE "Audio Mixer" GUI app doesn't work.

I tried to create a script with the command and call that script with the Mute key, but this hasn't help.

How can the Mute key be configured so that it toggle the sound?

Thanks.

Last edited by nbd (2017-09-24 01:08:19)


bing different

Offline

#2 2017-09-23 08:57:23

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Sound doesn't unmute through the "Mute" key

Does using pulseaudio-ctl instead of amixer work? It's what I use for my keybinds in herbstluftwm...

...
hc keybind XF86AudioMute spawn pulseaudio-ctl mute
hc keybind XF86AudioRaiseVolume spawn pulseaudio-ctl up
hc keybind XF86AudioLowerVolume spawn pulseaudio-ctl down
...

Ignore everything up to and including spawn for your use case, you only need the pulseaudio-ctl command.

Last edited by Slithery (2017-09-23 09:10:48)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-09-24 00:34:07

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: [SOLVED] Sound doesn't unmute through the "Mute" key

Is using 341 line script from AUR really the only way to make (de-facto standard) PA work with keyboard buttons? Or it's just for some marginal cases?

Last edited by nbd (2017-09-24 00:34:37)


bing different

Offline

#4 2017-09-24 00:59:24

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,657

Re: [SOLVED] Sound doesn't unmute through the "Mute" key

You can also use

pactl set-sink-volume @DEFAULT_SINK@ +5% #Or whatever increment you want
pactl set-sink-volume @DEFAULT_SINK@ -5%
pactl set-sink-mute @DEFAULT_SINK@ toggle

ultimately that xfce plugins don't catch this is imo a bug in xfce plugins. Normally whatever is controlling the pulse mixer should be handling these as well. And did you make sure that you use xfce4-pulseaudio-plugin and not the old mixer applet?

Last edited by V1del (2017-09-24 01:04:09)

Online

#5 2017-09-24 01:07:46

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: [SOLVED] Sound doesn't unmute through the "Mute" key

V1del wrote:

And did you make sure that you use xfce4-pulseaudio-plugin and not the old mixer applet?

I was indeed using the old applet. Many thanks!


bing different

Offline

#6 2017-09-24 01:10:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,657

Re: [SOLVED] Sound doesn't unmute through the "Mute" key

Yes that one is unmaintained and relied on mixer functionality in gstreamer 0.10 which is also unmaintained, so it doesn't surprise me you ran into issues with that.

Last edited by V1del (2017-09-24 01:11:01)

Online

Board footer

Powered by FluxBB