Artix Linux Forum

Artix Linux => System => Topic started by: bstaletic on 26 January 2021, 20:25:48

Title: alsactl store broken with s6
Post by: bstaletic on 26 January 2021, 20:25:48
Hello, everyone. I'm not exactly new to Artix, but I am new to the forum as well as S6. Today I decided to switch from runit to S6, because of a better support for service dependencies. Runit was giving me troubles with service order, so I thought I'd have more luck with S6.

Everything seems to be working, except
Code: [Select]
alsactl store
. Things that do work:


Here's the output of the failing command:

Code: [Select]
bstaletic@Gallifrey ~ % alsactl store
alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: No such file or directory

However...

Code: [Select]
bstaletic@Gallifrey ~ % ll /var/lib/alsa/asound.state*
-rw-r--r-- 1 root root 11250 Jan 26 19:52 /var/lib/alsa/asound.state
-rw-r--r-- 1 root root     0 Jan 26 19:52 /var/lib/alsa/asound.state.check
bstaletic@Gallifrey ~ % file /var/lib/alsa/asound.state*
/var/lib/alsa/asound.state:       ASCII text, with very long lines
/var/lib/alsa/asound.state.check: empty

So the file is there.
Title: Re: alsactl store broken with s6
Post by: Dudemanguy on 26 January 2021, 21:34:20
So "alsactl store" fails when you run it in a terminal and not just on shutdown?
Title: Re: alsactl store broken with s6
Post by: bstaletic on 26 January 2021, 23:10:57
Yes, it does fail if I run it in the terminal. Would something like "stat" be useful in diagnosing?
Title: Re: alsactl store broken with s6
Post by: Dudemanguy on 26 January 2021, 23:22:22
Not sure, almost seems like your asound.state files are corrupted somehow. I'm not sure what "/var/lib/alsa/asound.state.check" is supposed be either. This might sound silly but did you try deleting those files and running "alsactl store" again?
Title: Re: alsactl store broken with s6
Post by: bstaletic on 27 January 2021, 00:33:02
Quote
I'm not sure what "/var/lib/alsa/asound.state.check" is supposed be either

I'm not sure either. It was either created while I was using runit, or when something failed with s6.

Quote
This might sound silly but did you try deleting those files and running "alsactl store" again?

Tried that already, but it didn't help. Hm... Maybe some other process is keeping a lock on the file and so alsactl fails to take a lock... I'll try with "init=/bin/bash" and see what happens.
Title: Re: alsactl store broken with s6
Post by: bstaletic on 27 January 2021, 00:53:13
Okay, that didn't work, but this is getting really weird.


I'd be okay with changing the service script to use `--file`, but it would still be nice to get to the bottom of this.
Title: Re: alsactl store broken with s6
Post by: pnotz17 on 08 March 2023, 12:01:18
im having the same issue still havent found a fix
Title: Re: alsactl store broken with s6
Post by: lq on 09 March 2023, 05:48:12

Code: [Select]
alsactl store -f ~/.config/asound.conf
alsactl -f ~/.config/asound.conf restore
Title: Re: alsactl store broken with s6
Post by: dimgel on 30 June 2023, 00:25:27
im having the same issue still havent found a fix

Same here. If I delete /var/lib/alsa then it starts but fails to stop (even force-stop) with same error. So both ways alsactl looks broken.
Title: Re: alsactl store broken with s6
Post by: Dudemanguy on 30 June 2023, 03:27:20
Should I just make the script use the "--file" argument? I don't know if that fixes it for you guys or not nor do I know why this even happens for some people but not everyone.
Title: Re: alsactl store broken with s6
Post by: purpleleaf on 04 July 2023, 21:26:44
Same problem for me with a new installation using dinit.
An older installation does not show this problem
Title: Re: alsactl store broken with s6
Post by: purpleleaf on 04 July 2023, 21:39:00
This post seems relevant...
https://bugs.gentoo.org/529832

In my installation also /run/lock is missing and the directory creation solved the problem, but after a reboot it was missing again.

I had to create the /usr/lib/tmpfiles.d/lock.conf; I inserted into it the content of lock.conf file i found in: https://aur.archlinux.org/packages/tmpfiles-config.

After a reboot all is working.

Title: Re: alsactl store broken with s6
Post by: Dudemanguy on 04 July 2023, 22:35:18
Nice detective work there! It appears I have the /run/lock directory as well as the symlink from /var/lock to /run/lock. A quick check shows that /var/lock is owned by the filesystem package so everyone should have that. I'm not sure what actually makes that directory a symlink however.
Title: Re: alsactl store broken with s6
Post by: purpleleaf on 05 July 2023, 00:12:37
ps
just for accuracy... i'm running dinit, not s6
pps sorry, i've forgotten i already reported this in first post i made in this thread..... but now i can't delete this post...  :-[
 
Title: Re: alsactl store broken with s6
Post by: Dudemanguy on 14 July 2023, 03:41:08
Just FYI, this should finally be solved now thanks to @purpleleaf figuring out what the problem is. etmpfiles has a legacy.conf again which will make the /var/lock and /run/lock directories on boot (all init systems).