linux icon indicating copy to clipboard operation
linux copied to clipboard

[BUG] Sound doesn't work across multiple distros on Asus Zenbook UX482

Open jimmychm opened this issue 3 years ago • 113 comments

Describe the bug I have been trying to install Linux on my system (Zenbook UX482). Across multiple distro's sound either stops working relatively quickly (between minutes to hours) or doesn't work at all.

To Reproduce I'm not exactly sure what causes sound to break but it always inevitably occurs. This has occured in EndeavourOS, Fedora, Ubuntu. I am dual-booting with Windows and I think restarting from Windows and booting into Linux causes the sound to be thereafter broken in Linux.

Reproduction Rate I have installed the previously mentioned distro's probably 12-25 times in the past couple days and audio always breaks on fresh install.

Expected behavior For sound to work.

Impact High impact.

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: 5.18.0-arch1-1
    • SOF: 2.1.1-1
  2. Name of the topology file
    • Topology: Not sure what this means
  3. Name of the platform(s) on which the bug is observed.
    • Platform: EndeavousOS, Fedora 36, Ubuntu 22.04

Screenshots or console output I can produce more information as requested. Forgive me, I am a bit of a Linux newcomer, but I desperately would like to get this sorted out.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ inxi -A 
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio
    driver: sof-audio-pci-intel-tgl
  Sound Server-1: ALSA v: k5.18.0-arch1-1 running: yes
  Sound Server-2: PipeWire v: 0.3.51 running: yes

In AlsaMixer, Card listed as sof-hda-dsp, Chip listed as Realtek ALC294

jimmychm avatar May 29 '22 05:05 jimmychm

I have the same issues on the Asus Zenbook UP5401EA with the LTS kernel as well.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ inxi -A 
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio
    driver: sof-audio-pci-intel-tgl
  Sound Server-1: ALSA v: k5.15.43-1-lts running: yes
  Sound Server-2: PulseAudio v: 15.0 running: yes
  Sound Server-3: PipeWire v: 0.3.51 running: yes

jonah-chen avatar May 30 '22 06:05 jonah-chen

@jonah-chen @jimmychm are you able to paste dmesg here when sound fails ? Which endpoints/PCMs are you using when it fails ? What uses cases ?

Btw, does sound work again when the sound servers are restarted (i.e stop all sound servers together for > 5 secs and restart them, there should be no audio users for at least 5 secs).

lgirdwood avatar May 30 '22 08:05 lgirdwood

I was able to fix my issue by flashing the BIOS to an older version. However when I flashed the BIOS back to the latest version, the issue did not resurface. Hence, I believe this issue is likely caused by something else that is now resolved.

The original poster's issue is likely different. Thanks.

jonah-chen avatar Jun 01 '22 04:06 jonah-chen

I have similar problem with my zenbook ux3402.

Sound works perfect on Bluetooth and 3.5mm but no sound on internal speakers.

I tried on fedora 36, ubuntu live-usb (22), even compiled the kernel (5.19.0-rc3). [ alsa-info.txt ](url)

hereblur avatar Jun 28 '22 10:06 hereblur

@hereblur you may want to look at the suggestions here: https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html

Specifically in the case of problems with speakers, there's a chance that the codec driver does not support the speaker amplifiers. Please run with the legacy driver (option snd-intel-dspcfg dsp_driver=1) and check if you have any sound on the speakers. If not, that's a codec driver issue, not a problem with SOF proper.

plbossart avatar Jun 28 '22 13:06 plbossart

@hereblur you may want to look at the suggestions here: https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html

Specifically in the case of problems with speakers, there's a chance that the codec driver does not support the speaker amplifiers. Please run with the legacy driver (option snd-intel-dspcfg dsp_driver=1) and check if you have any sound on the speakers. If not, that's a codec driver issue, not a problem with SOF proper.

Thanks @plbossart , I tried snd-intel-dspcfg dsp_driver=1 and still no sound. will check the codec driver. Do you happen to have any idea where to start?

hereblur avatar Jun 28 '22 19:06 hereblur

Oh that's painful I am afraid @hereblur. You will typically need to find the 'verbs' that are missing and used by Windows to configure those amps. There was a script to reverse-engineer them, I'll add it in reference when I have a moment.

plbossart avatar Jun 28 '22 19:06 plbossart

@hereblur Here's the reference from @ryanprescott to snoop verbs

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

plbossart avatar Jun 28 '22 21:06 plbossart

I am having the same problem with a ZenBook Pro Duo UX582ZM (Alder Lake, Arch 5.18.13, realtek ALC294).

The speakers do not appear in alsamixer. The headphones do, and sound is fine through headphones jack. No sound on speakers, although audio plays according to the system (meaning speaker-test -Dhw:0,0 -c2 -r48000 -f S16_LE does not give errors and goes through 2 speakers, but I hear nothing).

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
sudo dmesg | grep ALC294
[    8.671208] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC294: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker

I followed the @ryanprescott tutorial to snoop verbs, because for a previous model (UX582XT), there were a series of hda-verbs that do not work with mine. Unfortunately, I managed to compile QEMU and enable the right parameters on the kernel, but apparently I can't get windows 10 or windows 11 to get sound in QEMU, despite installing what I think are the correct drivers. Any other ideas?

