linux icon indicating copy to clipboard operation
linux copied to clipboard

No onboard audio for Medion E15443 (Core Ultra 5 125H)

Open RDust4 opened this issue 1 year ago • 19 comments

Hello,

My onboard audio does not work for my Medion E15443 (Core Ultra 5 125H). The jack and audio via bluetooth works. All packages (alsa, pipewire, sof) are installed freshly, so the configuration is completely default.

System:

  • Medion E15443
  • Intel Core Ultra 5 125H (Meteor Lake)
  • Arch Linux 6.11.5-arch1-1

The sound devices are detected correctly (I think):

$ 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
card 0: sofhdadsp [sof-hda-dsp], device 31: Deepbuffer HDA Analog (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
  
$ lspci -nnk | grep -A10 Audio
00:1f.3 Audio device [0403]: Intel Corporation Meteor Lake-P HD Audio Controller [8086:7e28] (rev 20)
	DeviceName: Onboard - Sound
	Subsystem: Emdoor Digital Technology Co., Ltd Device [2782:4900]
	Kernel driver in use: sof-audio-pci-intel-mtl
	Kernel modules: snd_hda_intel, snd_sof_pci_intel_mtl
...

speaker-test runs, but no audio can be heard.

Here are some logs that could be useful: dmesg_audio.log pipewire_debug.log wireplumber.log

RDust4 avatar Nov 02 '24 09:11 RDust4

@RDust4, can you share the full kernel log as well? Based on the attached kernel log extract I don't see why SOF is selected for your machine, it is HDA (with ALC233 codec) and there are no DMICs, it should be using the legacy HDA audio driver.

The same issue present with the legacy stack (options snd_intel_dspcfg dsp_driver=0 or 1)? If so, this is a codec configuration problem, some quirk is missing for your machine.

If I understand right that audio via the 3.5mm jack is working.

Can you also attach the output of alsa-info.sh?

ujfalusi avatar Nov 12 '24 08:11 ujfalusi

The 3.5mm jack is working with options snd_intel_dspcfg dsp_driver=0. When I set it to 1, it stops working.

I uploaded the output of alsa-info.sh here: http://alsa-project.org/db/?f=ee12c0056dbd47af96cec54bf7aace17c13540e5

Here the full kernel logs: dmesg_log.txt

RDust4 avatar Nov 12 '24 15:11 RDust4

@RDust4, thank you for the logs! The SOF stack is selected because the ACPI table tells that the machine have Soundwire codec:

!!ACPI SoundWire Device Status Information
!!---------------

Realtek 0x000030025d071101

However the HDA generic machine driver is selected because we have HDA codec:

!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Realtek ALC233

and

[    6.267415] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 5
...
[    6.453473] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC233: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    6.453481] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    6.453484] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    6.453487] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[    6.453489] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[    6.453492] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19
[    6.453494] snd_hda_codec_realtek ehdaudio0D0:      Internal Mic=0x12

This is some sort of permutation of https://github.com/thesofproject/linux/issues/5099, https://github.com/thesofproject/linux/issues/4981 ?

But, the SOF stack is in HDA mode and the headphone jack is working, the same jack must work with legacy mode as well, this laptop has HDA audio.

Can you add this file sof-dyndbg.conf.txt as /etc/modprobe.d/sof-dyndbg.conf, reboot and re-attach the dmesg log?

@bardliao, @kv2019i, @ranj063 do you have hints what to try?

@RDust4, does this thread helps https://forums.linuxmint.com/viewtopic.php?t=430520 ?

ujfalusi avatar Nov 13 '24 07:11 ujfalusi

Here are the new logs while using your file: dmesg_log.txt

There seems to be no changes when it comes to the audio output.

I also tried to use the hdajackretask like in the link you gave me, but it did not work. When I try to overwrite anything (like set the speaker to not connected), hdajackretask freezes and I cannot use any audio anymore. After restarting hdajackretask, the overrides I can select are now only "HDMI" and "not connected".

RDust4 avatar Nov 15 '24 15:11 RDust4

Thank you for the log but unfortunately it is missing the early part of the boot process. Try to increase the kernel log buffer by adding log_buf_len=4M to the kernel command line parameter and reboot.

Is there any difference if you switch to legacy HDA stack by modifying the /etc/modprobe.d/sof-dyndbg.conf line options snd_intel_dspcfg dyndbg=+pmf to options snd_intel_dspcfg dyndbg=+pmf dsp_driver=1 and reboot? Iow, does the jack playback works?

ujfalusi avatar Nov 18 '24 07:11 ujfalusi

This is the updated log: dmesg_log.txt

I changed /etc/modprobe.d/sof-dyndbg.conf and the jack is still working. The inbuilt audio still does not work.

Should I leave it at the changed state or should I insert the old sof-dyndbg.conf?

RDust4 avatar Nov 19 '24 15:11 RDust4

