linux-samus icon indicating copy to clipboard operation
linux-samus copied to clipboard

No ACPI events for headphone jack plug in/out?

Open byxorna opened this issue 9 years ago • 14 comments

After upgrading from the 4.4.x line to 4.7.2, the ACPI handler for jack/headphone never triggers when plugging into the headphone jack. Is CONFIG_SND_HDA_INPUT_JACK=y necessary? I am using the AUR build for linux-samus4:

[11:54:56] [gabe@ono-sendai-9] ( 1 ) /var/run
-> $ pacman -Q linux-samus4
linux-samus4 4.7-3

Anyone else have their headphone jack working?

[23:52:27] [gabe@ono-sendai-9] ( 0 ) ~/code/linux-samus/build master
-> $ uname -r
4.7.2-3-ph
[23:52:48] [gabe@ono-sendai-9] ( 0 ) ~/code/linux-samus/build master
-> $ zgrep JACK /proc/config.gz
CONFIG_SND_JACK=y
CONFIG_SND_JACK_INPUT_DEV=y
CONFIG_USB_SERIAL_CYBERJACK=m
# CONFIG_EXTCON_ADC_JACK is not set
[23:52:56] [gabe@ono-sendai-9] ( 0 ) ~/code/linux-samus/build master
-> $ acpi_listen 
<no output when plugging in headphones>

byxorna avatar Sep 11 '16 03:09 byxorna

Confirmed.

remexre avatar Sep 15 '16 03:09 remexre

Does it work if you compile the kernel with CONFIG_SND_HDA_INPUT_JACK=y ?

raphael avatar Sep 15 '16 03:09 raphael

That option seems to be unrecognized -- I compiled with it, but it didn't fix the problem and didn't show up from zgrep CONFIG_SND_HDA_INPUT_JACK /proc/config.gz

remexre avatar Sep 15 '16 06:09 remexre

I had the same experience. I tried to recompile as well with CONFIG_SND_HDA_INPUT_JACK=y, to no avail.

byxorna avatar Sep 17 '16 16:09 byxorna

looking over this, would #105 have any info on solving this?

wulvyrn avatar Dec 17 '16 22:12 wulvyrn

@wulvyrn ive looked, but that doesnt help. In my case (4.9.4-4-ph as of now), no acpi events are firing, so the acpid stuff never gets a chance to be invoked. do you see events on headphone plug/unplug when running acpi_listen?

byxorna avatar Jan 26 '17 23:01 byxorna

@byxorna I didn't see any events happening in the past. Right now I'm using stock and don't need sound.

wulvyrn avatar Jan 27 '17 00:01 wulvyrn

This is a problem on my end as well. It's worth noting that, during boot, the kernel spits this out.

rt5677 i2c-RT5677CE:00: Can't add headphone jack gpio
rt5677 i2c-RT5677CE:00: Can't add mic jack gpio

zacharied avatar Feb 01 '17 21:02 zacharied

I installed 4.10-4 today, and this issue still alive.

dmesg:

[    9.602862] bdw-rt5677 bdw-rt5677: snd-soc-dummy-dai <-> System Pin mapping ok
[    9.603698] rt5677 i2c-RT5677CE:00: Can't add headphone jack gpio
[    9.607565] rt5677 i2c-RT5677CE:00: Can't add mic jack gpio
[    9.607592] bdw-rt5677 bdw-rt5677: rt5677-aif1 <-> snd-soc-dummy-dai mapping ok
[    9.610547] input: bdw-rt5677 Headphone Jack as /devices/pci0000:00/INT3438:00/bdw-rt5677/sound/card0/input11
[    9.610604] input: bdw-rt5677 Mic Jack as /devices/pci0000:00/INT3438:00/bdw-rt5677/sound/card0/input12

proc (card0 is bdw-rt5677, card1 is hdmi)

/proc/asound/card0:
total 0
-r--r--r-- 1 root root 0 Mar 17 10:33 id
dr-xr-xr-x 3 root root 0 Mar 17 10:33 pcm0c
dr-xr-xr-x 3 root root 0 Mar 17 10:33 pcm0p

/proc/asound/card1:
total 0
-r--r--r-- 1 root root 0 Mar 17 10:33 codec#0
-rw-r--r-- 1 root root 0 Mar 17 10:33 eld#0.0
-rw-r--r-- 1 root root 0 Mar 17 10:33 eld#0.1
-rw-r--r-- 1 root root 0 Mar 17 10:33 eld#0.2
-r--r--r-- 1 root root 0 Mar 17 10:33 id
dr-xr-xr-x 3 root root 0 Mar 17 10:33 pcm3p
dr-xr-xr-x 3 root root 0 Mar 17 10:33 pcm7p
dr-xr-xr-x 3 root root 0 Mar 17 10:33 pcm8p

divinespear avatar Mar 17 '17 01:03 divinespear

I don't know if this helps anyone or is right to write this here, but I fixed this problem with a workaround following this discussion. I'm not using this same kernel described here, but I had the same problem in this issue, no acpi events for headphones jack plug/unplug -- which brings specific problems on pulseaudio detection for sink-ports redirection, I mean, no audio on my headphones and need to fix that manually calling pacmd set-sink-port 0 analog-output-headphones.

In general, the part which fix this was it: sudo pacman -S alsa-tools # contains hdajackretask sudo hdajackretask image

Select the Override option for the jack plugin desired, on my case Gree Headphone, Front Side and click on option Install boot override. Reboot.

For me works! Acpi_events for plug/unplug headphones.

I hope this helps someone. BTW, my kernel version is 4.9.35.

EDIT: In general this program just write a simple file on /etc/modprob.d

/etc/modprobe.d
❯ cat hda-jack-retask.conf
# This file was added by the program 'hda-jack-retask'.
# If you want to revert the changes made by this program, you can simply erase this file and reboot your computer.
options snd-hda-intel patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw

ryukinix avatar Jul 15 '17 15:07 ryukinix

@ryukinix which kernel are you using? You're using Pacman so I assume it's Arch, but 4.9 is many months old at this point for Arch.

The reason I ask is because none of the options in your screenshot are available on the Samus kernel.

rroll1 avatar Jul 31 '17 18:07 rroll1

Well, I'm using the version which I attached on my comment. Kernel version: 4.9.35. You can try just create the file hda-jack-retask.conf on the /etc/modprob.d directory. This probably will fix this problem if the modprob modules exists on your machine.

ryukinix avatar Jul 31 '17 22:07 ryukinix

I guess my question is: why are you using 4.9.35 when that's an outdated kernel for Arch? Is it because this is the only kernel that works with this workaround?

Creating the modprobe.d config file does not do anything.

rroll1 avatar Aug 01 '17 15:08 rroll1

That bad... Well, actually, I'm not tried to upgrade the kernel to avoid more problems with some drivers. I didn't tested with new versions of kernel, sorry. And, anyway, this is specific fix for HDA Intel drivers. Sorry for the messy.

ryukinix avatar Aug 01 '17 21:08 ryukinix