aleksfadini avatar Jul 23 '22 17:07 aleksfadini

@bardliao would anyone from Realtek be able to suggest the correct verbs here ?

lgirdwood avatar Jul 25 '22 20:07 lgirdwood

@bardliao would anyone from Realtek be able to suggest the correct verbs here ?

Kailang [email protected] and Pshou [email protected] may help.

bardliao avatar Jul 26 '22 06:07 bardliao

@hereblur Have you found a solution for UX3402? I have the same laptop and the same issue.

m4vci avatar Aug 10 '22 14:08 m4vci

Came accross this thread where Bo Gao seems to have done some troubleshooting. Not sure if that helps anyone here https://superuser.com/questions/1719920/no-sound-from-internal-speakers-on-laptop-but-headphone-jack-and-hdmi-works

speakradmin avatar Aug 30 '22 15:08 speakradmin

Thank you for this! I'm still struggling with this issue.

aleksfadini avatar Aug 31 '22 01:08 aleksfadini

@bardliao would anyone from Realtek be able to suggest the correct verbs here ?

Kailang [email protected] and Pshou [email protected] may help.

What would be a way to contact these two? Should I write an email asking for the right verbs?

Thank you for the help!!

aleksfadini avatar Aug 31 '22 01:08 aleksfadini

@bardliao would anyone from Realtek be able to suggest the correct verbs here ?

Kailang [email protected] and Pshou [email protected] may help.

What would be a way to contact these two? Should I write an email asking for the right verbs?

Thank you for the help!!

Yes you can email them.

bardliao avatar Aug 31 '22 07:08 bardliao

Hi everyone, I have a Zenbook UX3402ZA_UX3402ZA, tried the above and other through the web but still no luck yet. Any update/progress on it please?

openarun avatar Sep 16 '22 11:09 openarun

I have the same issue on my new Zenbook UX3402. Tried verb-sniffing without success. I can dedicate time to help get this working if someone more knowledgeable about how this is supposed to work can help me out. Thanks!

clipcarl avatar Sep 19 '22 21:09 clipcarl

Same with UM3402YA. Kernel 6.0 provides no results also.

blueeyesmain avatar Oct 08 '22 05:10 blueeyesmain

Have anyone tried dumping from Windows? https://asus-linux.org/blog/sound-2021-01-11/

Testing-XYZ avatar Oct 08 '22 07:10 Testing-XYZ

Did anyone get it working please?

openarun avatar Oct 14 '22 15:10 openarun

I have not gotten it working yet on my ux5402. I tried dumping verbs in Windows and duplicating on Linux but it did not work. Perhaps it's because the ux5402 apparently uses an SPI connection and the Linux driver doesn't account for that possibility. At least I think I read something like that somewhere.

I reiterate my offer to dedicate as much time as necessary to work with any developer that can help us get this working! Whatever you need let me know.

clipcarl avatar Oct 14 '22 17:10 clipcarl

Related: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1981433

openarun avatar Oct 14 '22 19:10 openarun

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

Apparently working when forcing the driver to load default parameters and bypassing _DSD parameter acquisition it works following a reboot. This was using this Arch AUR as well as some patches for realtek quirks https://aur.archlinux.org/packages/linux-mainline-um5302ta

Follow at your own risk as forcing driver parameters can blow your device

speakradmin avatar Oct 15 '22 14:10 speakradmin

Tried with kernel 6.1.0 rc-1 . Doesnt work. No sound on Manjaro Gnome

apgapg avatar Oct 18 '22 06:10 apgapg

Ok, it seems that someone working with cirrus is patching the kernel lately. The ux3402 was patched in 6.1 rc2 and looks like the um5302 is patched in rc3.

Regarding the um3402, is it rude or bad to contact the person to request a patch for the um3402? It seems as though it is being forgotten about.

blueeyesmain avatar Oct 31 '22 09:10 blueeyesmain

Can you link to the relevant page where you saw the patching done? I would have thought that if UX3402 is being patched, it would work for UM3402 but I suppose there could be something missing

speakradmin avatar Oct 31 '22 11:10 speakradmin

https://github.com/torvalds/linux/commit/491a4ccd8a0258392900c80c6b2b622c7115fc23

I believe it's in rc3, not rc2

haakov avatar Oct 31 '22 12:10 haakov

So this 18/10 https://github.com/torvalds/linux/commit/491a4ccd8a0258392900c80c6b2b622c7115fc23

Is for the ux3402 which uses SPI

This on 28/10: ( might not be with rc3) https://github.com/tiwai/sound/commit/8d06679b25fc6813eb2438fac7fa13f4f3c2ef37

Is for the um5302 which uses I2C

It also seems as though linux-firmware is getting a big cirrus update for the CS35l41 here: https://github.com/CirrusLogic/linux-firmware/commit/771968c6819101b078f41293f80415efa17d3b51

@haakov my mistake, tack

blueeyesmain avatar Oct 31 '22 12:10 blueeyesmain

@blueeyesmain Thank you for this breakdown! I have a UX582ZM. Is there a way I can figure out where I stand, and if I were to benefit from these patches?

aleksfadini avatar Nov 01 '22 05:11 aleksfadini