You are not logged in.

#1 2024-09-06 21:47:42

bluesinx
Member
Registered: 2024-09-06
Posts: 2

[SOLVED] KEY_PLAYPAUSE generated each 10 sec when jack plug connected

Hello fellow archers,

When headphones or anything are plugged into the JACK socket, "/dev/input/event11 HDA Intel PCH Headphone" generates an EV_KEY (KEY_PLAYPAUSE) event periodically each 10-13 seconds. When a plug is unplugged from the JACK socket the problem stops. It's annoying when I'm working in a terminal and every few seconds a string representing KEY_PLAYPAUSE appears, which I then have to delete. The problem started a few months ago after a system upgrade. I can't pinpoint the exact moment, nor the kernel version I had at the time. At first I tried to fix it myself, but it was a bit overwhelming. Has anyone ever encountered similar issue?


 -> sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:	Lid Switch
/dev/input/event1:	Power Button
/dev/input/event10:	HDA Intel PCH Mic
/dev/input/event11:	HDA Intel PCH Headphone
/dev/input/event12:	HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event13:	HDA Intel PCH HDMI/DP,pcm=7
/dev/input/event14:	HDA Intel PCH HDMI/DP,pcm=8
/dev/input/event15:	SynPS/2 Synaptics TouchPad
/dev/input/event16:	Logitech G502 HERO Gaming Mouse
/dev/input/event17:	Logitech G502 HERO Gaming Mouse Keyboard
/dev/input/event18:	SONiX USB DEVICE
/dev/input/event19:	SONiX USB DEVICE Keyboard
/dev/input/event2:	Sleep Button
/dev/input/event20:	Sound Blaster JAM (AVRCP)
/dev/input/event3:	Power Button
/dev/input/event4:	AT Translated Set 2 keyboard
/dev/input/event5:	Logitech M705
/dev/input/event6:	Video Bus
/dev/input/event7:	PC Speaker
/dev/input/event8:	Ideapad extra buttons
/dev/input/event9:	Video Bus
Select the device event number [0-20]: 11
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "HDA Intel PCH Headphone"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 164 (KEY_PLAYPAUSE)
    Event code 582 (KEY_VOICECOMMAND)
  Event type 5 (EV_SW)
    Event code 2 (SW_HEADPHONE_INSERT) state 1
