Sound okay under root permissions, but not under user

I can execute the following command under root:

% speaker-test -Dplug:front -c2 -l3 -twav

speaker-test 1.0.23

Playback device is plug:front
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 87381
Period size range from 48 to 43690
Using max buffer size 87380
Periods = 4
was set period_size = 21845
was set buffer_size = 87380
0 - Front Left
1 - Front Right
Time per period = 1.383945

and get great sound from my Bose USB Companion 5 sound system. It is a rather neat test of a woman’s voice calling out the correct front speaker locations, left or right.

However when I go back to regular user permissions, the following happens:

speaker-test -Dplug:front -c2 -l3 -twav

speaker-test 1.0.23

Playback device is plug:front
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
Playback open error: -2,No such file or directory

and this error repeats many times with no sound, of course.

Has anyone seen this error? Is this a permissions problem? I added the “audio” group to my permissions, perhaps I need to add another group? I also added “pulse” and “pulse-access”, but none of this had made any difference.

I would guess that I am being blocked from access to the sound system???

(in this case, puzzled penguin is right, and no, I didn’t put the frowning icon, I just cut and pasted right from the command line)

I’ve seen this happen when a proprietary graphic driver is installed that interfers with audio permissions. Typically adding your user to group ‘audio’ fixes the problem. But note you must log out of Linux (not just the desktop) and log back in for the permissions change (from adding the user to group ‘audio’) to have an effect. I recommend a simple restart to achieve this (its easier to describe).

And you need to do a proper test after having done this to ensure sound indeed functions or does not function. It could be you have more than one audio problem.

What oldcpu said.

Also normally when you are logged in to a GUI desktop, you get permissions on audio. However if you are running from the CLI, you will not. Also from cron jobs. E.g. I run some scheduled recording cron jobs so I put myself in group audio.

I can indeed play sound using the test file now under user privileges, but the sound players (Amarok) are not working. Now I guess I will have to troubleshoot that.

just removed the onboard sound controller from being configured by Yast, and now sound is back. Someone else posted that the USB sound card has to appear in the default position 0, and apparently that is true.