Alsa dont keep settings after reboot.

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

Alsa dont keep settings after reboot.

Post by retnev »

alarming that an issue that has been around since 2004 is still not resolved
"https://www.linuxquestions.org/question ... ot-206782/"

I have the exact same problem again with the newest alsa version, or should I say the newest alsa-old-bug version.

So how do I configure also to keep its settings with reboot ?
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 140 times
Been thanked: 348 times

Re: Alsa dont keep settings after reboot.

Post by LAM »

retnev wrote: Sun Jan 23, 2022 7:27 am So how do I configure also to keep its settings with reboot ?
I would look into alsactl store command, if you are using systemd you should have an alsa-restore.service loading at boot, that should take care of restoring the ALSA devices state.

Didn't look at the bug you are mentioning, but I hadn't problems with ALSA state restore in more than 10+ years in Debian.

in mix, nobody can hear your screen

retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Alsa dont keep settings after reboot.

Post by retnev »

It gives me
$ alsactl store
alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists

No I am not using systemD but I can use alsactl.

I get the same message whether alsa is running or not.
There seems to be a lock file.

P.S I should have read your post more carefully. You did mention that it has tho be run after reboot. I corrected my reply.
retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Alsa dont keep settings after reboot.

Post by retnev »

I booted with a systmd kernel and systemd fully running init and everything.
Command still doesnt work
/var/lib/alsa/asound.state is locked.

That is what I usually get with anything systemD. Things dont work for long.

Your suggestion is very good though as I think what I will attempt is to let cron overwrite /var/lib/alsa/asound.state with a version saved before reboot. It should work the same.

I checked and I could back up asound.state and copy it back no problem with no error.

Code: Select all

 # cp asound.state  asound.state.bup
 # cp asound.state.bup  asound.state
Completely overriding the silly lock file which is seemingly just a synthetic systemD construct as I couldnt find a lock anywhere in the alsa directory trees.

So I will just write a cron entry that will restore the alsa state when rebooting.
Should work.
Thanks a lot for the suggestion that put me on the right track.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: Alsa dont keep settings after reboot.

Post by j_e_f_f_g »

Based upon your posts over the past week, I strongly suggest that you have a catholic priest perform an exorcism upon your computer.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

retnev
Established Member
Posts: 157
Joined: Sat Mar 25, 2017 2:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Alsa dont keep settings after reboot.

Post by retnev »

I agree, but it is a clean install of MX21.
Post Reply