thesofproject / linux

Linux kernel source tree
Other
91 stars 134 forks source link

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

Closed davekrh closed 2 months ago

davekrh commented 2 months ago

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

plbossart commented 2 months ago

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

davekrh commented 2 months ago

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

plbossart commented 2 months ago

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

@bardliao thoughts?

bardliao commented 2 months ago

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

plbossart commented 2 months ago

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: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240729140157.326450-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Indeed this must be reverted.

davekrh commented 2 months ago

Arch just released 6.10.9 and of course the sound device now works again. I left the debug config in place and re-ranjournalctl -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.

plbossart commented 2 months ago

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

davekrh commented 2 months ago

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

ujfalusi commented 2 months ago

The fix is still on list and not picked: https://lore.kernel.org/lkml/20240909164746.136629-1-krzysztof.kozlowski@linaro.org/

I just noticed this issue so I have sent my version also: https://lore.kernel.org/lkml/20240910124009.10183-1-peter.ujfalusi@linux.intel.com/

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

lnchan commented 2 months ago

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.

ujfalusi commented 2 months ago

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

AlfredoCubitos commented 2 months ago

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
davekrh commented 2 months ago

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.

spockfish commented 2 months ago

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

AlfredoCubitos commented 2 months ago

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

spockfish commented 2 months ago

The fix is backported to 6.10.11.