Re: LINUX AUDIO FIX FOR HUAWEI AMD LAPTOPS

Bradley Morgan <[email protected]>
Newsgroups org.alsa-project.alsa-devel
Message-ID <[email protected]>
On 15 August 2026 18:47:06 BST, Walther White <[email protected]>
wrote:
>================================================================================LINUX
>AUDIO FIX FOR HUAWEI AMD LAPTOPS
>================================================================================
>
>Author: Linux Community / Michael Lorentz

Cheers for all this, but may I ask what this has to do with the Linux
kernel? 

Maybe using some sort of blog site to post this is more beneficial?

But who bloody knows, I just popped up to some driver complaining for no
reason to this thing that sounds blatantly like AI.


>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
>
>================================================================================
>END OF REPORT
>================================================================================


Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.