You are not logged in.

#1 2020-10-09 00:58:10

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

[SOLVED] ALSA issues after rsync restoration/reinstallation

Hi,

I am having issues with running the alsamixer command. Every time I run it, I receive the following output:

ALSA lib conf.c:3817:(config_file_open) cannot access file /etc/alsa/conf.d/10-samplerate.conf
ALSAALSA lib conf.c:3817:(config_file_open) cannot access file /etc/alsa/conf.d/10-samplerate.conf
ALSA lib conf.c:3737:(snd_config_hooks_call) function snd_config_hook_load returned error: No such file or directory
ALSA lib conf.c:4201:(snd_config_update_r) hooks failed, removing configuration
cannot open mixer: No such file or directory

I've tried looking at a few posts, but none of them seem to have my particular issue. I believe it has something to do with permissions. After running ls -l /etc/alsa/conf.d/10-samplerate.conf, I get the following output:

lrwxrwxrwx 1 root root 46 May 13 04:16 /etc/alsa/conf.d/10-samplerate.conf -> /usr/share/alsa/alsa.conf.d/10-samplerate.conf

I am wondering if I have to change the permissions on this file, but am unsure of what I should change them to (and last time I messed around with permissions without knowing what to set it to, I REEEEEALLY messed things up).

I've tried reinstalling alsa-utils; I've also tried reinstalling base and linux-firmware.

Another possible fix I've tried is running alsactl store. This had an identical output to alsamixer.

I should also note that I previously had ALSA working.

Does anyone have any ideas of what I should do? I would greatly appreciate any help.

Thank you.

Last edited by ErdosOrGauss (2020-10-14 17:35:16)

Offline

#2 2020-10-09 01:51:09

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

/usr/share/alsa/alsa.conf.d/10-samplerate.conf comes with alsa-plugins package
pls check you have all thses package installed. reinstall if needed.
alsa-lib
alsa-plugins
alsa-topology-conf
alsa-ucm-conf
alsa-utils

man alsactl
init tries to initialize all devices to a default state.
store saves the current driver state for the selected soundcard to the configuration file.
# alsactl init
$ alsamixer
# alsactl store

Last edited by solskog (2020-10-09 02:20:09)

Offline

#3 2020-10-09 02:15:51

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

Thank you! I have all of the packages you've referenced. I uninstalled and reinstalled them, just to be safe.

So, now when running alsactl store, I get the following output:

 alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists

Last edited by ErdosOrGauss (2020-10-09 02:16:06)

Offline

#4 2020-10-09 02:19:51

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

# pacman -Qkk alsa-utils

And do remove that symlink, an uninstall-reinstall should be enough.

# pacman -Rns alsa-utils
# pacman -S alsa-utils

Btw if you user it for controlling pulseaudio, it might be better to use tools intended for pulseaudio like pmixer and/or pulsemixer.

They work quite nice and allow more control of pulse-relevant options.
Idk what other archers have to say about that suggestion tho...soo feel free to experiment.

Post: and delete that lock file...


My reposSome snippets

Heisenberg might have been here.

Offline

#5 2020-10-09 02:29:48

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

stkts wrote:

alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists

run as root or use sudo

# alsactl init
# alsactl store

Offline

#6 2020-10-09 02:54:11

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

GaKu999 wrote:

And do remove that symlink, an uninstall-reinstall should be enough.
# pacman -Rns alsa-utils
# pacman -S alsa-utils

I did as you asked and now I get a new error when running the command alsamixer:

ALSA lib conf.c:4131:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib control.c:1379:(snd_ctl_open_noupdate) Invalid CTL default
cannot open mixer: No such file or directory

Do you have any ideas?

GaKu999 wrote:

Btw if you user it for controlling pulseaudio, it might be better to use tools intended for pulseaudio like pmixer and/or pulsemixer.

I am not. I'm just trying to get my standard sound working.

GaKu999 wrote:

They work quite nice and allow more control of pulse-relevant options.
Idk what other archers have to say about that suggestion tho...soo feel free to experiment.