Properties:
Testing ... (interrupt to exit)
Event: time 1725658570.200841, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 1
Event: time 1725658570.200841, -------------- SYN_REPORT ------------
Event: time 1725658570.200854, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 0
Event: time 1725658570.200854, -------------- SYN_REPORT ------------
^[[57428uEvent: time 1725658583.834294, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 1
Event: time 1725658583.834294, -------------- SYN_REPORT ------------
Event: time 1725658583.834305, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 0
Event: time 1725658583.834305, -------------- SYN_REPORT ------------
^[[57428u^C
 -> uname -a
Linux black 6.10.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 19 Aug 2024 17:02:39 +0000 x86_64 GNU/Linux
 -> lsmod | grep hda
snd_hda_codec_hdmi     98304  1
snd_soc_hda_codec      28672  1 snd_soc_avs
snd_hda_codec_realtek   208896  1
snd_hda_ext_core       36864  2 snd_soc_avs,snd_soc_hda_codec
snd_hda_codec_generic   110592  1 snd_hda_codec_realtek
snd_soc_core          458752  2 snd_soc_avs,snd_soc_hda_codec
snd_hda_scodec_component    20480  1 snd_hda_codec_realtek
snd_hda_intel          65536  1
snd_intel_dspcfg       40960  2 snd_soc_avs,snd_hda_intel
snd_hda_codec         212992  6 snd_hda_codec_generic,snd_soc_avs,snd_hda_codec_hdmi,snd_soc_hda_codec,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          147456  8 snd_hda_codec_generic,snd_soc_avs,snd_hda_codec_hdmi,snd_soc_hda_codec,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              20480  2 snd_usb_audio,snd_hda_codec
snd_pcm               200704  9 snd_soc_avs,snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_compress,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
snd                   155648  20 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_ump,snd_pcm,snd_rawmidi
 -> inxi -F
System:
  Host: black Kernel: 6.10.6-arch1-1 arch: x86_64 bits: 64
  Desktop: bspwm v: 0.9.10 Distro: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 80NV v: Lenovo ideapad Y700-15ISK
    serial: <superuser required>
  Mobo: LENOVO model: Allsparks 5A v: NO DPK serial: <superuser required>
    UEFI: LENOVO v: CDCN53WW date: 09/19/2016
Battery:
  ID-1: BAT0 charge: 25.1 Wh (100.0%) condition: 25.1/60.0 Wh (41.8%)
CPU:
  Info: quad core model: Intel Core i7-6700HQ bits: 64 type: MT MCP cache:
    L2: 1024 KiB
  Speed (MHz): avg: 799 min/max: 800/3500 cores: 1: 800 2: 800 3: 800 4: 800
    5: 800 6: 799 7: 800 8: 800
Graphics:
  Device-1: Intel HD Graphics 530 driver: i915 v: kernel
  Device-2: NVIDIA GM107M [GeForce GTX 960M] driver: nvidia v: 560.35.03
  Device-3: Intel RealSense 3D Camera (Front F200) driver: uvcvideo
    type: USB
  Display: unspecified server: X.Org v: 21.1.13 with: Xwayland v: 24.1.2
    driver: X: loaded: intel,nvidia unloaded: modesetting dri: i965 gpu: i915
    resolution: 1: 1920x1200~60Hz 2: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: iris,nvidia,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.2.2-arch1.1
    renderer: Mesa Intel HD Graphics 530 (SKL GT2)
  API: Vulkan v: 1.3.279 drivers: nvidia surfaces: xcb,xlib
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio driver: snd_hda_intel
  API: ALSA v: k6.10.6-arch1-1 status: kernel-api
  Server-1: PipeWire v: 1.2.3 status: active
Network:
  Device-1: Intel Wireless 8260 driver: iwlwifi
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: r8169
Bluetooth:
  Device-1: Intel Bluetooth wireless interface driver: btusb type: USB
  Report: btmgmt ID: hci0 state: up address: hidden bt-v: 4.2
Drives:
  Local Storage: total: 1.36 TiB used: 367.43 GiB (26.3%)
  ID-1: /dev/nvme0n1 vendor: Crucial model: CT500P5SSD8 size: 465.76 GiB
  ID-2: /dev/sda vendor: Western Digital model: WD10SPCX-24HWST1
    size: 931.51 GiB
Partition:
  ID-1: / size: 438.68 GiB used: 366.67 GiB (83.6%) fs: ext4
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: partition size: 16 GiB used: 783.5 MiB (4.8%)
    dev: /dev/nvme0n1p2
Sensors:
  System Temperatures: cpu: 36.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 8 GiB available: 7.59 GiB used: 4.01 GiB (52.8%)
  Processes: 277 Uptime: 12h 38m Shell: Zsh inxi: 3.3.35

Last edited by bluesinx (2024-09-07 20:18:06)

Offline

#2 2024-09-07 20:16:52

bluesinx
Member
Registered: 2024-09-06
Posts: 2

Re: [SOLVED] KEY_PLAYPAUSE generated each 10 sec when jack plug connected

I found the solution. The issue lies in power saving settings of snd_hda_intel module. When I checked its parameters, it has shown me power_save = "10". After changing this setting to "0", the problem with cyclic KEY_PLAYPAUSE key press disappeared.

 -> systool -vm snd_hda_intel
Module = "snd_hda_intel"

  Attributes:
    coresize            = "65536"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "1"
    srcversion          = "hidden"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    align_buffer_size   = "-1"
    bdl_pos_adj         = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    beep_mode           = "N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N"
    ctl_dev_id          = "N"
    dmic_detect         = "Y"
    enable_msi          = "-1"
    enable              = "Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y"
    id                  = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    index               = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    jackpoll_ms         = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
    model               = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    patch               = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    pm_blacklist        = "Y"
    position_fix        = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    power_save          = "10"
    power_save_controller= "Y"
    probe_mask          = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    probe_only          = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
    single_cmd          = "-1"
    snoop               = "-1"

  Sections:

I created /etc/modprobe.d/disable_power_save_snd_hda_intel.conf with the following content and restarted the computer, which reloaded snd_hda_intel module and solved the problem.

options snd_hda_intel power_save=0

Offline

Board footer

Powered by FluxBB