From: GitHub issues - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: alsactl restore fails after Generic / Generic_1 IDs swap between HDMI and ALC897
Date: Sun, 8 Nov 2026 02:45:54 +0100 (CET) [thread overview]
Message-ID: <18e5ee9490f42900-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <18e5ee9490d26400-webhooks-bot@alsa-project.org>
alsa-project/alsa-utils issue #338 was opened from flowersauce:
## Summary
Two HDA controllers exchanged the ALSA IDs `Generic` and `Generic_1` between observed boots. The existing state file still associated those IDs with the previous hardware. On the later boot, `alsactl restore` returned 99 and reported missing controls; the analog card's saved `Auto-Mute Mode = Disabled` was not restored.
This has a similar symptom and hardware combination to closed issue #263. That discussion suggested checking whether the Generic IDs refer to the same hardware after reboot. Here the observed ID-to-hardware mapping did change.
## Environment
- Arch Linux; Gigabyte X870 GAMING X WIFI7 motherboard
- linux-zen package: 7.2.14.zen1-1
- alsa-utils: 1.2.16-1; alsa-lib: 1.2.16.1-1
- PipeWire: 1.6.10; WirePlumber: 0.5.18
- Both affected controllers use `snd_hda_intel`
- PCI `0000:77:00.1`: AMD HDMI controller, ATI R6xx HDMI codec
- PCI `0000:77:00.6`: AMD analog controller, Realtek ALC897 codec
- A separate discrete GPU HDMI controller has the ID `HDMI`
- Rear line-out speakers and front-panel headphones both connected
## Observations
The following mappings were recorded from `/proc/asound/cards` in two sessions:
| Controller / codec | ALSA index | November 2 | November 8 |
| --- | --- | --- | --- |
| 0000:77:00.1 / ATI R6xx HDMI | 2 | Generic | Generic_1 |
| 0000:77:00.6 / Realtek ALC897 | 3 | Generic_1 | Generic |
The indexes stayed the same, while the IDs swapped.
Before the local mitigation, `/var/lib/alsa/asound.state` still contained:
- HDMI controls under `state.Generic`
- Analog controls under `state.Generic_1`, including `Auto-Mute Mode = Disabled`
On the November 8 boot, the stock `alsa-restore.service` ran `/usr/bin/alsactl restore`. Its process result was `status=99`, with many messages such as:
```text
/usr/bin/alsactl: set_control:1373: failed to obtain info for control #20 (No such file or directory)
```
The actual Auto-Mute setting on the analog card was `Enabled`.
The user-visible effect was that rear speakers stayed silent when front headphones were plugged in, even after selecting the line-out port in the desktop sound settings. Unplugging headphones allowed the speakers to play.
The PipeWire sink was already on `analog-output-lineout`, with both jack ports reported as available. Codec pin 0x14 (rear line-out) had `Pin-ctls: 0x00`. After disabling Auto-Mute, it changed to `Pin-ctls: 0x40: OUT`.
## Expected behavior / question
Is there a supported way for restoration to detect or avoid applying a saved card section to different hardware when discovery-dependent IDs change? Or does the underlying default-ID assignment need to be addressed in the kernel sound subsystem?
The observed mapping change and mismatched saved state strongly suggest an explanation for the restore failure, but the original failure has not been reproduced under controlled boot conditions. There is no evidence identifying a particular package update as the cause.
## Local mitigation and tests
Used the documented [udev card ID method](https://www.alsa-project.org/wiki/Changing_card_IDs_with_udev) to give each affected controller a unique ID:
```udev
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="card[0-9]*", KERNELS=="0000:77:00.6", ATTR{id}="Mainboard"
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="card[0-9]*", KERNELS=="0000:77:00.1", ATTR{id}="RadeonHDMI"
```
Installed as `/etc/udev/rules.d/60-stable-hda-ids.rules`, before the stock `90-alsa-restore.rules`. For live testing, the IDs were also assigned through sysfs without reloading the active driver. Set Auto-Mute to Disabled and generated a clean state file using `alsactl store`.
Tests performed:
- Temporarily enabled Auto-Mute, then ran `alsactl --no-init-fallback restore Mainboard`: exit 0 and Auto-Mute returned to Disabled.
- Ran `alsactl --no-init-fallback restore` for all cards: exit 0.
- Selected headphones: Headphone switch on, Front switch off.
- Selected line-out: Front switch on, Headphone switch off.
- Auto-Mute remained Disabled during both port changes.
A temporary user service that forced Auto-Mute off at login was removed after these tests, so it is not needed for the live restore test.
**Limitations:** The complete boot path with the new udev rules has not yet been tested by rebooting. Physical audibility after the final configuration change has not yet been confirmed by the user. Pre-mitigation state and the boot restore log have been preserved locally.
Please let me know which additional targeted diagnostics would help, or whether this report should be directed to the kernel tracker.
Issue URL : https://github.com/alsa-project/alsa-utils/issues/338
Repository URL: https://github.com/alsa-project/alsa-utils
parent reply other threads:[~2026-11-08 1:46 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <18e5ee9490d26400-webhooks-bot@alsa-project.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18e5ee9490f42900-webhooks-bot@alsa-project.org \
--to=github@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox