Bug 208005 - Headphones are not being detected on ASUS Zephyrus M/S GU502/DU502
Summary: Headphones are not being detected on ASUS Zephyrus M/S GU502/DU502
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-01 06:51 UTC by iancmx
Modified: 2020-08-08 07:00 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.4.43-1
Tree: Mainline
Regression: No


Attachments
no option to select headphones when plugged in, seems like headphones are undetected (26.54 KB, image/png)
2020-06-01 06:51 UTC, iancmx
Details
Test fix patch (1.27 KB, patch)
2020-06-17 07:37 UTC, Takashi Iwai
Details | Diff

Description iancmx 2020-06-01 06:51:41 UTC
Created attachment 289441 [details]
no option to select headphones when plugged in, seems like headphones are undetected

Linux is unable to detect headset on the Asus Zephyrus M GU502. When headphones are plugged in, the audio settings remains as Speakers (Built-in Audio Analag Stereo). Audio works perfectly on internal speakers but is unable to output to headphones. Under pavucontrol, there is no option to choose headphones even when headphones is plugged in. 

Other people experiencing the same problem:
https://forums.linuxmint.com/viewtopic.php?t=306891
https://askubuntu.com/questions/1179834/asus-m-gu502-unable-to-detect-headsets-in-ubuntu-18-04
https://forum.manjaro.org/t/headphones-not-detected-kde/145544


The sound card is ALC294 Analog
Comment 1 iancmx 2020-06-01 06:54:04 UTC
I forgot to mention that the audio jack on the Zephyrus M is a audio mic combo jack
Comment 4 Takashi Iwai 2020-06-16 13:44:27 UTC
You can try the different quirk for your device, e.g. add the following line

  SND_PCI_QUIRK(0x1043, 0x1881, "ASUS GU502", ALC294_FIXUP_ASUS_HPE),

in alc269_fixup_tbl[] in sound/pci/hda/patch_realtek.c
This will apply the same quirk as ASUS B9450FA that includes the headset support.

In anyway, please upload alsa-info.sh to Bugzilla, too.
Comment 6 iancmx 2020-06-17 00:12:12 UTC
(In reply to Takashi Iwai from comment #4)
> You can try the different quirk for your device, e.g. add the following line
> 
>   SND_PCI_QUIRK(0x1043, 0x1881, "ASUS GU502", ALC294_FIXUP_ASUS_HPE),
> 
> in alc269_fixup_tbl[] in sound/pci/hda/patch_realtek.c
> This will apply the same quirk as ASUS B9450FA that includes the headset
> support.
> 
> In anyway, please upload alsa-info.sh to Bugzilla, too.

where is the patch_realtek.c located? i did cd /sound and folder does not exist
Comment 7 Takashi Iwai 2020-06-17 07:33:25 UTC
It's in sound/pci/hda/patch_realtek.c in Linux kernel tree.  After patching, compile the kernel, install and retest.
Comment 8 Takashi Iwai 2020-06-17 07:37:42 UTC
Created attachment 289713 [details]
Test fix patch
Comment 9 iancmx 2020-06-28 04:05:09 UTC
I've installed and tested the fix patch. Now plugging in a headset would detect the external headset microphone. However, the sound output is still not showing a headset and only showing speaker as an option.
Comment 10 iancmx 2020-06-28 04:12:13 UTC
After some experiments, using hdajackrestask and mapping 0x19 to microphone, I am able to get the headeset microphone to work. Before remapping it and using the kernel, it was still unable to work.

Headset audio still does not work tho.
Comment 11 iancmx 2020-06-28 04:16:05 UTC
Just to follow up, I also remapped 0x21 to headphones, which enabled headphone detection, but theres still no audio coming from the headphone. Remapping 0x21 to headphones and 0x19 to microphone are both required to get the headset microphone to work and headphone jack DETECTION  (still no audio).
Comment 12 iancmx 2020-07-02 00:44:58 UTC
Disregard my previous 3 messages, i felt like ive explained what Ive done extremely poorly. After installing your patch, when I plug my headset in, linux detected the headset mic but it was not working properly. Headphones were still not being detected. I remapped pin 0x21 to headphones on HDAjackretask, and this cause headphone to be DETECTED (still no audio) and the mimcrophone from the headset to function perfectly. If you need any logs please let me know.
Comment 13 iancmx 2020-07-02 00:46:44 UTC
My current pincfg:
[codec]
0x10ec0294 0x10431881 0

[pincfg]
0x12 0x90a60120
0x13 0x40000000
0x14 0x411111f0
0x15 0x411111f0
0x16 0x411111f0
0x17 0x90170110
0x18 0x411111f0
0x19 0x01a1103c
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x40600001
0x1e 0x411111f0
0x1f 0x411111f0
0x21 0x0321403f
Comment 14 iancmx 2020-07-02 00:47:59 UTC
the pin cfg i posted above was after applying your patch and remapping 0x21 to headphones on hdajackretask
Comment 15 iancmx 2020-07-05 04:19:19 UTC
Even though I have that pincfg, the default for 0x21 isn't changing to what the pincfg has:

Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
Comment 16 lestairon 2020-07-22 10:38:12 UTC
(In reply to iancmx from comment #6)
> (In reply to Takashi Iwai from comment #4)
> > You can try the different quirk for your device, e.g. add the following
> line
> > 
> >   SND_PCI_QUIRK(0x1043, 0x1881, "ASUS GU502", ALC294_FIXUP_ASUS_HPE),
> > 
> > in alc269_fixup_tbl[] in sound/pci/hda/patch_realtek.c
> > This will apply the same quirk as ASUS B9450FA that includes the headset
> > support.
> > 
> > In anyway, please upload alsa-info.sh to Bugzilla, too.
> 
> where is the patch_realtek.c located? i did cd /sound and folder does not
> exist

Already installed the kernel and didn't work for me. It is the same machine listed on that patch
Comment 17 iancmx 2020-07-27 07:13:15 UTC
The patch indeed does not work. I have experimented with different hdadjackretask settings buts still unable to get it to work
Comment 18 iancmx 2020-08-08 06:41:01 UTC
Anyone has any tips on solving this bug is greatly appreciated. There are many other people facing the same issue with this laptop, and I would like to find a fix as sooon as possible.

Note You need to log in before you can comment on or make changes to this bug.