[Pkg-alsa-devel] Bug#800572: CONFIG_UEVENT_HELPER=n kernel confuses alsactl restore
Trent W. Buck
trentbuck at gmail.com
Thu Oct 1 01:26:23 UTC 2015
Package: alsa-utils
Version: 1.0.29-1
Severity: minor
I spotted this message when studying alsa-utils' udev rules:
# alsactl -E HOME=/run/alsa --file /dev/null restore 0
No state is present for card PCH
** alsactl: sysfs_init:48: sysfs path '/sys' is invalid
Found hardware: "HDA-Intel" "Realtek ALC662 rev3" "HDA:10ec0662,10ec0662,00100300" "0x10ec" "0x0662"
Hardware is initialized using a generic method
No state is present for card PCH
# echo $?
99
This code assumes that a working /sys will have a /sys/kernel/uevent_helper.
This is not a safe assumption in custom 3.16+ kernels.
See also https://bugs.debian.org/752742
Also /usr/share/doc/systemd/README.gz calls it a "legacy" interface,
though I think it is still essential elsewhere (e.g. busybox mdev).
alsactl/init_sysfs.c-32-static int sysfs_init(void)
alsactl/init_sysfs.c:46: strlcat(sysfs_test, "/kernel/uevent_helper", sizeof(sysfs_test));
alsactl/init_sysfs.c-47- if (access(sysfs_test, F_OK)) {
alsactl/init_sysfs.c-48- error("sysfs path '%s' is invalid\n", sysfs_path);
alsactl/init_sysfs.c-49- return -errno;
alsactl/init_sysfs.c-50- }
I don't know what sysfs_init() *should* check for.
I don't know what alsactl does differently if it thinks /sys is working.
alsactl restore *does* change my mixer levels, so this might be a non-issue:
# echo 1 >/sys/class/sound/hdaudioC0D2/reconfig
# amixer >before
# alsactl -E HOME=/run/alsa --file /dev/null restore 0
[...]
# amixer >after
# cmp before after
before after differ: byte 164, line 5
More information about the Pkg-alsa-devel
mailing list