Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: alsactl store broken with s6 (Read 1151 times) previous topic - next topic
0 Members and 6 Guests are viewing this topic.

alsactl store broken with s6

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:

  • alsactl -L store, but that  doesn't take a lock.
  • alsactl --file /some/other/path

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.

Re: alsactl store broken with s6

Reply #1
So "alsactl store" fails when you run it in a terminal and not just on shutdown?

Re: alsactl store broken with s6

Reply #2
Yes, it does fail if I run it in the terminal. Would something like "stat" be useful in diagnosing?

Re: alsactl store broken with s6

Reply #3
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?

Re: alsactl store broken with s6

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

Re: alsactl store broken with s6

Reply #5
Okay, that didn't work, but this is getting really weird.

  • alsactl store - doesn't work
  • alsactl --file=/var/lib/alsa/asound.state store - works, using same path Turns out I named the file alsa.state

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.

Re: alsactl store broken with s6

Reply #6
im having the same issue still havent found a fix
Rule 3: Never believe what you are told. Double check.

Re: alsactl store broken with s6

Reply #7

Code: [Select]
alsactl store -f ~/.config/asound.conf
alsactl -f ~/.config/asound.conf restore
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: alsactl store broken with s6

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

Re: alsactl store broken with s6

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

Re: alsactl store broken with s6

Reply #10
Same problem for me with a new installation using dinit.
An older installation does not show this problem

Re: alsactl store broken with s6

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


Re: alsactl store broken with s6

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

Re: alsactl store broken with s6

Reply #13
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...  :-[
 

Re: alsactl store broken with s6

Reply #14
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).