суббота

[Bug 2073049] Re: No sound on Huawei Matebook D14 AMD since Linux 6.8.0-38 [regression]

================================================================================ LINUX AUDIO FIX FOR HUAWEI AMD LAPTOPS ================================================================================ Author: Linux Community / Michael Lorentz Date: July 2026 Hardware: Huawei MateBook with AMD Ryzen processor (CX11970 audio codec) System: Linux Mint / Ubuntu / Other distributions with PipeWire ================================================================================ STEP-BY-STEP SOLUTION ================================================================================ PROBLEM DESCRIPTION: Audio on built-in laptop speakers does NOT work. Audio on headphones connected to the mini-jack DOES work. ================================================================================ STEP 1: CHECK AUDIO DEVICE STATUS ================================================================================ Open a terminal and run: $ pactl list short sinks If you see "SUSPENDED" status for the speaker device, this confirms the problem. Check if the sound card is detected: $ aplay -l You should see a card with the CX11970 codec (or similar). ================================================================================ STEP 2: IMMEDIATE AUDIO RESTORATION (QUICKEST METHOD) ================================================================================ Perform a full system restart: $ sudo reboot After restart, speaker audio should be restored. NOTE: If this doesn't work, proceed to Step 3. ================================================================================ STEP 3: MANUAL FIX (IF RESTART DID NOT HELP) ================================================================================ Run the following commands in the given order: $ sudo alsactl init $ sudo alsactl store $ systemctl --user restart pipewire pipewire-pulse $ pactl set-default-sink alsa_output.pci-0000_02_00.6.analog-stereo $ pactl set-sink-volume alsa_output.pci-0000_02_00.6.analog-stereo 80% Test if audio works: $ speaker-test -t wav -c 2 ================================================================================ STEP 4: CHECK IF SPEAKERS ARE MUTED IN ALSA MIXER ================================================================================ $ alsamixer Press F6 and select your sound card (Generic_1 or CX11970). Check these channels: - Master - PCM - Speaker - Headphone If any shows "MM" (muted), press M on the keyboard to unmute. Use the arrow keys to set volume to approximately 80%. ================================================================================ STEP 5: AUTOMATIC STARTUP SCRIPT ================================================================================ To automate the fix at every system startup, create a script: $ mkdir -p ~/bin $ nano ~/bin/fix-audio.sh Paste the following content: ----------------------------------------------------------------------------- #!/bin/bash # Audio fix script for Huawei AMD sleep 30 # Reset ALSA sudo alsactl init 2>/dev/null # Restart PipeWire systemctl --user restart pipewire pipewire-pulse 2>/dev/null # Force speaker output pactl set-card-profile alsa_card.pci-0000_02_00.6 output:analog-stereo+input:analog-stereo 2>/dev/null pactl set-default-sink alsa_output.pci-0000_02_00.6.analog-stereo 2>/dev/null pactl set-sink-volume alsa_output.pci-0000_02_00.6.analog-stereo 80% 2>/dev/null pactl set-sink-mute alsa_output.pci-0000_02_00.6.analog-stereo 0 2>/dev/null echo "$(date) - Audio fixed" >> /tmp/fix-audio.log ----------------------------------------------------------------------------- $ chmod +x ~/bin/fix-audio.sh ================================================================================ STEP 6: ADD SCRIPT TO AUTOSTART ================================================================================ $ nano ~/.config/autostart/fix-audio.desktop Paste (replace [USER] with your username): ----------------------------------------------------------------------------- [Desktop Entry] Type=Application Name=Fix Audio Exec=/home/[USER]/bin/fix-audio.sh Icon=audio-card X-GNOME-Autostart-enabled=true ----------------------------------------------------------------------------- ================================================================================ STEP 7: ALLOW SUDO WITHOUT PASSWORD (OPTIONAL) ================================================================================ To allow the script to run without asking for a password: $ sudo visudo -f /etc/sudoers.d/fix-audio Add (replace [USER] with your username): ----------------------------------------------------------------------------- [USER] ALL=(ALL) NOPASSWD: /home/[USER]/bin/fix-audio.sh ----------------------------------------------------------------------------- ================================================================================ STEP 8: DESKTOP SHORTCUT FOR QUICK FIX ================================================================================ Create a desktop shortcut to fix audio with one click: $ nano ~/Desktop/Fix-Audio.desktop Paste: ----------------------------------------------------------------------------- [Desktop Entry] Type=Application Name=Fix Audio Exec=gnome-terminal -- bash -c "sudo alsactl init; systemctl --user restart pipewire pipewire-pulse; pactl set-default-sink alsa_output.pci-0000_02_00.6.analog-stereo; pactl set-sink-volume alsa_output.pci-0000_02_00.6.analog-stereo 80%; echo 'Audio fixed!'; read -p 'Press Enter'" Icon=audio-card Terminal=true ----------------------------------------------------------------------------- $ chmod +x ~/Desktop/Fix-Audio.desktop ================================================================================ STEP 9: RESET PIPEWIRE CONFIGURATION (IF OTHER METHODS FAIL) ================================================================================ If none of the above methods work, perform a full PipeWire reset: $ systemctl --user stop pipewire pipewire-pulse $ rm -rf ~/.config/pipewire $ rm -rf ~/.config/pulse $ rm -rf ~/.local/state/wireplumber $ rm -rf ~/.cache/pipewire $ systemctl --user start pipewire pipewire-pulse Then repeat Step 3. ================================================================================ STEP 10: INSTALL PAVUCONTROL (GRAPHICAL AUDIO MANAGEMENT TOOL) ================================================================================ $ sudo apt install pavucontrol Run: $ pavucontrol Go to the "Output Devices" tab: - Find the CX11970 device (or similar) - Click the green checkmark (Set as default) - In the "Port" dropdown, select "Speaker" instead of "Headphones" ================================================================================ DIAGNOSTICS - HOW TO CHECK WHAT'S WRONG ================================================================================ Check if the sound card is detected: $ aplay -l Check device status: $ pactl list short sinks Check available ports: $ pactl list cards | grep -A 20 "CX11970" Check kernel logs: $ dmesg | grep -i "snd\|audio\|hda" Check loaded modules: $ lsmod | grep snd ================================================================================ COMPARING "GOOD" AND "BAD" STATES ================================================================================ Save "good" state (when audio works): $ sudo cp -r /etc/modprobe.d /tmp/modprobe.d.good $ sudo cp -r /etc/modules-load.d /tmp/modules-load.d.good $ sudo cp -r /etc/pulse /tmp/pulse-system.good $ sudo cp -r /usr/share/pipewire /tmp/pipewire-share.good $ lsmod | grep snd > /tmp/snd-modules.good Save "bad" state (when audio does NOT work): $ sudo cp -r /etc/modprobe.d /tmp/modprobe.d.bad $ sudo cp -r /etc/modules-load.d /tmp/modules-load.d.bad $ sudo cp -r /etc/pulse /tmp/pulse-system.bad $ sudo cp -r /usr/share/pipewire /tmp/pipewire-share.bad $ lsmod | grep snd > /tmp/snd-modules.bad Compare states: $ diff -r /tmp/modprobe.d.good /tmp/modprobe.d.bad $ diff -r /tmp/modules-load.d.good /tmp/modules-load.d.bad $ diff -r /tmp/pulse-system.good /tmp/pulse-system.bad $ diff -r /tmp/pipewire-share.good /tmp/pipewire-share.bad $ diff /tmp/snd-modules.good /tmp/snd-modules.bad If diff shows no differences - the problem is in hardware registers. ================================================================================ WHAT DOES NOT WORK - WHAT NOT TO TRY ================================================================================ The following solutions have been tested and failed: | Method | Why It Failed | |--------|---------------| | Cron @reboot with delay | Runs too early | | Systemd service after sound.target | Runs before BIOS state is fully applied | | Disabling suspend in WirePlumber | Does not address hardware register state | | Blacklisting ACP modules | Does not reset hardware state | | Kernel parameters | Cannot override hardware register state | | Watchdog scripts | BIOS does not create configuration files | ================================================================================ ADDITIONAL INFORMATION - ROOT CAUSE OF THE PROBLEM ================================================================================ The problem occurs because BIOS/UEFI during initialization writes the audio controller state to hardware registers. Linux reads this state and applies it, which causes speakers to be marked as "unavailable." The state is stored in HARDWARE REGISTERS which: - Are not accessible via software tools - Are only reset during a full POST (Power-On Self-Test) - Are not dependent on configuration files This is why software solutions (scripts, file modifications) cannot fix the problem if the cause is in the hardware registers. ================================================================================ SUMMARY - MOST EFFECTIVE SOLUTIONS ================================================================================ 1. SYSTEM RESTART - always restores audio $ sudo reboot 2. MANUAL FIX - when restart doesn't help $ sudo alsactl init $ systemctl --user restart pipewire pipewire-pulse $ pactl set-default-sink alsa_output.pci-0000_02_00.6.analog-stereo 3. STARTUP SCRIPT - automate the fix Create ~/bin/fix-audio.sh and add to autostart 4. DESKTOP SHORTCUT - one-click quick fix ================================================================================ IMPORTANT NOTE - THE F12 / F2 BIOS ISSUE ================================================================================ During extensive testing, a critical discovery was made regarding how the problem is triggered: | BIOS Entry Method | Effect on Audio | |-------------------|-----------------| | F12 (boot device selection menu) | ❌ Speaker audio STOPS WORKING | | F2 (BIOS configuration / boot order) | ✅ Audio remains INTACT | THIS MEANS: - Entering BIOS itself is NOT the problem - The problem is the SPECIFIC hardware initialization mechanism used by F12 - If you need to change boot settings - use F2, not F12 HOW THIS WORKS: 1. BIOS/UEFI via F12 initializes the audio controller in a specific mode 2. This state is written to hardware registers 3. Linux reads and applies this state 4. The state causes speakers to be marked as "unavailable" 5. The system defaults to headphones as output RECOMMENDATION: - Avoid using F12 (boot menu) unless absolutely necessary - Use F2 (BIOS configuration) to change boot order - If you must use F12, perform a full restart without entering BIOS afterward -- You received this bug notification because you are subscribed to linux in Ubuntu. Matching subscriptions: Bgg, Bmail, Nb https://bugs.launchpad.net/bugs/2073049 Title: No sound on Huawei Matebook D14 AMD since Linux 6.8.0-38 [regression] Status in linux package in Ubuntu: In Progress Status in linux-oem-6.8 package in Ubuntu: Invalid Status in linux source package in Noble: Fix Released Status in linux-oem-6.8 source package in Noble: Fix Released Bug description: This laptop has had non-functioning internal sound (based on AMD Renoir) until Ubuntu 24.04, which made it work thanks to a bugfix in the kernel. Unfortunately, the sound is completely broken with kernel from package "linux-image-6.8.0-38-generic" (6.8.0-38.38): the internal speakers are not even listed in the sound GUI (I am using "mate-volume- control", with Ubuntu-Mate. When I boot the laptop on Linux 6.8.0-36-generic, the speakers are listed and the sound works normally. This might be related to this bug in Linux kernel: https://bugzilla.kernel.org/show_bug.cgi?id=218959 ProblemType: Bug DistroRelease: Ubuntu 24.04 Package: linux-image-6.8.0-38-generic 6.8.0-38.38 ProcVersionSignature: Ubuntu 6.8.0-38.38-generic 6.8.8 Uname: Linux 6.8.0-38-generic x86_64 ApportVersion: 2.28.1-0ubuntu3 Architecture: amd64 AudioDevicesInUse:  USER PID ACCESS COMMAND  /dev/snd/seq: julier 2643 F.... pipewire  /dev/snd/pcmC0D3p: julier 2643 F...m pipewire  /dev/snd/controlC0: julier 2645 F.... wireplumber CRDA: N/A CasperMD5CheckResult: pass CurrentDesktop: MATE Date: Sun Jul 14 11:03:18 2024 InstallationDate: Installed on 2022-04-18 (818 days ago) InstallationMedia: Ubuntu-MATE 22.04 LTS "Jammy Jellyfish" - Daily amd64 (20220418) MachineType: HUAWEI HVY-WXX9 ProcFB: 0 amdgpudrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.8.0-38-generic root=UUID=e5259488-061f-48f2-b6ca-9ebd58053ca3 ro quiet splash vt.handoff=7 PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon. RelatedPackageVersions:  linux-restricted-modules-6.8.0-38-generic N/A  linux-backports-modules-6.8.0-38-generic N/A  linux-firmware 20240318.git3b128b60-0ubuntu2.1 SourcePackage: linux UpgradeStatus: Upgraded to noble on 2024-04-28 (76 days ago) dmi.bios.date: 03/17/2023 dmi.bios.release: 2.17 dmi.bios.vendor: HUAWEI dmi.bios.version: 2.17 dmi.board.asset.tag: N/A dmi.board.name: HVY-WXX9-PCB-B1 dmi.board.vendor: HUAWEI dmi.board.version: M1010 dmi.chassis.asset.tag: N/A dmi.chassis.type: 10 dmi.chassis.vendor: HUAWEI dmi.chassis.version: M1010 dmi.ec.firmware.release: 2.17 dmi.modalias: dmi:bvnHUAWEI:bvr2.17:bd03/17/2023:br2.17:efr2.17:svnHUAWEI:pnHVY-WXX9:pvrM1010:rvnHUAWEI:rnHVY-WXX9-PCB-B1:rvrM1010:cvnHUAWEI:ct10:cvrM1010:skuC100: dmi.product.family: MateBook D dmi.product.name: HVY-WXX9 dmi.product.sku: C100 dmi.product.version: M1010 dmi.sys.vendor: HUAWEI [Impact] Huawei MateBook D14 AMD got no sound after commit: 4af565de9f8c ("ASoC: amd: acp: fix for acp pdm configuration check") which is introduced in v6.8.5 stable updates. [Fix] Invokes platform specific acp pin configuration check functions. Upstream fix: 09068d624c490 ("ASoC: amd: acp: fix for acp platform device creation failure") [Test] Bug reporter tested on hardware, sound output OK. Also verified on ThinkPad T14 AMD, sound output OK too. [Where problems could occur] It may break sound output of AMD platforms. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2073049/+subscriptions

Комментариев нет:

Отправить комментарий