xmonad/xmonad-extras

Keybinding not modifying Master channel

davama opened this issue · 4 comments

Hello,

I currently have 3 different XMonad desktops all with xmonad-extras installed (office/work/laptop). On my newest one, I cannot get the mute/raisevolume/lowervolume function buttons to work.

Keybinding on xmonad.hs

 , ((0, 0x1008FF12), toggleMute >> spawn (myVol ++ " dzen")) -- requires xmonad-extras installed

Using xev pressing Fn+Alt+F9(toggleMute)

xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.keycode ([0-9]).* (., (.)).*$/\1 \2/p'

36 Return
121 XF86AudioMute
108 Alt_R

xmodmap -pk | grep XF86AudioMute

    121    	0x1008ff12 (XF86AudioMute)	0x0000 (NoSymbol)	0x1008ff12 (XF86AudioMute)	

The above keybinding works perfectly fine on my office/laptop desktop but not on my new work desktop. But I know that xmonad registers the keybinding because I changed the action to spawn myTerminal and it works fine. So I'm sure the keybinding producess the action but the Master channel is never affected.

Press Fn+F9 (hoping my Master gets toggled)

amixer -D pulse get Master

Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 45204 [69%] [on]
  Front Right: Playback 45204 [69%] [on]

No change 😞

Any input is much appreciated!

My cat .xmonad/stack.yaml | grep -v "^#"

resolver: lts-14.5
packages:
- xmonad-git/xmonad
- xmonad-git/xmonad-contrib
- xmonad-git/xmonad-extras

Thank you,
Dave

What is "myVol"? And perhaps more important, why are you appending "dzen" to it?

Thanks for the reply @geekosaur

myVol is a small script that outputs the current volume percentage and just outputs it visually to dzen. It is spawned after toggleMute which is part of Volume.hs actions

Update:
added debug

import XMonad.Hooks.DebugKeyEvents
 <+> debugKeyEvents

and found these logs:

keycode 121 sym 269025042  ( 0x1008ff12  " XF86AudioMute ") mask 0x10 (mod2) clean 0x0 ()
AlsaException.Cons "snd_mixer_attach" "No such file or directory" (Errno 2)

Will dig to see what this means... suspect user error 😞

Ok, yes user error!

~/.asoundrc had wrong card #

Thanks