You are not logged in.

#1 2021-07-29 06:02:49

garrhow
Member
From: Memphis, Tennessee
Registered: 2021-06-01
Posts: 4
Website

[SOLVED] ALSA utilities do not work properly if not running as su

My ALSA has been running up until recently, I accidentally deleted my ~/.asoundrc file and have no way of getting it back. When I try to run any ALSA utilities like aplay and arecord, they don't work correctly unless run as superuser. Software that relies on ALSA does not recognize any audio inputs/outputs.

[garrett@zeb ~] aplay -l
**** List of PLAYBACK Hardware Devices ****
ALSA lib control.c:1481:(snd_ctl_open_noupdate) Invalid CTL hw:0
aplay: device_list:283: control open (0): No such file or directory
ALSA lib control.c:1481:(snd_ctl_open_noupdate) Invalid CTL hw:1
aplay: device_list:283: control open (1): No such file or directory
ALSA lib control.c:1481:(snd_ctl_open_noupdate) Invalid CTL hw:2
aplay: device_list:283: control open (2): No such file or directory
ALSA lib control.c:1481:(snd_ctl_open_noupdate) Invalid CTL hw:3
aplay: device_list:283: control open (3): No such file or directory
ALSA lib control.c:1481:(snd_ctl_open_noupdate) Invalid CTL hw:4
aplay: device_list:283: control open (4): No such file or directory
ALSA lib control.c:1481:(snd_ctl_open_noupdate) Invalid CTL hw:5
aplay: device_list:283: control open (5): No such file or directory
[root@zeb ~] aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC1220 Digital [ALC1220 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I'll try and provide as much information as needed to help with solving the issue!!

Last edited by garrhow (2021-07-30 05:46:48)

Offline

#2 2021-07-29 06:43:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,951

Re: [SOLVED] ALSA utilities do not work properly if not running as su

You probably still have some invalid .asoundrc or asound.conf in your home dir.

Install strace, post the output of

strace aplay -l

Offline

#3 2021-07-29 06:58:39

garrhow
Member
From: Memphis, Tennessee
Registered: 2021-06-01
Posts: 4
Website

Re: [SOLVED] ALSA utilities do not work properly if not running as su

V1del wrote:

You probably still have some invalid .asoundrc or asound.conf in your home dir.

Install strace, post the output of

strace aplay -l

Here's the strace output
https://www.mersh.com/shared/strace_output.html

Offline

#4 2021-07-29 07:04:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,951

Re: [SOLVED] ALSA utilities do not work properly if not running as su

/home/garrett/.config/alsa/asoundrc - what's in that file, and you probably want to get rid of that file.

Where is it from? That path reads like some LARBs config in which case you should be weary of randomly running personalized setup scripts that will completely fuck up your home dir preferences if your setup doesn't exactly match his.

Offline

#5 2021-07-29 07:07:23

garrhow
Member
From: Memphis, Tennessee
Registered: 2021-06-01
Posts: 4
Website

Re: [SOLVED] ALSA utilities do not work properly if not running as su

V1del wrote:

/home/garrett/.config/alsa/asoundrc - what's in that file, and you probably want to get rid of that file.

Where is it from? That path reads like some LARBs config in which case you should be weary of randomly running personalized setup scripts that will completely fuck up your home dir preferences if your setup doesn't exactly match his.

I'm aware of LARBS and I don't use it. I just prefer to have a clean home directory, so I put config files in ~/.config.

This is the content of ~/.config/alsa/asoundrc. I think it's something PipeWire did at some point. I don't use PipeWire anymore though.

pcm.!default {
    type plug;
    slave { pcm "pulse"; }
}

pcm.pulse {
    type pulse;
}

ctl.mixer0 {
    type hw;
    card 0;
}

Offline

#6 2021-07-29 07:09:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,951

Re: [SOLVED] ALSA utilities do not work properly if not running as su

No normal tool will create that file, and as it stands it doesn't make sense, remove it and just install pulseaudio-alsa which will setup a correct default configuration in /etc/alsa/conf.d/99-pulseaudio-default.conf

And more importantly, remove the environment variable bending ALSA's config lookup to that path, as the actual real main issue here is that it doesn't look up the default configurations in /usr/share/alsa/alsa.conf anymore

Last edited by V1del (2021-07-29 07:17:56)

Offline

#7 2021-07-29 07:15:19

garrhow
Member
From: Memphis, Tennessee
Registered: 2021-06-01
Posts: 4
Website

Re: [SOLVED] ALSA utilities do not work properly if not running as su

V1del wrote:

No normal tool will create that file, and as it stands it doesn't make sense, remove it and just install pulseaudio-alsa which will setup a correct default configuration in /etc/alsa/conf.d/99-pulseaudio-default.conf

I installed pulseaudio and pulseaudio-alsa, and cleared the ALSA_CONFIG_PATH environment variable and it fixed the issue! Thank you!

Offline

#8 2021-07-29 12:01:59

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,646

Re: [SOLVED] ALSA utilities do not work properly if not running as su

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB