Artix Linux Forum

Init systems => S6 => Topic started by: negative on 04 September 2020, 10:25:21

Title: Alsa when used as a service fails to restore settings
Post by: negative on 04 September 2020, 10:25:21
alsa fails because it cannot find /var/lib/alsa/asound.state. this file is suppose to be created when alsactl store is run during shutdown. It fails to do so since the directory /var/lib/alsa does not exist initially.

and while were at it. can please provide service for alsa as daemon instead?

thanks.

(screenshot provided)
Title: Re: Alsa when used as a service fails to restore settings
Post by: ndowens on 04 September 2020, 13:15:41
There is alsa-utils-INIT_HERE

For the dir I will look at later when I have access to my pc
Title: Re: Alsa when used as a service fails to restore settings
Post by: Dudemanguy on 04 September 2020, 15:34:31
There's an alsa daemon? An if test should be all that's needed here I suppose.
Title: Re: Alsa when used as a service fails to restore settings
Post by: ndowens on 04 September 2020, 15:49:33
On my system, though I am using pulseaudio /var/lib/alsa exists but alsactl store still doesn’t work
Title: Re: Alsa when used as a service fails to restore settings
Post by: negative on 06 September 2020, 08:45:59
ok, did a very clean install and indeed /var/lib/alsa exist but s6-rc -u/d alsa still fails

alsa fails as a service, BUT if you manually run sudo alsactl store to create the initial state file just then s6-service alsa works both in saving and restoring...
Title: Re: Alsa when used as a service fails to restore settings
Post by: Dudemanguy on 07 September 2020, 19:11:11
Should be fixed now. Basically, because up always failed if the file existed, s6-rc never considered alsa in the "up" state so it never executed down which never created the file. The fix is to just check if /var/lib/alsa/asound.state exists in the up script.