Bug 206289

Summary: No sound on ASUS Zenbook UX533FTC
Product: Drivers Reporter: Victor Zubrilov (victor.zubrilov)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED OBSOLETE    
Severity: high CC: 4progs, erikmnkl, johnbat26, jwrdegoede, kai.heng.feng, rakic.iwan, rezaalavi, seugenev, tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.4 Subsystem:
Regression: No Bisected commit-id:
Attachments: alsa-info
Proposed kernel patch to fix this

Description Victor Zubrilov 2020-01-23 14:13:26 UTC
Created attachment 286951 [details]
alsa-info

Headphones: no sound (crackle at a volume of 100%)
Speakers: no sound
Comment 1 Takashi Iwai 2020-02-14 15:10:00 UTC
I see nothing obviously wrong in the log.

Please try to test the raw ALSA output, not via PulseAudio, e.g.
  aplay -Dplughw:1 -vv foo.wav

If the problem is still confirmed, try to figure out the pins, e.g. using hdajackretask.  The headphone pin can be usually figured out easily by watching the jack detection.
Comment 2 Victor Zubrilov 2020-02-14 15:53:05 UTC
(In reply to Takashi Iwai from comment #1)
> I see nothing obviously wrong in the log.
> 
> Please try to test the raw ALSA output, not via PulseAudio, e.g.
>   aplay -Dplughw:1 -vv foo.wav
> 
> If the problem is still confirmed, try to figure out the pins, e.g. using
> hdajackretask.  The headphone pin can be usually figured out easily by
> watching the jack detection.

I've tried it all before, but to no avail.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1850439
Comment 3 Takashi Iwai 2020-02-14 16:08:53 UTC
Then I have no more clue.

You can try to boot with snd_hda_intel.model=generic so that the generic parser is used instead of Realtek codec driver.  It excludes the possibility that Realtek-specific quirk does something wrong.
Comment 4 Victor Zubrilov 2020-02-14 16:21:58 UTC
I tried, but the sound is still not working :(
Comment 5 Eugene Batogov 2020-02-17 16:08:54 UTC
Asus Zenbook 15 UX533 FTC
Ubuntu 19.10
Kernel: 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
 
The same problem with sound :(
Comment 6 Eugene Batogov 2020-02-17 16:13:01 UTC
dmesg | grep hda:  https://gist.github.com/JohnBat26/0519c48c7df20ba8ebd3a2f47f962ad8
Comment 7 Eugene Batogov 2020-02-17 18:40:31 UTC
My alsa info: http://alsa-project.org/db/?f=9f087f5038e450cf77cdf21d21f86af763626d787
Comment 9 Eugene Batogov 2020-02-18 08:41:32 UTC
With HDMI sound all ok
Comment 10 Roman Kondrashov 2020-04-29 18:21:31 UTC
I have same problem in Ubuntu 19.10 on ASUS UX 534F!

My question on Habr:
https://qna.habr.com/q/743773

Problem not solved yet.
Comment 11 Erikas Rudinskas 2020-05-07 21:30:33 UTC
Problem not solved yet. No workarounds in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1850439 neither...
Comment 12 Erikas Rudinskas 2020-06-01 20:52:38 UTC
Workaround for audio is available here: https://bugs.launchpad.net/bugs/1850439

If microphone does not work out of the box (likely UX533FTC models), there seem to be no workaround for this. Only audio works for now.
Comment 13 Hans de Goede 2020-06-23 09:59:01 UTC
Hi All,

We (upstream kernel devs) are currently working with Realtek to get to the bottom of this, once we know what the exact settings are which need to be applied we can then add a quirk to the kernel to do this automatically.

Realtek is asking for people with an affected laptop model to test the following 4 commands / register settings:

hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x7774
hda-verb /dev/snd/hwC0D0 0x20 0x500 0x45
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x5289

If possible please check all 4 of:

1. Speakers
2. Headphones output
3. Internal mic.
4. Headset mic. (using a phone headset with builtin mic with a single T-R-R-S connector)

After testing please report back here what works (and what does not work) after issueing the 4 above commands; and please do not forget to also let us know what model laptop you have.
Comment 14 rezaalavi 2020-06-24 00:39:09 UTC
Hi Hans,

I am more than happy to provide the requested details but I am not sure what exactly you want me to do.

First, there is no hwC0D0 under /dev/snd.
Here is the content of that directory on my machine:
by-id  by-path  controlC0  controlC1  hwC1D0  hwC1D2  pcmC0D0c  pcmC0D0p  pcmC1D0c  pcmC1D0p  pcmC1D10p  pcmC1D3p  pcmC1D7p  pcmC1D8p  pcmC1D9p  seq  timer

Which one should I use?

Secondly: Do you only need the output of those 3 commands? or am I supposed to run each separately and see if anyone of them makes the speaker work?

Thank you.
Comment 15 rezaalavi 2020-06-24 00:44:46 UTC
sudo hda-verb /dev/snd/hwC1D0 0x20 0x500 0xf
sudo hda-verb /dev/snd/hwC1D0 0x20 0x477 0x74

Made the speaker work.
Asus UX534F
Comment 16 Erikas Rudinskas 2020-06-24 08:42:30 UTC
1. Performed full shutdown from Linux (no dualboot here).
2. Powered on
3. Executed below 4 commands:

hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x7774
hda-verb /dev/snd/hwC0D0 0x20 0x500 0x45
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x5289

4. Performed tests:

1. Speakers: works
2. Headphones output: works
3. Internal mic: doesn't work
4. Headset mic: works

Additional notes: When I plugged in headphones, opened 'pavucontrol' and changed microphone source (from internal mic to headphones mic, and vice versa) - doesn't matter which input source I select, laptop always ends up capturing audio through headphones microphone (even if I set internal mic to be active input source).

Exact model: UX533FTC-A8221R
Comment 17 Hans de Goede 2020-06-24 13:12:58 UTC
(In reply to rezaalavi from comment #15)
> sudo hda-verb /dev/snd/hwC1D0 0x20 0x500 0xf
> sudo hda-verb /dev/snd/hwC1D0 0x20 0x477 0x74
> 
> Made the speaker work.

Thank you for testing. That these 2 commands help was already mentioned in the Ubuntu bug. Can you please test the 4 commands from comment 13 with the hwC0D0 replaced by hwC1D0 so that you get this:

hda-verb /dev/snd/hwC1D0 0x20 0x500 0xf
hda-verb /dev/snd/hwC1D0 0x20 0x400 0x7774
hda-verb /dev/snd/hwC1D0 0x20 0x500 0x45
hda-verb /dev/snd/hwC1D0 0x20 0x400 0x5289

Note the first 2 commands are equivalent to the ones you have already confirmed to make the speakers work.

And then test these 4 things:

1. Speakers
2. Headphones output
3. Internal mic.
4. Headset mic. (using a phone headset with builtin mic with a single T-R-R-S connector)
Comment 18 Hans de Goede 2020-06-24 13:36:27 UTC
(In reply to Erikas Rudinskas from comment #16)
> 4. Performed tests:
> 
> 1. Speakers: works
> 2. Headphones output: works
> 3. Internal mic: doesn't work
> 4. Headset mic: works
> 
> Exact model: UX533FTC-A8221R

Thank you. I've forwarded this to the Realtek developer I'm working with, hopefully he can do something about the internal mic. not working.
Comment 19 rezaalavi 2020-06-24 13:45:47 UTC
(In reply to Hans de Goede from comment #17)
> (In reply to rezaalavi from comment #15)
> > sudo hda-verb /dev/snd/hwC1D0 0x20 0x500 0xf
> > sudo hda-verb /dev/snd/hwC1D0 0x20 0x477 0x74
> > 
> And then test these 4 things:
> 
> 1. Speakers
> 2. Headphones output
> 3. Internal mic.
> 4. Headset mic. (using a phone headset with builtin mic with a single
> T-R-R-S connector)

1. Speaker works
2. I don't have a headphone
3. Internal mic does not work
4. Don't have a headset to test.

Asus UX534F

It is great that the speaker now works. Based on other comments it seems the only missing piece is now the internal mic.
Comment 20 Hans de Goede 2020-07-03 14:49:05 UTC
(In reply to rezaalavi from comment #19)
> (In reply to Hans de Goede from comment #17)
> > (In reply to rezaalavi from comment #15)
> > > sudo hda-verb /dev/snd/hwC1D0 0x20 0x500 0xf
> > > sudo hda-verb /dev/snd/hwC1D0 0x20 0x477 0x74
> > > 
> > And then test these 4 things:
> > 
> > 1. Speakers
> > 2. Headphones output
> > 3. Internal mic.
> > 4. Headset mic. (using a phone headset with builtin mic with a single
> > T-R-R-S connector)
> 
> 1. Speaker works
> 2. I don't have a headphone
> 3. Internal mic does not work
> 4. Don't have a headset to test.
> 
> Asus UX534F

Did you try all 4 commands I gave in comment 17, or just the 2 you quoted above?

If you have tried all 4 commands, can you try using just these 2 after turning the laptop off and then on again? :

hda-verb /dev/snd/hwC1D0 0x20 0x500 0xf
hda-verb /dev/snd/hwC1D0 0x20 0x400 0x7774

According to:
https://bugzilla.redhat.com/show_bug.cgi?id=1834751#c8

Using just those 2 result in everything working on the Asus UX534F.
Comment 21 Hans de Goede 2020-07-03 14:51:49 UTC
(In reply to Erikas Rudinskas from comment #16)
> 1. Performed full shutdown from Linux (no dualboot here).
> 2. Powered on
> 3. Executed below 4 commands:
> 
> hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf
> hda-verb /dev/snd/hwC0D0 0x20 0x400 0x7774
> hda-verb /dev/snd/hwC0D0 0x20 0x500 0x45
> hda-verb /dev/snd/hwC0D0 0x20 0x400 0x5289
> 
> 4. Performed tests:
> 
> 1. Speakers: works
> 2. Headphones output: works
> 3. Internal mic: doesn't work
> 4. Headset mic: works
> 
> Additional notes: When I plugged in headphones, opened 'pavucontrol' and
> changed microphone source (from internal mic to headphones mic, and vice
> versa) - doesn't matter which input source I select, laptop always ends up
> capturing audio through headphones microphone (even if I set internal mic to
> be active input source).
> 
> Exact model: UX533FTC-A8221R

According to reports here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1850439

The internal mic is working for some UX533FTC users with the 4 commands from above.

But maybe your model is slight different and it is more like the Asus UX534F, can you try using just these 2 commands after turning the laptop off and then on again? :

hda-verb /dev/snd/hwC1D0 0x20 0x500 0xf
hda-verb /dev/snd/hwC1D0 0x20 0x400 0x7774

And see if that fixes the internal mic (while keeping everything else working)?
Comment 22 Erikas Rudinskas 2020-07-05 11:36:20 UTC
(In reply to Hans de Goede from comment #21)
> According to reports here:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1850439
> 
> The internal mic is working for some UX533FTC users with the 4 commands from
> above.
> 
> But maybe your model is slight different and it is more like the Asus
> UX534F, can you try using just these 2 commands after turning the laptop off
> and then on again? :
> 
> hda-verb /dev/snd/hwC1D0 0x20 0x500 0xf
> hda-verb /dev/snd/hwC1D0 0x20 0x400 0x7774
> 
> And see if that fixes the internal mic (while keeping everything else
> working)?

Note that I do not have "/dev/snd/hwC1D0" device available (only "/dev/snd/hwC0D0" and "/dev/snd/hwC0D2" is available). These 2 commands, executed against "/dev/snd/hwC0D0", did not fix internal mic. Executing against "/dev/snd/hwC0D2" freezes terminal and nothing happens.
Comment 23 Hans de Goede 2020-07-09 09:32:43 UTC
Created attachment 290177 [details]
Proposed kernel patch to fix this

Hi All,

Here is a proposed patch from one of the Realtek developers to fix this. If you have a laptop affected by this issue, please build a kernel with this patch added (see your distro's documentation on this) and let us know if this patch helps (without needing to do the hdaverb commands).

As always please test all 4 audio in/out options.

REgards,

Hans
Comment 24 Hans de Goede 2021-06-14 19:25:36 UTC
Closing this because there has been no response by teh reporters for 6+ months.
Comment 25 Eugene 2023-01-12 18:41:59 UTC
Asus vivoBook pro k6500ZH

hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x7774

the first one did nothing but when i run the second one after it speakers and headphones starts working.
Comment 26 Ivan 2024-04-13 20:57:35 UTC
This is work for my Asus zephyrus GX701LWS


sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x0f
sudo hda-verb /dev/snd/hwC0D0 0x20 0x400 0x7778
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x40
sudo hda-verb /dev/snd/hwC0D0 0x20 0x400 0x0800