Fixing snd_hda_intel Regression: PCI Rescan Restores Audio on Old Laptop
After a kernel update on my Emachines E732 with Intel 5 Series/3400 Series HDA (chip-ID 8086:3b56), audio vanished. aplay -l reports no soundcards found. lspci spots the device at 00:1b.0, inxi -Axxz confirms the snd_hda_intel driver, but journalctl is flooded with errors: hdaudio hdaudioC0D0: no AFG or MFG node found across all nodes.
dmesg tells the real story: during initialization, snd_hda_intel 0000:00:1b.0: CORB reset timeout#2, CORBRP = 65535, followed by no codecs initialized. CORB (Command Output Ring Buffer) is the ring buffer for codec commands. A value of 0xFFFF signals a hung bus or inaccessible hardware—reading from an uninitialized register.
BAR on cold boot: mem 0xd4400000-0xd4403fff 64bit. Reloading the module (modprobe -r/-a snd_hda_intel) repeats the error with fresh timestamps.
Ineffective Quick Fixes
Standard tweaks fell flat:
- User-space tools: Reinstalling PipeWire/WirePlumber, tweaking alsamixer—useless without ALSA devices.
- Module options:
options snd-hda-intel enable=1 power_save=0 power_save_controller=N model=autoin/etc/modprobe.d/alsa-fix.conf. - GRUB params:
pci=nocrs pci=nomsi pcie_aspm=off snd_hda_intel.power_save=0 snd_hda_intel.dma_mask=0. - Hot-reload:
modprobe snd_hda_intel msi=0 dsp_driver=1 probe_mask=1.
The issue stems from early initialization: LTS kernels or LiveCDs worked due to different module load order or BIOS state.
[ 17.492159] snd_hda_intel 0000:00:1b.0: CORB reset timeout#2, CORBRP = 65535
[ 17.492380] snd_hda_intel 0000:00:1b.0: no codecs initialized
The Fix: PCI Hot-Rescan via sysfs
Key insight: Cold boot assigns a bad BAR, but hot-rescan on a warmed-up system works. Here's the sequence:
echo 1 | sudo tee /sys/bus/pci/devices/0000:00:1b.0/removesleep 2echo 1 | sudo tee /sys/bus/pci/rescan
Fresh dmesg output:
[ 473.969035] pci 0000:00:1b.0: [8086:3b56] ...
[ 473.969102] pci 0000:00:1b.0: BAR 0 [mem 0x00000000-0x00003fff 64bit]
[ 473.969982] pci 0000:00:1b.0: BAR 0 [mem 0x23c000000-0x23c003fff 64bit]: assigned
[ 474.095498] input: HDA Intel MID Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input24
[ 474.095675] input: HDA Intel MID Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input25
Audio is back: sound card in /dev/snd, PipeWire detects devices. The culprit? BIOS hands out bogus params early on; rescan after full PCI init assigns the correct BAR.
Automating for Everyday Use
For a production systemd script (post-boot):
#!/bin/bash
PCI_ID="0000:00:1b.0"
echo 1 > /sys/bus/pci/devices/$PCI_ID/remove
sleep 2
echo 1 > /sys/bus/pci/rescan
# Verify
if aplay -l | grep -q "card 0"; then
systemctl --user restart pipewire pipewire-pulse wireplumber
fi
Drop it in /etc/systemd/system/pci-audio-rescan.service with After=multi-user.target.
Diagnosing Similar Regressions
For snd_hda_intel on legacy Intel HDA:
- Grab logs:
dmesg | grep '00:1b.0',journalctl -b -p err | grep hda. - Check BAR:
lspci -vv -s 00:1b.0 | grep BAR. - Test rescan: Use the sysfs method above.
- Compare kernels: LTS vs mainline—regression in PCI alloc or power management.
- BIOS/UEFI: Update if available, though it rarely helps on 2010-era chipsets.
This hits older hardware hard after kernel 6.8+: PCI enumeration and ASPM changes.
Key Takeaways
- CORBRP=0xFFFF flags a stalled HDA controller, not BIOS/codec issues.
- PCI rescan via sysfs sidesteps cold boot timeouts by reassigning BAR.
- LTS kernels succeed thanks to timing: modules load post-BIOS handoff.
- Automation: systemd service ensures reliability on daily drivers.
- Diagnosis: Focus on dmesg over user-space; zero in on PCI BAR and CORB/RIRB.
— Editorial Team
No comments yet.