I will actually have to look into these! Thanks.


GaKu999 wrote:

Post: and delete that lock file...

I'm a little confused about what this means. The output does say there is a file with a lock status, but there isn't an actual lock file. I went looking for /var/lib/alsa/asound.state but it actually isn't there.

-------------------

solskog wrote:
alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists

run as root or use sudo

I did this and still received the same error mentioned above.

Offline

#7 2020-10-09 02:59:21

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

I haven't seen yet the output of:

# pacman -Qkk alsa-utils

I can’t make further assumptions...

Is your system up to date?
No partial upgrades right?
And you are not using the testing repos?


My reposSome snippets

Heisenberg might have been here.

Offline

#8 2020-10-09 03:04:27

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

GaKu999 wrote:

I haven't seen yet the output of:

 pacman -Qkk alsa-utils

Sorry, I totally forgot to put that there. Here is the output.

alsa-utils: 97 total files, 0 altered files
GaKu999 wrote:

Is your system up to date?

To my knowledge, yes. I pacman -Syu'd today.

GaKu999 wrote:

No partial upgrades right?

No, not that I'm aware of.

GaKu999 wrote:

And you are not using the testing repos?

Again, no, not that I'm aware of.

Offline

#9 2020-10-09 03:11:50

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

What a weird issue.

That all I can do for now, with a “smartphone” at least.

I’ll test later to see if I can replicate and “fix” whatever is happening to your system.

On the meantime, I suggest patience since others may be also clueless, do some tests, search online, or try solutions from other similar issues not older than 2 years just in case.
(Or older but they may be not valid anymore, even 2 years is a stretch)


My reposSome snippets

Heisenberg might have been here.

Offline

#10 2020-10-09 03:20:56

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

GaKu999 wrote:

What a weird issue.

That all I can do for now, with a “smartphone” at least.

I’ll test later to see if I can replicate and “fix” whatever is happening to your system.

On the meantime, I suggest patience since others may be also clueless, do some tests, search online, or try solutions from other similar issues not older than 2 years just in case.
(Or older but they may be not valid anymore, even 2 years is a stretch)

Okay. This sounds good. Thank you!

Offline

#11 2020-10-09 05:12:19

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

ErdosOrGauss wrote:

ALSA lib conf.c:4131:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf

alsa.conf comes with alsa-lib package, which is a denpendency for many other packages. But you can force reinstall it:

# pacman --sync --clean --clean
# pacman --verbose --sync alsa-lib
ErdosOrGauss wrote:

alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists

If /var/lib/alsa/asound.state doesn't  exits, this command will create it.

# alsactl store

Last edited by solskog (2020-10-09 05:20:44)

Offline

#12 2020-10-11 01:51:04

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

I'm sorry for the delayed response. Life got too busy for Arch for a second.

--------------------------

# pacman --sync --clean --clean
# pacman --verbose --sync alsa-lib

So, I ran the code above to no avail. I still have the same error. I think it may be a permission error. What are the permissions on your /ect/alsa/conf.d/10-speexrate.conf?

I also tried running.

alsa store

I still receive the error.

Do you still have any ideas?

Offline

#13 2020-10-11 08:40:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,364

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

pacman -Qkk alsa-lib
sudo stat /usr/share/alsa/alsa.conf.d /usr/share/alsa/alsa.conf /usr/share/alsa /usr/share

In general pacman doesn't adjust file permissions, did your update command not warn you about mismatching permissions?

FWIW all the config files should be owned by root:root and have 644 perms and the directories 755.

Last edited by V1del (2020-10-11 09:32:25)

Online

#14 2020-10-11 09:23:54

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

OP's system is interesting. Even if a file permission been altered some how. The Root user should be able to change it.

Offline

#15 2020-10-13 21:46:01

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

First, thank you everyone for your help so far.
--------------------------------------------------------------

So, I ran the two commands suggested by V1del and received the following output:

pacman -Qkk alsa-lib gave:

alsa-lib: 155 total files, 0 altered files

