View previous topic :: View next topic |
Author |
Message |
Moriah Advocate
Joined: 27 Mar 2004 Posts: 2381 Location: Kentucky
|
Posted: Sun Mar 31, 2024 7:52 pm Post subject: alsa not working properly - SOLVED |
|
|
I have just rebuilt the software on my laptop. I started with a brand new blank SSD and went thru the installation procedure outlined in the handbook, including building a 6.6.13-gentoo kernel. This was followed by copying all my data files from my backup server onto the new laptop system SSD.
I now have everything working except for my sound. I had been using alsamixer as my sound control panel, mostly just as a volume control. I run it in a xterm. After emerging alsamixer, I am able to run it as root, but not as a user. Seems the perms on my sound device are not allowing write to a general user. My suspicion is that I need to make my username belong to some groupt to allow me to access the sound hardware.
But even when I run alsamixer successfully as root, I cnnot get mpg123 to play a *.mpg sound track. I even tried running mpg123 as root, and it still won't work.
Here is the sound hardware:
Code: |
onesimus ~ # ls -l /dev/audio1
crw-rw-r-- 1 root audio 14, 20 Mar 30 19:47 /dev/audio1
onesimus ~ #
|
Here is what I get running mpg123 as my normal username:
Code: |
rj@onesimus ~/KJV $ mpg123 19Psa150.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.32.3; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
Terminal control enabled, press 'h' for listing of keys and functions.
Playing MPEG stream 1 of 1: 19Psa150.mp3 ...
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:1342:(snd_func_refer) error evaluating name
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/pcm/pcm.c:2675:(snd_pcm_open_noupdate) Unknown PCM default
[src/libout123/modules/sdl.c:open_sdl():122] error: Couldn't open SDL audio: ALSA: Couldn't open audio device: No such file or directory
main: [/var/tmp/portage/media-sound/mpg123-base-1.32.3/work/mpg123-1.32.3/src/mpg123.c:check_fatal_output():337] error: out123 error 7: failed to open device
rj@onesimus ~/KJV $
|
And here is running as root:
Code: |
onesimus /home/rj/KJV # mpg123 19Psa150.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.32.3; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
Segmentation fault
onesimus /home/rj/KJV #
|
Any idea what I am doing wrong? This used to work fine before the software rebuild. Could I be missing a configuration file somewhare? If so, it should be on my backup server, so it is easy to copy it over. _________________ The MyWord KJV Bible tool is at http://www.elilabs.com/~myword
Foghorn Leghorn is a Warner Bros. cartoon character.
Last edited by Moriah on Sun Apr 14, 2024 1:21 pm; edited 1 time in total |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 447 Location: Naarm/Melbourne, Australia
|
Posted: Mon Apr 01, 2024 2:10 am Post subject: |
|
|
Did you have asoundrc files (`.asoundrc` or `asound.conf`) for your hardware? In general they're not necessarily needed, but might be required for some hardware or configurations, so perhaps check your backups for those? |
|
Back to top |
|
|
Moriah Advocate
Joined: 27 Mar 2004 Posts: 2381 Location: Kentucky
|
Posted: Tue Apr 02, 2024 5:51 pm Post subject: |
|
|
Thanks for the tip on /etc/asound.conf; that made a difference, but I still can't run audio as a normal user.
It is obviously some kind of filke permission problem in /dev because I can play mpg123 when I am root, but not when I am my normal user.
Here is what I get when I try to run mpg123 as a normal user:
Code: |
rj@onesimus ~/KJV $ mpg123 19Psa150.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.32.3; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
Terminal control enabled, press 'h' for listing of keys and functions.
Playing MPEG stream 1 of 1: 19Psa150.mp3 ...
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:855:(parse_card) cannot find card '1'
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:1342:(snd_func_refer) error evaluating name
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/pcm/pcm.c:2675:(snd_pcm_open_noupdate) Unknown PCM default
[src/libout123/modules/sdl.c:open_sdl():122] error: Couldn't open SDL audio: ALSA: Couldn't open audio device: No such file or directory
main: [/var/tmp/portage/media-sound/mpg123-base-1.32.3/work/mpg123-1.32.3/src/mpg123.c:check_fatal_output():337] error: out123 error 7: failed to open device
rj@onesimus ~/KJV $
|
and here is what I get when I try to run alsamixer as a notmal user:
Code: |
rj@onesimus ~/KJV $ alsamixer
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:855:(parse_card) cannot find card '1'
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:1342:(snd_func_refer) error evaluating name
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/control/control.c:1570:(snd_ctl_open_noupdate) Invalid CTL default
cannot open mixer: No such file or directory
rj@onesimus ~/KJV $
|
Since I only have one normal non-root user on this laptop, I would prefer not to have to use group permissions, but just allow any user to access the audio devices.
What devices do I need besides these:
Code: |
rj@onesimus ~/KJV $ ls -l /dev/aud* /dev/mixer*
crw-rw-rw- 1 root audio 14, 20 Mar 30 19:47 /dev/audio1
crw-rw-rw- 1 root audio 14, 0 Mar 30 19:47 /dev/mixer
crw-rw-rw- 1 root audio 14, 16 Mar 30 19:47 /dev/mixer1
crw-rw-rw- 1 root audio 14, 32 Mar 30 19:47 /dev/mixer2
rj@onesimus ~/KJV $
|
As you can see, I have already allowed any user to read and wite these devices. _________________ The MyWord KJV Bible tool is at http://www.elilabs.com/~myword
Foghorn Leghorn is a Warner Bros. cartoon character. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22634
|
Posted: Tue Apr 02, 2024 6:11 pm Post subject: |
|
|
I am not convinced that this is a permissions problem, since it references failure to find a resource, rather than a permissions error.
When you copied from backup, did you also copy over ~/.asoundrc? That file may not be correct for new hardware, and might be configuring ALSA not to work. If so, root would work, since it would look at /root/.asoundrc, and I am suggesting that only ~rj/.asoundrc exists and is bad. |
|
Back to top |
|
|
Moriah Advocate
Joined: 27 Mar 2004 Posts: 2381 Location: Kentucky
|
Posted: Tue Apr 02, 2024 7:11 pm Post subject: |
|
|
This is not new hardware; it is exactly the same hardware that used to work before the kernel upgrade. There is no .asoundrc and there is no backup of that file in my normal user account home directory. Neither is there any .asoundrc in /root. It started to work for playback with mpg123 for root when I copied /etc/asound.conf from backup.
So if it works for root, and nobody ever has any .asoundrc file, then all it knows is from /etc/asound.conf and my normal user would see that also.
Are there any other file, whether in /dev or elsewhere, that are needed to playback with mpg123 or to execute alsamixer? _________________ The MyWord KJV Bible tool is at http://www.elilabs.com/~myword
Foghorn Leghorn is a Warner Bros. cartoon character. |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 447 Location: Naarm/Melbourne, Australia
|
Posted: Wed Apr 03, 2024 12:47 am Post subject: |
|
|
Moriah wrote: | Are there any other file, whether in /dev or elsewhere, that are needed to playback with mpg123 or to execute alsamixer? |
i'm not familiar enough with mpg123 to know, but you could try running it with strace(1), e.g.:
Code: | $ strace -e open,openat /usr/bin/mpg123 19Psa150.mp3 2>&1 | less |
and examining what mpg123 is trying to open, and any related errors. |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2728 Location: Here and Away Again
|
Posted: Wed Apr 03, 2024 6:11 am Post subject: |
|
|
Moriah wrote: | It started to work for playback with mpg123 for root when I copied /etc/asound.conf from backup.
So if it works for root, and nobody ever has any .asoundrc file, then all it knows is from /etc/asound.conf and my normal user would see that also. |
Just to be sure, /can/ the normal user actually see and read it as well? _________________ Kindest of regardses. |
|
Back to top |
|
|
Moriah Advocate
Joined: 27 Mar 2004 Posts: 2381 Location: Kentucky
|
Posted: Wed Apr 03, 2024 6:44 pm Post subject: |
|
|
yes, my normal user can read /etc/asound.conf _________________ The MyWord KJV Bible tool is at http://www.elilabs.com/~myword
Foghorn Leghorn is a Warner Bros. cartoon character. |
|
Back to top |
|
|
Moriah Advocate
Joined: 27 Mar 2004 Posts: 2381 Location: Kentucky
|
Posted: Sun Apr 14, 2024 1:21 pm Post subject: |
|
|
Had to go out of town unexpectedly; sorry for the delay in posting, but:
THE PROBLEM IS SOLVED !!!
I had to put my username in the audio group in .etc/group; that's all it took. _________________ The MyWord KJV Bible tool is at http://www.elilabs.com/~myword
Foghorn Leghorn is a Warner Bros. cartoon character. |
|
Back to top |
|
|
|