mikas blog " Blog Archive " The mysterious XF86AudioPlay issue
mikas blog
… and even if no one reads it
Don't understand german? Read or subscribe to my english-only feed.
" apt, SHA-1 keys + 2026-02-01
The mysterious XF86AudioPlay issue
I was getting " is undefined" in the status bar of Emacs displayed every 2-3 seconds. Nowhere else I noticed any misbehavior or problems, and also couldn’t find any related log entries. It didn’t stop, though didn’t want to reboot my system to see whether that would fix the problem, but it was driving me nuts.
Now, as a starting point I adjusted my sway configuration, to react to the XF86AudioPlay key press event:
bindsym XF86AudioPlay exec playerctl play-pause
After reloading sway, my music player started to play for 2-3 seconds, stopped playing, started again, etc. It wasn’t a Emacs bug, but something indeed seemed to send the XF86AudioPlay key event every 2-3 seconds. It wasn’t my USB keyboard or any stuck key on it, as verified also by unplugging it. So which device was causing this?
libinput from libinput-tools to the rescue:
% sudo libinput debug-events<br>[...]<br>-event12 KEYBOARD_KEY +0.000s KEY_PLAYPAUSE (164) pressed<br>event12 KEYBOARD_KEY +0.000s KEY_PLAYPAUSE (164) released<br>event12 KEYBOARD_KEY +2.887s KEY_PLAYPAUSE (164) pressed<br>event12 KEYBOARD_KEY +2.887s KEY_PLAYPAUSE (164) released<br>event12 KEYBOARD_KEY +5.773s KEY_PLAYPAUSE (164) pressed<br>event12 KEYBOARD_KEY +5.774s KEY_PLAYPAUSE (164) released<br>[...]
The `event12` device was sending this event, what’s behind this?
% sudo udevadm info /dev/input/event12<br>P: /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input17/event12<br>M: event12<br>R: 12<br>J: c13:76<br>U: input<br>D: c 13:76<br>N: input/event12<br>L: 0<br>S: input/by-path/pci-0000:00:1f.3-platform-skl_hda_dsp_generic-event<br>E: DEVPATH=/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input17/event12<br>E: DEVNAME=/dev/input/event12<br>E: MAJOR=13<br>E: MINOR=76<br>E: SUBSYSTEM=input<br>E: USEC_INITIALIZED=12468722<br>E: ID_INPUT=1<br>E: ID_INPUT_KEY=1<br>E: ID_INPUT_SWITCH=1<br>E: ID_PATH=pci-0000:00:1f.3-platform-skl_hda_dsp_generic<br>E: ID_PATH_TAG=pci-0000_00_1f_3-platform-skl_hda_dsp_generic<br>E: XKBMODEL=pc105<br>E: XKBLAYOUT=us<br>E: XKBOPTIONS=lv3:ralt_switch,compose:rctrl<br>E: BACKSPACE=guess<br>E: LIBINPUT_DEVICE_GROUP=0/0/0:ALSA<br>E: DEVLINKS=/dev/input/by-path/pci-0000:00:1f.3-platform-skl_hda_dsp_generic-event<br>E: TAGS=:power-switch:<br>E: CURRENT_TAGS=:power-switch:
% sudo udevadm info -a /dev/input/event12 | grep -iE 'kernels|drivers|name'<br>KERNELS=="input17"<br>DRIVERS==""<br>ATTRS{name}=="sof-hda-dsp Headphone"<br>KERNELS=="card0"<br>DRIVERS==""<br>KERNELS=="skl_hda_dsp_generic"<br>DRIVERS=="skl_hda_dsp_generic"<br>KERNELS=="0000:00:1f.3"<br>DRIVERS=="sof-audio-pci-intel-tgl"<br>KERNELS=="pci0000:00"<br>DRIVERS==""
Behind this event12 is sof-hda-dsp Headphone, and evtest confirms that:
% sudo evtest<br>No device specified, trying to scan all of /dev/input/event*<br>Available devices:<br>/dev/input/event0: AT Translated Set 2 keyboard<br>/dev/input/event1: Sleep Button<br>/dev/input/event10: ThinkPad Extra Buttons<br>/dev/input/event11: sof-hda-dsp Mic<br>/dev/input/event12: sof-hda-dsp Headphone<br>/dev/input/event13: sof-hda-dsp HDMI/DP,pcm=3<br>/dev/input/event14: sof-hda-dsp HDMI/DP,pcm=4<br>/dev/input/event15: sof-hda-dsp HDMI/DP,pcm=5<br>/dev/input/event16: Yubico YubiKey OTP+FIDO+CCID<br>/dev/input/event17: Apple Inc. Magic Keyboard with Numeric Keypad<br>/dev/input/event18: Apple Inc. Magic Keyboard with Numeric Keypad<br>[...]<br>Select the device event number [0-24]: ^C
We can even get further information:
% sudo evtest /dev/input/event12<br>Input driver version is 1.0.1<br>Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0<br>Input device name: "sof-hda-dsp Headphone"<br>Supported events:<br>Event type 0 (EV_SYN)<br>Event type 1 (EV_KEY)<br>Event code 114 (KEY_VOLUMEDOWN)<br>Event code 115 (KEY_VOLUMEUP)<br>Event code 164 (KEY_PLAYPAUSE)<br>Event code 582 (KEY_VOICECOMMAND)<br>Event type 5 (EV_SW)<br>Event code 2 (SW_HEADPHONE_INSERT) state 0<br>Properties:<br>Testing ... (interrupt to exit)<br>Event: time 1779295060.175766, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 1<br>Event: time 1779295060.175766, -------------- SYN_REPORT ------------<br>Event: time 1779295061.951168, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 1<br>Event: time 1779295061.951168, -------------- SYN_REPORT ------------<br>Event: time 1779295061.951194, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 0<br>Event: time 1779295061.951194, -------------- SYN_REPORT ------------<br>Event: time 1779295064.548671, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 1<br>Event: time 1779295064.548671, -------------- SYN_REPORT ------------<br>Event: time 1779295064.548689, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 0<br>Event: time 1779295064.548689, -------------- SYN_REPORT ------------<br>Event: time 1779295067.437172, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 1<br>Event: time 1779295067.437172, -------------- SYN_REPORT ------------<br>Event: time 1779295067.437187, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE),...