LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-14-2004, 07:51 PM   #1
DiscoGranny
LQ Newbie
 
Registered: Jun 2004
Posts: 12

Rep: Reputation: 0
Sound only works as root in Slackware


Ok this has been driving me nuts for the past couple of days...

I am running Slackware 9.1 with a Soundblaster Live! sound card using the ALSA sound drivers. As root, everything works like a Georgia peach: smooth. However, as a regular user, xmms gives me this message:

Couldn't open audio

Please check that:

1. You have the correct plugin selected
2. No other programs is blocking the soundcard
3. Your soundcard is configured properly

Now after checking online, I read that the problem lay in the permissions set in /etc/group. So like a good newb, I go into /etc/group and adjust the permissions. Here is my current /etc/group:


Quote:
root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin,adm,users,dgranny
adm::4:root,adm,daemon
tty::5:
disk::6:root,adm,users,dgranny
lp::7:lp
mem::8:
kmem::9:
wheel::10:root
floppy::11:root
mail::12:mail
news::13:news
uucp::14:uucp
man::15:
games::20:
slocate::21:
utmp::22:
smmsp::25:smmsp
mysql::27:
rpc::32:
sshd::33:sshd
gdm::42:
shadow::43:
ftp::50:
nobody::98:nobody
nogroup::99:
users::100:dgranny
console::101:
audio:x:102:
After logging out and back in again, nothing changed. I then read that that /dev/dsp* and /dev/mixer either needed to have permissions tweaked. So I went back and chmod both of these first to 622 and 666 as the xmms website claimed and then to 777 after being frustrated (I know the security is dreadful, but I was just trying a hack). I have googled extensivel and can not find a solution that will work and none of the solutions I have tried seem to help.

Any suggestions?
 
Old 06-14-2004, 08:07 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Try running alsamixer as a user, and not as root. Issue
bash-2.05b$ alsamixer
and unmute and turn up your volume.
Then, as root, issue
bash-2.05b# alsactl store
which will save your settings after a reboot.
 
Old 06-14-2004, 08:19 PM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
need to add yourself to group audio

audio:x:102:
 
Old 06-14-2004, 08:27 PM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Quote:
Originally posted by foo_bar_foo
need to add yourself to group audio

audio:x:102:
I never had to do that in Slack 9.1
Code:
bash-2.05b$ cat /etc/group
root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin,adm
adm::4:root,adm,daemon
tty::5:
disk::6:root,adm
lp::7:lp
mem::8:
kmem::9:
wheel::10:root
floppy::11:root
mail::12:mail
news::13:news
uucp::14:uucp
man::15:
games::20:
slocate::21:
utmp::22:
smmsp::25:smmsp
mysql::27:
rpc::32:
sshd::33:sshd
gdm::42:
shadow::43:
ftp::50:
pop::90:pop
nobody::98:nobody
nogroup::99:
users::100:
console::101:
What's the Granny done to cause that?
 
Old 06-14-2004, 08:31 PM   #5
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
Also, I notice /dev/snd/control* are chmod 666; check that directory for permissions (the rest were chmod 662).
 
Old 06-14-2004, 08:48 PM   #6
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Never heard of such. Slack has this setup for root and users from the install,
unless you change something. The instructions at ALSA's site don't tell you
to logout from root to user before running alsamixer, and that's probably the
only problem you got. If you got to jump through those hoops with Slack 9.1,
then you guys have screwed something up on your own. ;-)
 
Old 06-14-2004, 08:55 PM   #7
DiscoGranny
LQ Newbie
 
Registered: Jun 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Chinaman I looked at alsamixer as user and it was all fine; no problem here.

[B]foo_bar_foo[B/] I changed audio so that it included adm,root,users,dgranny. but it didn't change anything

Tuttle I just checked /dev/snd/control* and it is 666 and the rest is 662

When I run xmms, I get this error: ** WARNING **: oss_open(): Failed to open audio device (/dev/cdrom): Read-only file system

This is really odd, especially since I can mount /dev/cdrom as a user and I'm trying to play an mp3 on my harddisk.
 
Old 06-14-2004, 08:58 PM   #8
DiscoGranny
LQ Newbie
 
Registered: Jun 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Ok, I just found the problem. In XMMS I was using the OSS Driver 1.2.8 as the output plugin. Under root it worked fine, but not as a user. But when I switched it to the ALSA 1.2.8 output plugin, it now works as root and user. I wonder why it worked one way but not the other...

Anyways, thanks for all the suggestions. Another case closed.
 
Old 06-14-2004, 08:59 PM   #9
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
party on, imoff to bed (3am)
 
Old 06-14-2004, 09:11 PM   #10
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Quote:
Originally posted by DiscoGranny
Ok, I just found the problem. In XMMS I was using the OSS Driver 1.2.8 as the output plugin. Under root it worked fine, but not as a user. But when I switched it to the ALSA 1.2.8 output plugin, it now works as root and user. I wonder why it worked one way but not the other...

Anyways, thanks for all the suggestions. Another case closed. :)
Good question about the plugin. I'm playing a mp3 on my hd right now as user with the OSS plugin.
Glad you got tunes...shouldn't be so difficult. I'm using an Audigy, but all the Creative Labs cards
use the same module. You got this?
Code:
bash-2.05b# lsmod
Module                  Size  Used by    Tainted: P  
snd-pcm-oss            37864   1 
snd-mixer-oss          12728   0  [snd-pcm-oss]
snd-emu10k1            63000   1 
snd-pcm                56384   0  [snd-pcm-oss snd-emu10k1]
snd-timer              13636   0  [snd-pcm]
snd-hwdep               4864   0  [snd-emu10k1]
snd-page-alloc          6264   0  [snd-emu10k1 snd-pcm]
snd-util-mem            1136   0  [snd-emu10k1]
snd-ac97-codec         49404   0  [snd-emu10k1]
snd-rawmidi            12704   0  [snd-emu10k1]
snd-seq-device          3904   0  [snd-emu10k1 snd-rawmidi]
snd                    30820   0  [snd-pcm-oss snd-mixer-oss snd-emu10k1 snd-pcm snd-timer snd-hwdep snd-util-mem snd-ac97-codec snd-rawmidi snd-seq-device]
soundcore               3332   8  [snd]
emu10k1-gp              1352   0  (unused)
gameport                1436   0  [emu10k1-gp]
Could still be that user needs to run alsamixer and unmute and turn up the volumes. ;-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound just works under root account thorax Linux - General 5 06-08-2004 02:20 PM
Sound only works as root spiezer Linux - Newbie 2 05-16-2004 05:36 PM
sound works in root - no sound in user - Debian seanb Debian 9 02-28-2004 12:42 AM
sound works with root not user shanenin Linux - Software 3 10-29-2003 06:05 PM
sound only works as root matt_w_lambert Linux - General 4 05-03-2003 11:58 PM


All times are GMT -5. The time now is 08:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration