Bug 206589 - No way of getting sound with the ALC294 from the Asus Zenbook (Flip) Series
Summary: No way of getting sound with the ALC294 from the Asus Zenbook (Flip) Series
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: Intel Linux
: P1 high
Assignee: Jaroslav Kysela
URL: https://bugs.launchpad.net/ubuntu/+so...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-18 20:15 UTC by Colin
Modified: 2024-03-28 16:31 UTC (History)
15 users (show)

See Also:
Kernel Version: 5.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
PulseAudio showing active streaming and active Alsamixer (658.16 KB, image/png)
2020-02-18 20:15 UTC, Colin
Details
Attached alsa-info generated on the same laptop (44.62 KB, text/plain)
2020-05-05 19:39 UTC, Mykola Driuchatyi
Details

Description Colin 2020-02-18 20:15:39 UTC
Created attachment 287489 [details]
PulseAudio showing active streaming and active Alsamixer

Well, first I saw just to fill in the information that there are a couple of duplicates around this issue; "No sound on ASUS Zenbook UX533FTC", "ALC294 - no sound working at all on ASUS UX534" and more. However, I had bought the Zenbook Flip 15 ux563fd a while ago and wanted to install Ubuntu with maybe the newest kernel. So, I installed it next to Windows at some point where the sound is working flawless as usual for everyone with this type of laptop. Switched a couple times between versions of Ubuntu 18-19, tried Debian (have not get a chance yet to get that working because of no ethernet port..) Also tried several times to alter permissions for the PulseAudio config folder I suppose, restarting services, reinstalling them and even tried to set everything on in alsamixer. After all, no positive result. After that, I tried installing different Kernels; someone mentioned that 4.19 could work since that was patched to support the alc driver - but no, it didn't work. So tried again with several versions, from older to the latest one and no result. 

The only thing what I'm seeing instead on the sound section, for example in PulseAudio is the streamingbar that recognizes sound, but did not get any sound out of the speakers and/or headphones. Tried to change the configuration Output profile, but also takes no effect. 

I had made a ticket/request in bugs.launchpad with the title of "Asus Zenbook Flip 15 ux563fd no sound" and was asked to made another ticket here, so I hope this information is useful to you.

Where I use this laptop for;
- Mostly work related
- Studies
Comment 1 Mykola Driuchatyi 2020-05-05 19:39:41 UTC
Created attachment 288933 [details]
Attached alsa-info generated on the same laptop

I've bought the same laptop - ASUS UX563FD.
I tried to build patched kernel 5.4.0-28 available on Ubuntu 20.04 using the following manual:
https://help.ubuntu.com/community/Kernel/Compile

with the following line:

SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_SPK),

behind existing one 

SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK),

No luck - still no sound.
All the patches mentioned on Manjaro forum already present in the 5.4.0-28 kernel:
https://lkml.org/lkml/2018/12/7/158
https://lkml.org/lkml/2018/12/7/160
https://lkml.org/lkml/2018/12/7/159

I've analyzed alsa-info for the HEX-pins implemented in the patch_realtec.c - they are actual.
Are there any steps we can follow locally to debug/help with the fix?
Comment 2 Mykola Driuchatyi 2020-05-15 21:52:45 UTC
Finally, I've managed to get the sound from the internal speakers and from the headphones:
Put the following content to the /lib/firmware/alc294-sound-patch.fw file:

[codec]
0x10ec0294 0x1043194e 0

[pincfg]
0x19 0x03a11050
0x1a 0x03a11c30
0x21 0x03211420

[verb]
0x20 0x500 0x62
0x20 0x400 0xa007
0x20 0x500 0x10
0x20 0x400 0x8420
0x20 0x500 0x0f
0x20 0x400 0x7774

After that add the following line to the ALSA config (/etc/modprobe.d/alsa-base.conf):
options snd-hda-intel patch=alc294-sound-patch.fw

Reboot the system and speaker and headphone should work!
It took me several nights of research.

HDA verb parameters:
http://www.programmersought.com/article/9581893187/

Thanks to Takashi Iwai for detailed manual:
https://www.kernel.org/doc/html/v5.0/sound/hd-audio/notes.html

Thanks to guys from the Arch forum:
https://bbs.archlinux.org/viewtopic.php?id=252295
Comment 3 Georgiy 2020-05-21 11:39:44 UTC
>I don't have file "alc294-sound-patch.fw" how i can fix it.
>
>And can, if not difficult, write in more detail. I will be very grateful!
>
>I use Ubuntu 20.04.
Comment 4 Mykola Driuchatyi 2020-05-21 11:56:05 UTC
Georgiy, just create it
Comment 5 Georgiy 2020-05-23 09:14:31 UTC
>Thank you very much!))
>
>Hooray!
Comment 6 kobokh 2020-06-30 13:02:52 UTC
Hi, 
Thank you Mykola for the solution. But, only the left headphone works for me and headset (mic) doesn't work. Asus UX563FD - PopOs 20.04.
Comment 7 Rohan 2021-02-03 14:09:59 UTC
Hi,
I recently bought an ASUS ROG G512LU. I have a dual boot system (Windows 10 + Ubuntu 18.04). I am also facing similar issues since the sound card is also ALC294. I have been trying solutions from a number of forums and have modified my alsa-base.conf file too. 
These are the last few lines of my modified file :   

options snd_hda_intel model=auto   
options snd-hda-intel dmic_detect=0   
options snd-hda-intel patch=alc294-sound-patch.fw

Did you all also keep similar settings or should I change some options?
Also, should I be making some changes to blacklist.conf file (blacklist snd_soc_skl) since this was also suggested in a number of forums?