sudo stat /usr/share/alsa/alsa.conf.d /usr/share/alsa/alsa.conf /usr/share/alsa /usr/share gave:

stat: cannot statx '/usr/share/alsa/alsa.conf.d': No such file or directory
  File: /usr/share/alsa/alsa.conf
  Size: 9876            Blocks: 24         IO Block: 4096   regular file
Device: 10305h/66309d   Inode: 135176      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-10-13 14:02:55.866013698 -0600
Modify: 2020-07-08 13:11:50.000000000 -0600
Change: 2020-10-10 19:47:53.254657729 -0600
 Birth: 2020-10-10 19:47:53.254657729 -0600
  File: /usr/share/alsa
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 10305h/66309d   Inode: 134929      Links: 9
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-10-10 19:47:53.217995511 -0600
Modify: 2020-10-10 19:47:53.254657729 -0600
Change: 2020-10-10 19:47:53.254657729 -0600
 Birth: 2020-10-07 13:56:43.970887688 -0600
File: /usr/share
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 10305h/66309d   Inode: 917507      Links: 141
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-10-10 19:47:53.217995511 -0600
Modify: 2020-10-08 19:39:21.552564180 -0600
Change: 2020-10-08 19:39:21.552564180 -0600
 Birth: 2020-10-07 13:49:05.976692288 -0600

-------------------------------------

solskog wrote:

Even if a file permission been altered some how. The Root user should be able to change it.

You're absolutely right. I still can. I just wasn't sure what to change it all to.
-----------------

What V1del said helped some. I did find something weird when I went back to look at /etc/alsa/conf.d. Well, I'm not sure it's weird, but I thought knowing about it may help. I found that all of the .conf files contained within were symlinks AND I also found that their permissions were set to 777. I poked around in other directories and this seems to be the only one that's different. I then went to change the permissions, but you can't on a symlink (something I'd totally forgotten). So, my question, then, is should all of the files contained in /etc/alsa/conf.d be symlinks? Should I simply remove them and try reinstalling alsa?

Last edited by ErdosOrGauss (2020-10-13 21:48:44)

Offline

#16 2020-10-14 01:38:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,364

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

Does look fine, let's check what alsamixer is actually doing

strace alsamixer

going to be a lot of output but should give better pointers to where it goes wrong and why.

Edit: Whoops I totally missed this yes that directory should not be empty/not exist, most of the contents there come from alsa-plugins.

... Do you have that directory in a NoExtract= pacman directive for some reason? Because I'd expect the pacman checks to show missing files, but I guess we didn't yet explicitly look at alsa-plugins

Last edited by V1del (2020-10-14 07:10:26)

Online

#17 2020-10-14 06:00:25

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

ErdosOrGauss wrote:

stat: cannot statx '/usr/share/alsa/alsa.conf.d': No such file or directory

you are still missing alsa-plugins package.

Last edited by solskog (2020-10-14 07:20:56)

Offline

#18 2020-10-14 17:33:58

ErdosOrGauss
Member
Registered: 2017-06-21
Posts: 40

Re: [SOLVED] ALSA issues after rsync restoration/reinstallation

[SOLUTION]
-------------------------------------------
First, thank you so much to everyone who helped me. I learned a lot through the process!!!
-------------------------------------------
Specifically, I figured it out thanks to everyone's help. I will say I am really embarrassed. The error was as solskog stated: apparently I didn't have alsa-plugins installed. Specifically, the package wouldn't update because the files already existed (most likely from my rsync restoration). Here's what I did, specifically.

I tried installing alsa-plugins. However, it did not work. This was flagged by pacman saying the files contained within conf.d existed. This, then, prompted me to use

pacman -Qo /etc/alsa/conf.d

This is where I learned the files were not owned by any package. Hence, I needed to delete the files and try reinstalling alsa-plugins. After doing so, I tried running alsamixer to see if it worked, and it did.

Thank you so much, again!!!!

Last edited by ErdosOrGauss (2020-10-14 22:28:56)

Offline

Board footer

Powered by FluxBB