I don't see audio errors in the dmesg log. We may need a quirk on patch_realtek.c. I will email Kailang [email protected] to ask for help.

bardliao avatar Nov 20 '24 05:11 bardliao

@RDust4 Can you try Ubuntu 24.04? That was suggested by Realtek.

bardliao avatar Nov 20 '24 07:11 bardliao

@RDust4 Can you also provide the alsa-info output with options snd_intel_dspcfg dsp_driver=1? And, get the alsa-info output again with Ubuntu 24.04 installed.

bardliao avatar Nov 20 '24 07:11 bardliao

@RDust4 Please do echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef before alsa-info to dump the hidden registers.

bardliao avatar Nov 20 '24 08:11 bardliao

Arch Linux with dsp_driver=1: alsa-info

I'm downloading Ubuntu for a Live USB right now, I'll give updates when it is finished.

RDust4 avatar Nov 20 '24 10:11 RDust4

Here on a persistent live Ubuntu USB: alsa-info

RDust4 avatar Nov 20 '24 11:11 RDust4

@RDust4 please do alsa-info.sh again in your original OS with dsp_driver=0 Please run echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef before run alsa-info.sh

KailangYang avatar Nov 21 '24 03:11 KailangYang

0000-medion-e15443-spk.patch @RDust4 please add this patch.

KailangYang avatar Nov 21 '24 06:11 KailangYang

The patch is installed, but my audio is still not playing. The jack works as usual. There are changes in alsa-info.sh.

RDust4 avatar Nov 22 '24 14:11 RDust4

@RDust4

  1. You can back to original sof-dyndbg.conf
  2. I think added patch was failed. This patch was changed file /kernel source folder/sound/pci/hda/patch_realtek.c. You could recheck file patch_realtek.c for added part.

If it patched suscessful, it will show in dump file as below.

/sys/class/sound/hwC0D0/driver_pin_configs: 0x1b 0x90170110

KailangYang avatar Nov 25 '24 02:11 KailangYang

Please be remember run command in terminal as below. echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef before run alsa-info.sh

KailangYang avatar Nov 25 '24 02:11 KailangYang

The patch is now applied correctly. There were some issues because I downloaded the wrong kernel version. However, I could resolve those by hand. (Inserted lines in the wrong location)

The sound is now working, thank you very much! When will this be in the official releases?

RDust4 avatar Nov 25 '24 18:11 RDust4

I had a similar problem on a Nuc with Core Ultra 5 125H running Ubuntu 24.04, audio didn't work and the command aplay -l didn't show any device. Thanks to some of the information in this thread I solved the problem by upgrading the kernel to 6.12 and by installing the latest version of the sof-bin.

Output with the problem:

sof-audio-pci-intel-mtl 0000:00:1f.3: SOF firmware and/or topology file not found.
sof-audio-pci-intel-mtl 0000:00:1f.3: Supported default profiles
sof-audio-pci-intel-mtl 0000:00:1f.3: - ipc type 1 (Requested):
sof-audio-pci-intel-mtl 0000:00:1f.3:  Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
sof-audio-pci-intel-mtl 0000:00:1f.3:  Topology file: intel/sof-ace-tplg/sof-mtl-rt711.tplg

Output after installing the 6.12 kernel and sof-bin.

sof-audio-pci-intel-mtl 0000:00:1f.3: enabling device (0000 -> 0002)
sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 5
sof-audio-pci-intel-mtl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
sof-audio-pci-intel-mtl 0000:00:1f.3: BT link detected in NHLT tables: 0x0
sof-audio-pci-intel-mtl 0000:00:1f.3: DMICs detected in NHLT tables: 0
sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware paths/files for ipc type 1:
sof-audio-pci-intel-mtl 0000:00:1f.3:  Firmware file:     intel/sof-ipc4/mtl/sof-mtl.ri
sof-audio-pci-intel-mtl 0000:00:1f.3:  Firmware lib path: intel/sof-ipc4-lib/mtl
sof-audio-pci-intel-mtl 0000:00:1f.3:  Topology file:     intel/sof-ace-tplg/sof-hda-generic.tplg
sof-audio-pci-intel-mtl 0000:00:1f.3: Loaded firmware library: ADSPFW, version: 2.11.1.1
sof-audio-pci-intel-mtl 0000:00:1f.3: Booted firmware version: 2.11.1.1
sof-audio-pci-intel-mtl 0000:00:1f.3: Topology: ABI 3:29:1 Kernel ABI 3:23:1

I hope this helps someone else.

em1208 avatar Jan 25 '25 13:01 em1208

@RDust4 , @em1208 , are you OK to close the issue?

ujfalusi avatar Feb 28 '25 12:02 ujfalusi

Yes, the problem was fixed with a newer kernel version. Thank you!

RDust4 avatar Feb 28 '25 12:02 RDust4