linux icon indicating copy to clipboard operation
linux copied to clipboard

[BUG] No sound on Dell XPS 13 9315 (Linux version/SKU 0B14) with Arch Linux kernel 6.10.8

Open davekrh opened this issue 1 year ago • 11 comments

Hello. I have a Dell XPS 13 9315 that shipped with Linux pre-installed. This is apparently another model XPS 13 9315 (SKU 0B14) per this old bug: https://github.com/thesofproject/linux/issues/3937

Sound works fine on Arch Linux kernels prior to 6.10.8. On 6.10.8, the system does not detect a sound device and logs errors. Please see attached. alsa-info.txt bug_dmesg.txt

davekrh avatar Sep 07 '24 22:09 davekrh

Not sure what the issue is:

[   13.289816] soundwire sdw-master-0-2: Program transport params failed: -22
[   13.289833] soundwire sdw-master-0-2: Program params failed: -22
[   13.289839]  SDW2-Playback: ASoC: error at snd_soc_link_prepare on SDW2-Playback: -22

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

Thanks

plbossart avatar Sep 09 '24 07:09 plbossart

Thanks very much for having a look, Pierre-Louis. After adding the sof-dyndbg.conf file, dmesg truncated the results. I'm attaching both dmesg and journalctl -lab. Cheers! 20240909-sof-dyndebug-syslog.txt 20240909-sof-dyndebug-dmesg.txt

davekrh avatar Sep 09 '24 12:09 davekrh

I unfortunately don't see anything in the logs that could explain the error mentioned above.

@bardliao thoughts?

plbossart avatar Sep 09 '24 14:09 plbossart

@davekrh Can you check if https://github.com/torvalds/linux/commit/ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 is in your kernel? If so, please revert it and test again.

bardliao avatar Sep 09 '24 14:09 bardliao

ah yes v6.10.8 includes that bad commit

6fa78e9c41471fe43052cd6feba6eae1b0277ae3

soundwire: stream: fix programming slave ports for non-continous port maps

commit ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 upstream.

Two bitmasks in 'struct sdw_slave_prop' - 'source_ports' and
'sink_ports' - define which ports to program in
sdw_program_slave_port_params().  The masks are used to get the
appropriate data port properties ('struct sdw_get_slave_dpn_prop') from
an array.

Bitmasks can be non-continuous or can start from index different than 0,
thus when looking for matching port property for given port, we must
iterate over mask bits, not from 0 up to number of ports.

This fixes allocation and programming slave ports, when a source or sink
masks start from further index.

Fixes: f8101c74aa54 ("soundwire: Add Master and Slave port programming")
Cc: [email protected]
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Indeed this must be reverted.

plbossart avatar Sep 09 '24 15:09 plbossart

Arch just released 6.10.9 and of course the sound device now works again. I left the debug config in place and re-ran journalctl -lab, if that's helpful. 20240909-sof-dyndebug-syslog-6.10.9.txt

I see Pierre-Louis has just responded. I suppose it would be good to understand if that patch is missing from 6.10.9, or at least Arch's linux package.

davekrh avatar Sep 09 '24 15:09 davekrh

i just checked the revert is NOT in v6.10.9, so that must be a local Arch-specific revert that was applied?

plbossart avatar Sep 09 '24 15:09 plbossart

I'm not too familiar with digging through Arch's github page. I didn't see anything mentioning stream.c:

https://github.com/archlinux/linux/compare/v6.10.9-arch1...v6.10.8-arch1

davekrh avatar Sep 09 '24 15:09 davekrh

The fix is still on list and not picked: https://lore.kernel.org/lkml/[email protected]/

I just noticed this issue so I have sent my version also: https://lore.kernel.org/lkml/[email protected]/

Fwiw, arch picked the revert for 6.10.9-arch: https://github.com/archlinux/linux/commits/v6.10.9-arch1/

ujfalusi avatar Sep 10 '24 12:09 ujfalusi

Hi !

I'm encountering the seemingly same regression on Fedora Rawhide for a Dell Latitude 9440 (SKU 0C0F). The Latitude 9440 might be fairly similar to a XPS 13 9315.

SoF devices work fine on 6.11-rc5, but break similarly to this bug report on 6.11-rc7. I'm presuming it's the same regression caused by the same commit?

I can generate some debug information if that'd be of any help/use.

lnchan avatar Sep 10 '24 13:09 lnchan

@lnchan, the bad commit arrived with -rc6 (ab8d66d132bc8f1992d3eb6cab8d32dda6733c84)

ujfalusi avatar Sep 10 '24 13:09 ujfalusi

Hi, I have a similar problem with Dell XPS 17

[  278.976991] [   T1861]  SDW0-Playback: ASoC: error at snd_soc_link_prepare on SDW0-Playback: -22
[  283.990668] [   T1861] sdw_deprepare_stream: subdevice #0-Playback: inconsistent state state 1
[  283.998230] [   T1861] soundwire sdw-master-0-0: Program transport params failed: -22
[  283.998254] [   T1861] soundwire sdw-master-0-0: Program params failed: -22
[  283.998265] [   T1861]  SDW0-Playback: ASoC: error at snd_soc_link_prepare on SDW0-Playback: -22
System:
  Kernel: 6.10.8-1-default arch: x86_64 bits: 64 compiler: gcc v: 14.2.0
    clocksource: tsc avail: acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.10.8-1-default
    root=UUID=ea0f47f6-89cf-4d4c-b72d-20ac633a2607 "splash=silent
    resume=/dev/disk/by-uuid/e1817310-bee5-4492-906d-c18fde09a19d quiet
    security=apparmor mitigations=auto" nosimplefb=1
  Desktop: KDE Plasma v: 6.1.4 tk: Qt v: N/A info: frameworks v: 6.5.0
    wm: kwin_wayland tools: avail: xscreensaver vt: 3 dm: SDDM Distro: openSUSE
    Tumbleweed 20240906

AlfredoCubitos avatar Sep 11 '24 07:09 AlfredoCubitos

As an additional data point, Arch is currently at 6.10.10 and sound has been working perfectly. The only kernel that gave me issues was 6.10.8.

davekrh avatar Sep 14 '24 21:09 davekrh

I think ArchLinux patched the kernel themselves. I'm running Fedora, and in 6.10.8-6.10.10 the issue still remains.

spockfish avatar Sep 15 '24 08:09 spockfish

I know there is a fix for Tumbleweed http://download.opensuse.org/repositories/Kernel:/stable:/Backport/standard/ which should work There is also an open bug at https://bugzilla.suse.com/show_bug.cgi?id=1230350

AlfredoCubitos avatar Sep 15 '24 12:09 AlfredoCubitos

The fix is backported to 6.10.11.

spockfish avatar Sep 19 '24 10:09 spockfish