Summary: | media-libs/alsa-lib-1.2.5.1 no UCM support, no sound | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | N. Andrew Walsh <n.andrew.walsh> |
Component: | Current packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | 89q1r14hd, alex, atoth, diazona, dimgel, herrtimson, joakim.tjernlund, kernelpanic, krinpaus, maracay, mmokrejs, pacho, polynomial-c, sam, soprwa |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1269 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | alsa-info.txt |
Description
N. Andrew Walsh
2021-06-18 05:03:42 UTC
@joakim, any ideas? (In reply to Sam James from comment #1) > @joakim, any ideas? hmm, this is new to me, sorry. I guess it would be best to report this problem upstream. It seems you need pipewire git master or just wait for the next pipewire release As a tangential sidenote, with pipewire (or pulseaudio for that matter) media-sound/alsa-utils and its associated startup scripts are not needed. Hopefully they will not break anything but the respective sound daemon should set all the right switches and levels on its own on each startup. Same here: # /etc/init.d/alsasound start * Restoring Mixer Levels ... alsa-lib /mnt/external/var/tmp/portage/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/parser.c:242:(error_node) UCM is not supported for this HDA model (HDA Intel PCH at 0xef348000 irq 142) alsa-lib /mnt/external/var/tmp/portage/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -6 alsactl: set_control:1339: failed to obtain info for control #8 (No such file or directory) alsactl: set_control:1339: failed to obtain info for control #11 (No such file or directory) alsactl: set_control:1339: failed to obtain info for control #12 (No such file or directory) # https://bugs.archlinux.org/task/71180 Please mask media-libs/alsa-lib-1.2.5 series until this is fixed. I went back to: emerge =media-sound/alsa-utils-1.2.4 =media-sound/alsa-tools-1.2.2-r1 =media-libs/alsa-lib-1.2.4 A simple workaround I'm using until this is properly addressed is to add the -U option to both the alsactl commands in /etc/init.d/alsasound so in the restore() function of the init script: alsactl -E HOME="${alsahomedir}" -I -f "${alsastatedir}/asound.state" restore ${cardnum} becomes: alsactl -U -E HOME="${alsahomedir}" -I -f "${alsastatedir}/asound.state" restore ${cardnum} and same for the store command in the save() function. These closed github issues explain: https://github.com/alsa-project/alsa-utils/issues/101 https://github.com/alsa-project/alsa-lib/issues/159 I'm not sure what the proper fix is long term, I guess it depends if your hardware is "legacy" (use -U) or not (don't use -U). Thus, in line with comment #6, could it be useful to add such a switch as an optional parameter (sort of EXTRAARG) in conf.d/alsaasound? alsa-lib needs more fixes w.r.t UCM, this just went into Fedora: https://github.com/alsa-project/alsa-lib/commit/4a52ae4c329ae17117375a4b85b80f37994a4044 patch is in F35 update - https://bodhi.fedoraproject.org/updates/FEDORA-2021-f1f5e36e10 and F34 update - https://bodhi.fedoraproject.org/updates/FEDORA-2021-3309cec1b6 not sure if there are more hotfixes there too Not sure if this one is connected too: https://github.com/alsa-project/alsa-lib/commit/7d40a76ef5494e08af00fa4e7bfefbd43aba4827 Same errors, but I just end up with muted mixers on the cards, so unmuting in alsa-mixers gets me the sound. Using pulse on top of alsa. (In reply to Christian Schmidt from comment #10) > Same errors, but I just end up with muted mixers on the cards, so unmuting > in alsa-mixers gets me the sound. Using pulse on top of alsa. same error with the patches I mentioned for alsa-lib? (In reply to Joakim Tjernlund from comment #3) > It seems you need pipewire git master or just wait for the next pipewire > release Nope, I added that and still get the same error. I also added the patch from https://github.com/alsa-project/alsa-lib/commit/4a52ae4c329ae17117375a4b85b80f37994a4044 to alsa-lib-1.2.5.1 y hand and still the same. Well, I don't know why UCM isn't supported for these devices, but the -U flag needs to be passed to bypass this for now, but only on certain cards. The /etc/init.d/alsasound file has a variable alsascrdir=/etc/alsa.d which is never referenced and I would assume is required for passing parameters to alsactl? I get the following: # rc-service alsasound restart * Storing ALSA Mixer Levels ... [ ok ] * Restoring Mixer Levels ... alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/parser.c:242:(error_node) UCM is not supported for this HDA model (HDA ATI SB at 0xfeb00000 irq 16) alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -6 alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/parser.c:242:(error_node) UCM is not supported for this HDA model (HDA ATI HDMI at 0xfea60000 irq 38) alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -6 alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:2 use case configuration -2 alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:3 use case configuration -2 alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:4 use case configuration -2 [ ok ] These errors starting with "UCM is not supported for ..." are harmless as far as I can see. Starting with alsa-utils 1.2.5 alsactl will always attempt to use UCM card configuration first, unless that is disabled via '-U' command line parameter. If UCM initialization fails, or '-U' command line parameter is given, alsactl will still proceed to use card without UCM. The only side effect for cards which do not have UCM configuration is the unfortunate error messages from failed UCM initialization. (In reply to Igor V. Kovalenko from comment #13) > These errors starting with "UCM is not supported for ..." are harmless as > far as I can see. > > Starting with alsa-utils 1.2.5 alsactl will always attempt to use UCM card > configuration first, unless that is disabled via '-U' command line parameter. > > If UCM initialization fails, or '-U' command line parameter is given, > alsactl will still proceed to use card without UCM. The only side effect for > cards which do not have UCM configuration is the unfortunate error messages > from failed UCM initialization. Well, except that (as I noted in my top post) it didn't just give the error message, but also there was no sound. Will adding the -U to the alsa commands work around that? Still an issue with media-libs/alsa-lib-1.2.6 version? (In reply to Lars Wendler (Polynomial-C) from comment #15) > Still an issue with media-libs/alsa-lib-1.2.6 version? I don't see the errors anymore, but I still end up with muted mixers on boot. (In reply to Alex Barker from comment #16) > (In reply to Lars Wendler (Polynomial-C) from comment #15) > > Still an issue with media-libs/alsa-lib-1.2.6 version? > > I don't see the errors anymore, but I still end up with muted mixers on boot. I got may speaker working on my SOF Lenovo laptop but lost the Mic, which is OK by me as I don't use the built in Mic. There is a maintenance rel of 1.2.6 coming soon, maybe it helps. Still valid with 1.2.8? Thanks I have media-libs/alsa-lib-1.2.8-r1 installed and it is probably fine for me. I do not see any special settings on my boot kernel commandline nor in /etc/conf.d/alsasound nor in /etc/local.d/baselayout1.start $ grep -v "^#" /etc/conf.d/alsasound RESTORE_ON_START="yes" SAVE_ON_STOP="yes" $ I stopped and started the alsasound service. Probably a different bug but I cannot play sound from vlc application but can play from firefox. I do no not understand why during stop&start the opened device is not destroyed and hence would not be utilized by running instance of a firefox browser anymore. But it is evidently the case. vlc ouputs on STDERR: ALSA lib /mnt/nocrypt/var/tmp/portage/portage/media-libs/alsa-lib-1.2.8-r1/work/alsa-lib-1.2.8/src/pcm/pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave [0000563a98964370] alsa audio output error: cannot open ALSA device "sysdefault:CARD=PCH": Device or resource busy [0000563a98964370] main audio output error: module not functional [00007ff024c3c8f0] main decoder error: failed to create audio output But restoring the sound works or at least, it restores some previously saved settings instead of those current saved during 'stop'. I forgot where to find those saved values. I will attach output of alsa-info.sh just in case it helps. Oh yeah, I have alsa-uil-1.2.7. Created attachment 845529 [details]
alsa-info.txt
Seems '/etc/init.d/alsasound stop' does not actually stop the service despite the green 'ok' (I use OpenRC). 'lsof' reports pulseaudio runing and being opened. localhost ~ # /etc/init.d/alsasound start * Restoring Mixer Levels ... [ ok ] localhost ~ # localhost ~ # /etc/init.d/alsasound stop * WARNING: you are stopping a boot service * Storing ALSA Mixer Levels ... [ ok ] localhost ~ # Here the same again with debug: localhost ~ # /etc/init.d/alsasound start * Restoring Mixer Levels ... [ ok ] localhost ~ # /etc/init.d/alsasound stop -d * WARNING: you are stopping a boot service + sourcex -e /etc/rc.conf + '[' -e = -e ']' + shift + '[' -e /etc/rc.conf ']' + . /etc/rc.conf ++ rc_shell=/sbin/sulogin ++ rc_hotplug=pcscd ++ rc_logger=YES ++ unicode=YES ++ rc_tty_number=12 + '[' -d /etc/rc.conf.d ']' + _conf_d=/etc/init.d/../conf.d + _c=alsasound + '[' -n alsasound -a alsasound '!=' alsasound ']' + unset _c + sourcex -e /etc/init.d/../conf.d/alsasound.default + '[' -e = -e ']' + shift + '[' -e /etc/init.d/../conf.d/alsasound.default ']' + return 1 + sourcex -e /etc/init.d/../conf.d/alsasound + '[' -e = -e ']' + shift + '[' -e /etc/init.d/../conf.d/alsasound ']' + . /etc/init.d/../conf.d/alsasound ++ RESTORE_ON_START=yes ++ SAVE_ON_STOP=yes + unset _conf_d + sourcex /lib/rc/sh/runit.sh + '[' /lib/rc/sh/runit.sh = -e ']' + . /lib/rc/sh/runit.sh + sourcex /lib/rc/sh/s6.sh + '[' /lib/rc/sh/s6.sh = -e ']' + . /lib/rc/sh/s6.sh ++ '[' -z '' ']' ++ s6_service_path=/var/svc.d/alsasound + sourcex /lib/rc/sh/start-stop-daemon.sh + '[' /lib/rc/sh/start-stop-daemon.sh = -e ']' + . /lib/rc/sh/start-stop-daemon.sh + sourcex /lib/rc/sh/supervise-daemon.sh + '[' /lib/rc/sh/supervise-daemon.sh = -e ']' + . /lib/rc/sh/supervise-daemon.sh ++ extra_commands='healthcheck unhealthy ' + sourcex /etc/init.d/alsasound + '[' /etc/init.d/alsasound = -e ']' + . /etc/init.d/alsasound ++ alsastatedir=/var/lib/alsa ++ alsascrdir=/etc/alsa.d ++ alsahomedir=/run/alsasound ++ extra_commands='save restore' + yesno '' + '[' -z '' ']' + return 1 + for _cmd in "$@" + '[' stop '!=' status -a stop '!=' describe ']' + '[' -n '' ']' ++ command -v cgroup_add_service + '[' cgroup_add_service = cgroup_add_service ']' + grep -qs /sys/fs/cgroup /proc/1/mountinfo + '[' -d /sys/fs/cgroup -a '!' -w /sys/fs/cgroup ']' + cgroup_add_service + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/blkio/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/cpu/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/cpuacct/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/cpuset/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/devices/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/freezer/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/memory/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/net_cls/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/net_prio/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/openrc/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/perf_event/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/pids/tasks ']' + printf %d 0 + for d in /sys/fs/cgroup/* + '[' -w /sys/fs/cgroup/unified/tasks ']' + openrc_cgroup=/sys/fs/cgroup/openrc + '[' -d /sys/fs/cgroup/openrc ']' + cgroup=/sys/fs/cgroup/openrc/alsasound + mkdir -p /sys/fs/cgroup/openrc/alsasound + '[' -w /sys/fs/cgroup/openrc/alsasound/tasks ']' + printf %d 0 ++ command -v cgroup_set_limits + '[' cgroup_set_limits = cgroup_set_limits ']' + cgroup_set_limits + local blkio= + '[' -n '' ']' + local cpu= + '[' -n '' ']' + local cpuacct= + '[' -n '' ']' + local cpuset= + '[' -n '' ']' + local devices= + '[' -n '' ']' + local hugetlb= + '[' -n '' ']' + local memory= + '[' -n '' ']' + local net_cls= + '[' -n '' ']' + local net_prio= + '[' -n '' ']' + local pids= + '[' -n '' ']' + return 0 ++ command -v cgroup2_set_limits + '[' cgroup2_set_limits = cgroup2_set_limits ']' + '[' stop = start ']' + break + eval 'printf '\''%s\n'\'' ' ++ printf '%s\n' + read _d + '[' -n '' ']' + read _d + '[' 0 -ne 0 ']' + unset _d + eval 'printf '\''%s\n'\'' ' ++ printf '%s\n' + read _f + '[' -n '' ']' + read _f + '[' 0 -ne 0 ']' + unset _f + '[' -n '' ']' + '[' -n stop ']' + '[' stop = depend ']' + for _cmd in describe start stop status ${extra_commands:-$opts} $extra_started_commands $extra_stopped_commands + '[' describe = stop ']' + for _cmd in describe start stop status ${extra_commands:-$opts} $extra_started_commands $extra_stopped_commands + '[' start = stop ']' + for _cmd in describe start stop status ${extra_commands:-$opts} $extra_started_commands $extra_stopped_commands + '[' stop = stop ']' ++ command -v stop + '[' stop = stop ']' + yesno + '[' -z '' ']' + return 1 + for _cmd in $extra_stopped_commands + '[' cgroup_cleanup = stop ']' + unset _cmd + case $1 in + verify_boot + '[' '!' -e /run/openrc/softlevel ']' + return 0 ++ command -v stop_pre + '[' '' = stop_pre ']' + stop + '[' yes = yes ']' + save + ebegin 'Storing ALSA Mixer Levels' * Storing ALSA Mixer Levels ... + checkpath -q -d -m 0700 -o root:root /run/alsasound + mkdir -p /var/lib/alsa + alsactl -E HOME=/run/alsasound -f /var/lib/alsa/asound.state store + for ossfile in /proc/asound/card*/pcm*/oss + '[' -e '/proc/asound/card*/pcm*/oss' ']' + continue + eend 0 [ ok ] + return 0 ++ command -v stop_post + '[' '' = stop_post ']' ++ command -v cgroup_cleanup + '[' cgroup_cleanup = cgroup_cleanup ']' + '[' stop = stop ']' + yesno '' + '[' -z '' ']' + return 1 ++ command -v cgroup2_remove + '[' cgroup2_remove = cgroup2_remove ']' + '[' stop = stop ']' + cgroup2_remove + local cgroup_path rc_cgroup_path ++ cgroup2_find_path ++ grep -qw cgroup2 /proc/filesystems ++ case "${rc_cgroup_mode:-hybrid}" in ++ printf /sys/fs/cgroup/unified ++ return 0 + cgroup_path=/sys/fs/cgroup/unified + '[' -z /sys/fs/cgroup/unified ']' + rc_cgroup_path=/sys/fs/cgroup/unified/alsasound + '[' '!' -d /sys/fs/cgroup/unified/alsasound ']' + return 0 + shift + continue 2 + '[' -n '' ']' + exit 0 localhost ~ # I could then close this bug and open a separate one about the stopping of the openRC service (In reply to Martin Mokrejš from comment #19) > I have media-libs/alsa-lib-1.2.8-r1 installed and it is probably fine for > me. I do not see any special settings on my boot kernel commandline nor in > /etc/conf.d/alsasound nor in /etc/local.d/baselayout1.start > > $ grep -v "^#" /etc/conf.d/alsasound > RESTORE_ON_START="yes" > SAVE_ON_STOP="yes" > $ > > I stopped and started the alsasound service. Probably a different bug but I > cannot play sound from vlc application but can play from firefox. I do no > not understand why during stop&start the opened device is not destroyed and > hence would not be utilized by running instance of a firefox browser > anymore. But it is evidently the case. > > vlc ouputs on STDERR: > > ALSA lib > /mnt/nocrypt/var/tmp/portage/portage/media-libs/alsa-lib-1.2.8-r1/work/alsa- > lib-1.2.8/src/pcm/pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave > [0000563a98964370] alsa audio output error: cannot open ALSA device > "sysdefault:CARD=PCH": Device or resource busy > [0000563a98964370] main audio output error: module not functional > [00007ff024c3c8f0] main decoder error: failed to create audio output > > But restoring the sound works or at least, it restores some previously saved > settings instead of those current saved during 'stop'. I forgot where to > find those saved values. I will attach output of alsa-info.sh just in case > it helps. Oh yeah, I have alsa-uil-1.2.7. VLC vs Firefox sound like a configuration issue for me. Please take a look at on /etc/alsa/conf.d and possibly link/move the contents of /usr/share/alsa/alsa.conf.d/, while also study /etc/asound.conf and inspect the directory named /usr/share/alsa/cards - or in case of UCM, /usr/share/alsa/ucm2 - for possibilities. There might be also a per user .asoundrc as well. I suggest making use of media-sound/apulse for handling applications expecting pulseaudio. Speaking of pulseaudio, it is important to tame the sound configuration of both VLC and Firefox to cope with system settings. Gentoo and Arch hosts good wiki pages for tips and tricks. If pulseaudio is being used, /etc/asound.conf will be routing things and the rest of the configuration must be performed in pulseaudio or recently pipewire. If things are fine and dandy, the card will play sound from multiple sources even only using ALSA alone without pulseaudio and/or pipewire. |