Skip to main content
Topic: Alsa when used as a service fails to restore settings (Read 653 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Alsa when used as a service fails to restore settings

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)

Re: Alsa when used as a service fails to restore settings

Reply #1
There is alsa-utils-INIT_HERE

For the dir I will look at later when I have access to my pc

Re: Alsa when used as a service fails to restore settings

Reply #2
There's an alsa daemon? An if test should be all that's needed here I suppose.

Re: Alsa when used as a service fails to restore settings

Reply #3
On my system, though I am using pulseaudio /var/lib/alsa exists but alsactl store still doesn’t work

Re: Alsa when used as a service fails to restore settings

Reply #4
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...

Re: Alsa when used as a service fails to restore settings

Reply #5
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.