NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/56738: ukbd(4): PMFE_AUDIO_VOLUME* event issue, Xorg KeyPress events ...



>Number:         56738
>Category:       kern
>Synopsis:       ukbd(4): PMFE_AUDIO_VOLUME* event issue, Xorg KeyPress events ...
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 03 11:10:00 +0000 2022
>Originator:     Anthony Mallet
>Release:        9.99.91
>Organization:
>Environment:
NetBSD cactus 9.99.91 NetBSD 9.99.91 (CACTUS) #7: Sun Oct 17 18:33:59 CEST 2021  troot@cactus:/usr/obj/sys/arch/amd64/compile/CACTUS amd64

>Description:
1/ It seems that the VOLUME_* keys on my sun type 6 USB keyboard don't generate any PMF event. Or I am not able to track them properly:
powerd -d doesn't reveal anything and remains silent, and audio volume is not changing either.

I wonder if the culprit is not here (ukbd.c rev. 1.112):
https://anonhg.netbsd.org/src/diff/86b43c598d20/sys/dev/usb/ukbd.c#l1.61

As I understand pmf_event_inject(9), the 'dev' argument should be NULL so that audio(4) can receive the event?

2/ Maybe this should be a separate PR, but with the related commit of ukbd.c rev. 1.120 that actually uses the PMF framework introduced in 1.112 for those VOLUME_* keys:
https://anonhg.netbsd.org/src/diff/c1fc7c88275a/sys/dev/usb/ukbd.c

I don't receive any Xorg KeyPress event anymore for those keys (as expected). I've the feeling that removing the 'else' branch in
https://anonhg.netbsd.org/src/diff/86b43c598d20/sys/dev/usb/ukbd.c#l1.65
i.e. generating the PMF event and still registering the key event should allow both PMF and Xorg KeyPress to work.


3/ Is there a way to make this PMF event conditional? I want to avoid controlling my local audio with those keys and rather bind some custom script to the Xorg KeyPress event (or a powerd(8) hotkey event for that matter) to control my remote, connected HiFi power amp :)

PS: right now http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/usb/ukbd.c is telling me "Error parsing RCS output: kassert that we aren't overflowing the array.". Should I PR this?

>How-To-Repeat:
1/ Plug a sun type 6/7 USB keyboard and try to mute audio.
2/ Try to catch and Xorg KeyPress event with e.g audio mute key.
3/ Try to write some custom script for powerd(8) bound to the audio mute key, and do not mess with local audio at all.

>Fix:



Home | Main Index | Thread Index | Old Index