raphael / linux-samus

Linux 4.16 on Chromebook Pixel 2015
GNU General Public License v2.0
181 stars 36 forks source link

No ACPI events for headphone jack plug in/out? #157

Open byxorna opened 8 years ago

byxorna commented 8 years ago

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>
remexre commented 8 years ago

Confirmed.

raphael commented 8 years ago

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

remexre commented 8 years ago

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

byxorna commented 8 years ago

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

wulvyrn commented 7 years ago

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

byxorna commented 7 years ago

@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?

wulvyrn commented 7 years ago

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

zacharied commented 7 years ago

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
divinespear commented 7 years ago

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
ryukinix commented 7 years ago

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
rroll1 commented 7 years ago

@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.

ryukinix commented 7 years ago

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.

rroll1 commented 7 years ago

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.

ryukinix commented 7 years ago

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.