Thanks
Comment 8 Thinh Huynh 2021-05-18 21:18:25 UTC
(In reply to Mykola Driuchatyi from comment #2)
> Finally, I've managed to get the sound from the internal speakers and from
> the headphones:
> Put the following content to the /lib/firmware/alc294-sound-patch.fw file:
> 
> [codec]
> 0x10ec0294 0x1043194e 0
> 
> [pincfg]
> 0x19 0x03a11050
> 0x1a 0x03a11c30
> 0x21 0x03211420
> 
> [verb]
> 0x20 0x500 0x62
> 0x20 0x400 0xa007
> 0x20 0x500 0x10
> 0x20 0x400 0x8420
> 0x20 0x500 0x0f
> 0x20 0x400 0x7774
> 
> After that add the following line to the ALSA config
> (/etc/modprobe.d/alsa-base.conf):
> options snd-hda-intel patch=alc294-sound-patch.fw
> 
> Reboot the system and speaker and headphone should work!
> It took me several nights of research.
> 
> HDA verb parameters:
> http://www.programmersought.com/article/9581893187/
> 
> Thanks to Takashi Iwai for detailed manual:
> https://www.kernel.org/doc/html/v5.0/sound/hd-audio/notes.html
> 
> Thanks to guys from the Arch forum:
> https://bbs.archlinux.org/viewtopic.php?id=252295

Thanks you so much, finally !!!
Comment 9 Takashi Iwai 2021-06-18 16:12:22 UTC
(In reply to Mykola Driuchatyi from comment #2)
> Finally, I've managed to get the sound from the internal speakers and from
> the headphones:
> Put the following content to the /lib/firmware/alc294-sound-patch.fw file:
> 
> [codec]
> 0x10ec0294 0x1043194e 0
> 
> [pincfg]
> 0x19 0x03a11050
> 0x1a 0x03a11c30
> 0x21 0x03211420
> 
> [verb]
> 0x20 0x500 0x62
> 0x20 0x400 0xa007
> 0x20 0x500 0x10
> 0x20 0x400 0x8420
> 0x20 0x500 0x0f
> 0x20 0x400 0x7774

Does this keep the speaker working?  The verb 0x400 0x8420 is supposedly some switching for the headphone from the speaker; at least ASUS GU502 model has some quirk code to dynamically toggling between the headphone and the speaker with this COEF bits.  On headhpone, 0x8420, and on speaker, 0x0a20 for COEF index 0x10.

The pin config also looks similar like GU502 quirk, indicating slightly different locations (but it shouldn't matter for the functionality).
The COEF 0x0f:0x7774 is found already in the existing quirk for this device, but the COEF 0x62:0xa007 is an unknown stuff.
Comment 10 sandys 2021-07-01 17:25:09 UTC
This seems to be working for the Asus ROG Flow X13 series

https://github.com/CO-1/asus-flow-x13-linux/tree/main/sound/pci/hda
Comment 11 Sounak 2021-07-01 20:53:04 UTC
(In reply to Takashi Iwai from comment #9)
> (In reply to Mykola Driuchatyi from comment #2)
> > Finally, I've managed to get the sound from the internal speakers and from
> > the headphones:
> > Put the following content to the /lib/firmware/alc294-sound-patch.fw file:
> > 
> > [codec]
> > 0x10ec0294 0x1043194e 0
> > 
> > [pincfg]
> > 0x19 0x03a11050
> > 0x1a 0x03a11c30
> > 0x21 0x03211420
> > 
> > [verb]
> > 0x20 0x500 0x62
> > 0x20 0x400 0xa007
> > 0x20 0x500 0x10
> > 0x20 0x400 0x8420
> > 0x20 0x500 0x0f
> > 0x20 0x400 0x7774
> 
> Does this keep the speaker working?  The verb 0x400 0x8420 is supposedly
> some switching for the headphone from the speaker; at least ASUS GU502 model
> has some quirk code to dynamically toggling between the headphone and the
> speaker with this COEF bits.  On headhpone, 0x8420, and on speaker, 0x0a20
> for COEF index 0x10.
> 
> The pin config also looks similar like GU502 quirk, indicating slightly
> different locations (but it shouldn't matter for the functionality).
> The COEF 0x0f:0x7774 is found already in the existing quirk for this device,
> but the COEF 0x62:0xa007 is an unknown stuff.

Does the patch work for GU502? I have audio from my speaker but no audio or mic input while using headphone.
Comment 12 Marcel Brouillet 2021-08-05 19:41:21 UTC
Hello,
I have no internal sound on an Asus UX582LR (Zenbook Pro Duo). External USB soundcard works. Mykola Driuchatyi ("Put the following content to the /lib/firmware/alc294-sound-patch.fw file") did not help.

I notice that I hear a very very faint glitch (less than 100ms) twice, once for each word, when I press the button to test "Front Left" and "Front Right" (that's what it says when outputting to USB), volume at 100%.

Any suggestion? Please tell me what to test/report/try.

uname -r : Linux ux582lr 5.11.0-25-lowlatency #27-Ubuntu SMP PREEMPT Sat Jul 10 00:06:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
(vanilla Ubuntu Studio 21.04, upgrades done)

alsa-info : http://alsa-project.org/db/?f=37d8191ca7b35504f8faa3ca579255bb1afb08d2
Comment 13 Marcel Brouillet 2021-12-28 11:29:36 UTC
Bugfix that works on Asus UX582LR (Zenbook Pro Duo) :
https://www.reddit.com/r/ASUS/comments/o1k04p/ubuntu_linux_on_ux582_zenbook_duo/

Copied here, should the link break in the future : Under a sudo -s session,
  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

I haven't been able to adapt the proposed /lib/firmware/alc294-sound-patch.fw but I am sure it's feasible. I read that a [codec] section was mandatory. How can I know if « 0x10ec0294 0x1043194e 0 » is the most appropriate... but the good news is, this fix works on my system.
Comment 14 AleksF 2022-07-15 18:34:57 UTC
(In reply to Marcel Brouillet from comment #13)
> Bugfix that works on Asus UX582LR (Zenbook Pro Duo) :
> https://www.reddit.com/r/ASUS/comments/o1k04p/
> ubuntu_linux_on_ux582_zenbook_duo/
> 
> Copied here, should the link break in the future : Under a sudo -s session,
>   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
> 
> I haven't been able to adapt the proposed
> /lib/firmware/alc294-sound-patch.fw but I am sure it's feasible. I read that
> a [codec] section was mandatory. How can I know if « 0x10ec0294 0x1043194e 0
> » is the most appropriate... but the good news is, this fix works on my
> system.

I have a different Zenbook Pro Duo 15, the UX582XM (with alder lake).

I tried those hda verb and they do not work. I think I just need to find the right codes, how can I achieve that?
Comment 15 AleksF 2022-07-16 18:21:34 UTC
correction to my previous post, my model is a ZenBook Pro Duo UX582ZM.

I indeed have an ACL294, I tried sniffing the verbs with iommus from a windows virtual machine according to this tutorial:

https://github.com/ryanprescott/realtek-verb-tools/wiki/How-to-sniff-verbs-from-a-Windows-sound-driver

but I can't get past the windows logo when booting the qemu image.
Not sure how to figure out the right verbs to apply the correct fix. Please help :)


(In reply to AleksF from comment #14)
> (In reply to Marcel Brouillet from comment #13)
> > Bugfix that works on Asus UX582LR (Zenbook Pro Duo) :
> > https://www.reddit.com/r/ASUS/comments/o1k04p/
> > ubuntu_linux_on_ux582_zenbook_duo/
> > 
> > Copied here, should the link break in the future : Under a sudo -s session,
> >   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
> > 
> > I haven't been able to adapt the proposed
> > /lib/firmware/alc294-sound-patch.fw but I am sure it's feasible. I read
> that
> > a [codec] section was mandatory. How can I know if « 0x10ec0294 0x1043194e
> 0
> > » is the most appropriate... but the good news is, this fix works on my
> > system.
> 
> I have a different Zenbook Pro Duo 15, the UX582XM (with alder lake).
> 
> I tried those hda verb and they do not work. I think I just need to find the
> right codes, how can I achieve that?
Comment 16 Dilson 2022-08-31 04:16:50 UTC
(In reply to AleksF from comment #15)
> correction to my previous post, my model is a ZenBook Pro Duo UX582ZM.
> 
> I indeed have an ACL294, I tried sniffing the verbs with iommus from a
> windows virtual machine according to this tutorial:
> 
> https://github.com/ryanprescott/realtek-verb-tools/wiki/How-to-sniff-verbs-
> from-a-Windows-sound-driver
> 
> but I can't get past the windows logo when booting the qemu image.
> Not sure how to figure out the right verbs to apply the correct fix. Please
> help :)
> 
> 
> (In reply to AleksF from comment #14)
> > (In reply to Marcel Brouillet from comment #13)
> > > Bugfix that works on Asus UX582LR (Zenbook Pro Duo) :
> > > https://www.reddit.com/r/ASUS/comments/o1k04p/
> > > ubuntu_linux_on_ux582_zenbook_duo/
> > > 
> > > Copied here, should the link break in the future : Under a sudo -s
> session,
> > >   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
> > > 
> > > I haven't been able to adapt the proposed
> > > /lib/firmware/alc294-sound-patch.fw but I am sure it's feasible. I read
> > that
> > > a [codec] section was mandatory. How can I know if « 0x10ec0294
> 0x1043194e
> > 0
> > > » is the most appropriate... but the good news is, this fix works on my
> > > system.
> > 
> > I have a different Zenbook Pro Duo 15, the UX582XM (with alder lake).
> > 
> > I tried those hda verb and they do not work. I think I just need to find
> the
> > right codes, how can I achieve that?

Hi @AleksF,
Did you make any progress?
My laptop model is a ZenBook Pro Duo UX582ZM.

I've tried everything and I haven't made any progress.
Comment 17 AleksF 2022-08-31 04:41:59 UTC
Hello @Dilson, 
I have not made any progress despite running various versions of qemu to sniff those verbs.

We might have something to try here:

https://github.com/thesofproject/linux/issues/3814#issuecomment-1232349324

Especially looking at the latest comment of speakradmin which in turn points to:

https://superuser.com/questions/1719920/no-sound-from-internal-speakers-on-laptop-but-headphone-jack-and-hdmi-works

Finally, following that thread on GitHub, we could try to write directly to Kailang kailang@realtek.com and Pshou pshou@realtek.com from realtem, asking for those verbs. I have not done so yet, but if we both write that could amount to something.

Let me know what you think.
Comment 18 Dilson 2022-09-01 16:36:50 UTC
Hi @AleksF,

I'll email those people and CC you.
OK?
Comment 19 Dilson 2023-01-18 09:52:35 UTC
I still couldn't solve this problem. If anyone succeeds, please share the solution.
Comment 20 Barud 2024-03-28 16:31:51 UTC
I am facing the same issue with asus zenbook ux3405ma. I am using fedora 40.
Any help will be appreciated.
I don't have the technical capacity to compile the kernel. But I am ready to try it under some guidance, like with jforbes.

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