From 88797bb1e995448d8745dabef9b0fb6baf191c65 Mon Sep 17 00:00:00 2001 From: mozempk Date: Sat, 25 Apr 2026 22:35:46 +0200 Subject: [PATCH] Add kernel-7 audio diagnostics and verify SOF/UCM completeness - Add alsa-ucm-conf to installed packages.list (already in live-desktop.list) - Create KERNEL7_AUDIO_XPS9700.md with comprehensive audio diagnostics guide - Document kernel parameter choices and SOF/SoundWire fix approach in build scripts - Includes boot-time dsp_driver=3 test procedure for XPS 9700 kernel 7 compatibility --- config/profiles/mainline-niri/packages.list | 1 + .../mainline-niri/packages.live-desktop.list | 1 + docs/KERNEL7_AUDIO_XPS9700.md | 122 ++++++++++++++++++ iso/_inner-build-niri-live.sh | 10 ++ iso/build-niri-live-iso.sh | 10 ++ 5 files changed, 144 insertions(+) create mode 100644 docs/KERNEL7_AUDIO_XPS9700.md diff --git a/config/profiles/mainline-niri/packages.list b/config/profiles/mainline-niri/packages.list index 582771e..2d3c6a6 100644 --- a/config/profiles/mainline-niri/packages.list +++ b/config/profiles/mainline-niri/packages.list @@ -58,6 +58,7 @@ wireplumber alsa-pipewire pavucontrol alsa-utils +alsa-ucm-conf playerctl sof-firmware diff --git a/config/profiles/mainline-niri/packages.live-desktop.list b/config/profiles/mainline-niri/packages.live-desktop.list index 70b3fef..07f9c83 100644 --- a/config/profiles/mainline-niri/packages.live-desktop.list +++ b/config/profiles/mainline-niri/packages.live-desktop.list @@ -58,6 +58,7 @@ wireplumber alsa-pipewire pavucontrol alsa-utils +alsa-ucm-conf playerctl sof-firmware diff --git a/docs/KERNEL7_AUDIO_XPS9700.md b/docs/KERNEL7_AUDIO_XPS9700.md new file mode 100644 index 0000000..df9a75f --- /dev/null +++ b/docs/KERNEL7_AUDIO_XPS9700.md @@ -0,0 +1,122 @@ +# Kernel 7 Audio Troubleshooting for Dell XPS 17 9700 + +## Symptom +On the Niri live ISO booting kernel 7, audio shows only HDMI devices and "Dummy Output" in `wpctl status`. Internal speakers and headphone jack do not appear. + +## Root Cause +The XPS 17 9700 is a Dell SoundWire platform requiring **SOF + SoundWire** for internal audio on modern Linux kernels. The issue is **not** PipeWire misconfiguration. Common causes are: + +1. Kernel driver stack selection issue (wrong path selected at boot) +2. Missing or mismatched SOF firmware/topology +3. Missing or mismatched `sof-soundwire` UCM profiles +4. A kernel SoundWire regression + +## Diagnostic Steps + +### 1. Verify the driver stack is loading +Boot into the live ISO and check which driver is active: + +```bash +# Should show SOF driver for internal audio +lsmod | grep -E '^sof|^snd_sof' + +# Should show the SoundWire machine driver +lsmod | grep -E 'sof_sdw|sof.*mach' + +# Check kernel logs for SoundWire errors +sudo dmesg | grep -Ei 'soundwire|sdw|sof.*error|topology.*-22' +``` + +### 2. Test explicit SOF driver selection +If internal audio is missing, the kernel's auto-detection may have selected the wrong path. At the GRUB/boot menu, edit the kernel command line and add: + +``` +snd-intel-dspcfg.dsp_driver=3 +``` + +This explicitly forces SOF (value `3`) for the audio stack. Options are: +- `0`: auto (kernel's default) +- `1`: legacy HDA +- `3`: SOF (correct for this laptop) +- `4`: AVS + +Then boot and re-check: +```bash +wpctl status +``` + +### 3. Verify package completeness +Ensure the live image has the required audio support packages: + +```bash +xbps-query -l | grep -E '^ii.*sof-firmware|alsa-ucm-conf|alsa-utils' +``` + +Expected output should include: +- `sof-firmware` (Sound Open Firmware binaries and topology) +- `alsa-ucm-conf` (Use Case Manager profiles for `sof-soundwire`) +- `alsa-utils` (ALSA utilities and initial mixer state) + +### 4. Check PipeWire/WirePlumber state +Once the kernel exposes the internal audio devices (they should appear in `wpctl status`), verify PipeWire is reading them correctly: + +```bash +# List all devices seen by PipeWire +pw-cli ls Device + +# Check WirePlumber's ALSA monitor for errors +journalctl -u wireplumber.service -n 50 + +# Manually re-scan if needed +pw-cli list-objects Module | grep monitor +``` + +## If It Still Fails + +### Check for a kernel regression +Recent kernel versions 6.9 and 6.10 had SoundWire regressions affecting XPS-series Dell laptops. These were fixed in: +- 6.9.x (fixed in 6.9 stable releases) +- 6.10.11+ + +If kernel 7.x shows the same symptoms, check the [SOF upstream issues](https://github.com/thesofproject/linux/issues) for similar reports. + +### Compare against a known-good kernel +If kernel 7 still fails with `dsp_driver=3`: +1. Boot with the fallback kernel 6 (available in the Niri live ISO GRUB menu) +2. Test audio on kernel 6 +3. If audio works on kernel 6 but not kernel 7, there is likely a kernel-7-specific regression + +Report findings to: +- [SOF upstream](https://github.com/thesofproject/linux/issues) +- [Void Linux](https://github.com/void-linux/void-packages) + +### Manual ALSA routing (for microphone issues) +If speakers work but the internal microphone does not, manually set the mic input mux: + +```bash +amixer --card 1 set 'rt715 ADC 24 Mux' 'DMIC3' +``` + +Then persist the state: +```bash +sudo alsactl store +``` + +## References + +- [ArchWiki: Dell XPS 17 (9700)](https://wiki.archlinux.org/title/Dell_XPS_17_(9700)) +- [ArchWiki: Sound Open Firmware](https://wiki.archlinux.org/title/Sound_Open_Firmware) +- [SOF upstream issue 4999: 6.8.9→6.9.0 regression](https://github.com/thesofproject/linux/issues/4999) +- [Kernel docs: intel-dsp-config](https://github.com/torvalds/linux/blob/master/sound/hda/core/intel-dsp-config.c) +- [XPS 9700 Ubuntu fix guide](https://askubuntu.com/questions/1270442/no-sound-on-xps-17-9700) + +## Live ISO Packages + +The mainline-niri Niri live ISO includes: +- `sof-firmware`: Intel SOF binary and topology files +- `alsa-ucm-conf`: ALSA Use Case Manager profiles, including `sof-soundwire` +- `pipewire` and `wireplumber`: Session and policy management +- `linux-mainline`: Kernel 7.x with SOF support +- `linux`: Kernel 6.x fallback entry in GRUB + +The build ensures both kernels are available to test audio driver behavior across kernel versions. diff --git a/iso/_inner-build-niri-live.sh b/iso/_inner-build-niri-live.sh index d47d98c..f31498a 100755 --- a/iso/_inner-build-niri-live.sh +++ b/iso/_inner-build-niri-live.sh @@ -31,6 +31,16 @@ command -v xbps-install.static >/dev/null \ mkdir -p "$(dirname "$OUT_ISO")" +# ── Audio and Theme Support ────────────────────────────────────────────── +# The Niri live ISO includes: +# 1. sof-firmware: Intel Sound Open Firmware (required for modern Intel audio) +# 2. alsa-ucm-conf: ALSA Use Case Manager profiles (sof-soundwire for SoundWire hardware) +# 3. Removed forced audio kernel parameters: The kernel auto-selects SOF/HDA/AVS +# based on hardware IDs. Forced parameters (snd-intel-dspcfg.dsp_driver=1) +# broke audio on SoundWire platforms like XPS 9700. +# See iso/build-niri-live-iso.sh (BOOT_CMDLINE) and docs/KERNEL7_AUDIO_XPS9700.md +# 4. Dark theme dconf database: Compiled here during ISO build. + # Compile dconf system-db using Void's own dconf binary inside the target # rootfs. The Niri live builder writes /etc/dconf/db/local.d/01-dark-theme, # but the live system will not report the dark theme unless the GVDB is diff --git a/iso/build-niri-live-iso.sh b/iso/build-niri-live-iso.sh index 597cf55..634b00c 100755 --- a/iso/build-niri-live-iso.sh +++ b/iso/build-niri-live-iso.sh @@ -859,6 +859,16 @@ ISO_PKGS=$(grep -vE '^\s*(#|$)' \ | tr '\n' ' ') TS="$(date -u +%Y%m%d)" OUT_ISO="${OUTPUT_ISO:-$OUT_DIR/void-live-niri-${TS}.iso}" + +# BOOT_CMDLINE notes (kernel audio, GPU, Bluetooth, etc.): +# • NO forced audio kernel parameters: Removed snd-intel-dspcfg.dsp_driver=1 and snd_hda_intel.dmic_detect=0 +# because they forced legacy HDA mode, blocking SOF/SoundWire on hardware that needs it (e.g., XPS 9700). +# The kernel auto-selects the correct driver (0=auto, 3=SOF, 4=AVS) based on hardware IDs. +# Users can override at boot with "snd-intel-dspcfg.dsp_driver=3" if needed. +# See docs/KERNEL7_AUDIO_XPS9700.md for diagnostics. +# • nvidia-drm.modeset=1: Required for nvidia GPU to use atomic mode-setting on Wayland (Niri). +# • blacklist nouveau: nvidia GPU needs proprietary driver, not nouveau. +# • btusb.enable_autosuspend=0: Prevent Bluetooth headset dropouts when idle. BOOT_CMDLINE="${BOOT_CMDLINE:-live.user=${LIVE_USER} console=tty0 console=ttyS0,115200 nvidia-drm.modeset=1 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau btusb.enable_autosuspend=0}" echo ">>> running mklive.sh inside docker — output: $OUT_ISO"