LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 04-28-2009, 11:24 PM   #1
mcody
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Rep: Reputation: 0
Slackware 12.2: Alsa sound works for root but not for user.


Greetings,

I am about to pull my hair out of my head with getting sound to work in my user account. It works fine in the root account, though. I just installed Slackware 12.2 (kernel 2.6.27.7-smp) on an ECS K7VTA3 v8.0 with an AMD Athlon(tm) XP 2700+ processor. Previously, I was running Slackware 10.2 with the stock 2.4 kernel. Alsa sound worked perfectly with the VIA VT82xx Audio Controller module (snd-via82xx). All I had to do then was change some permissions on some device files (/dev/audio*, /dev/dsp*, /dev/mixer*, etc) and sound just worked.

Now that I have installed Slackware 12.2, I have tried everything to get it to work in my user account with (almost) no success (It did work briefly once by running alsaconf in a Konsole after running "su"). I'm running KDE 3.5 and checked to make sure that the sound system is turned on. It certainly works under root in any case. I made sure that my user account shows up in the appropriate groups. The groups command yields the list "users floppy audio video cdrom plugdev". I checked to make sure that the appropriate audio outputs are unmuted and at the proper levels, using the alsamixer.

I, frankly, don't know what to do with the devices created by udev. I do note that /dev/adsp, /dev/audio, /dev/dsp, /dev/mixer, and the files in /dev/snd all belong to the audio group. With my user account belonging to the audio group, I should be able to control them, right?

I have checked that /etc/rc.d/rc.alsa is readable and executable by my user account. I have verified that the appropriate modules are loaded. This is how they appear when logged in as root as well as in my user account.

snd_seq_dummy 6788 0
snd_seq_oss 33408 0
snd_seq_midi_event 10240 1 snd_seq_oss
snd_seq 50928 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_pcm_oss 40480 0
snd_mixer_oss 17920 1 snd_pcm_oss
snd_via82xx 27160 2
gameport 14220 1 snd_via82xx
snd_ac97_codec 101412 1 snd_via82xx
ac97_bus 5632 1 snd_ac97_codec
snd_pcm 70788 4 snd_pcm_oss,snd_via82xx,snd_ac97_codec
snd_timer 23176 2 snd_seq,snd_pcm
snd_page_alloc 11400 2 snd_via82xx,snd_pcm
snd_mpu401_uart 10624 1 snd_via82xx
snd_rawmidi 22688 1 snd_mpu401_uart
snd_seq_device 10380 4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi
snd 51748 14 snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_via82xx,snd_ac97_codec,snd_pcm,snd_timer,snd_mpu40 1_uart,snd_rawmidi,snd_seq_device
soundcore 10080 1 snd

As mentioned before, sound works in the root account but not in my user account.

Does anyone have any idea what I may be missing? I would appreciate any help. I have done extensive Google searches and read many threads, how-tos, and documents on udev without finding a useful solution. Posting here is my last resort.

As a final comment, I have always been annoyed that Slackware has always required tweaking with device files to get sound to work. I know that it is difficult to try to support all of the sound cards that are out there. At least by the time I was using Slackware 10.2, it became pretty routine what needed to be done. With the advent of udev, getting sound to work has become a great mystery again. The fact that I can get working sound as root seems to indicate that the solution is simple, but well hidden.

Thanks,

Mac
 
Old 04-29-2009, 05:58 AM   #2
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,281

Rep: Reputation: 61
Sounds like it must be a permission problem somewhere if it works fine for root but not the normal user and you have added to the right groups. What are the permission settings for the /dev directory eg. 755 744.

Last edited by fotoguy; 04-29-2009 at 06:04 AM.
 
Old 04-29-2009, 06:10 AM   #3
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
If you modify the groups for the user then have to log out and back in before they take effect.

Really it should be enough that they belong to the audio group and run alsamixer as the user to be sure that nothing is muted.

Last edited by mRgOBLIN; 04-29-2009 at 06:13 AM.
 
Old 04-29-2009, 08:55 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,451
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Hi,
Quote:
Originally Posted by mcody View Post
<snip>
As a final comment, I have always been annoyed that Slackware has always required tweaking with device files to get sound to work. I know that it is difficult to try to support all of the sound cards that are out there. At least by the time I was using Slackware 10.2, it became pretty routine what needed to be done. With the advent of udev, getting sound to work has become a great mystery again. The fact that I can get working sound as root seems to indicate that the solution is simple, but well hidden.

Thanks,

Mac
No mysteries, just do a search as this has been covered a lot here on LQ.

When you setup the sound as 'root' be sure to save your settings for the alsamixer with the command 'alsactl store'.

Read the 'man alsactl'. You could read the other 'man commands' related to 'alsa' online; alsamixer, alsaconf, alsactl.

BTW, you could read your 'man command' locally.
 
Old 04-29-2009, 10:22 PM   #5
mcody
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
@ fotoguy
The permissions on the /dev directory are 755.

@ mRgOBLIN
I have logged out and rebooted several times since placing my user account in to the groups I listed.

@ onebuck
Quote:
Originally Posted by onebuck
No mysteries, just do a search as this has been covered a lot here on LQ.
I have searched LinuxQuestions and other sites for answers to my problems. I would not post a request for help without doing some research first.

Quote:
Originally Posted by onebuck
When you setup the sound as 'root' be sure to save your settings for the alsamixer with the command 'alsactl store'.
I have done this from root and see the same settings in alsamixer from my user account. Still, I have no sound in my user account.

Quote:
Originally Posted by onebuck
Read the 'man alsactl'. You could read the other 'man commands' related to 'alsa' online; alsamixer, alsaconf, alsactl.
I have read these three man pages and programs without solving the problem. As I mentioned in my post:
Quote:
Originally Posted by mcody
I have done extensive Google searches and read many threads, how-tos, and documents on udev without finding a useful solution. Posting here is my last resort.
Okay, I failed to specifically mention the man pages.

Quote:
Originally Posted by onebuck
BTW, you could read your 'man command' locally.
I've been using Linux for fifteen years. Most of those with various Slackware distributions. I know how to use the man pages.
 
Old 04-30-2009, 03:59 AM   #6
samac
Senior Member
 
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Linux Mint 17.1
Posts: 1,424

Rep: Reputation: 137Reputation: 137
This may be a long shot, but kde sometimes causes problems with sound. Check the sound setting in your USERS control centre. I found once that the sound system was not enabled even though sound worked for root. I have also found that restarting /etc/rc.d/rc.alsa sometimes works, or as a last resort re-installing alsa, can sometimes help.

samac
 
Old 04-30-2009, 06:02 AM   #7
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,281

Rep: Reputation: 61
Quote:
@ fotoguy
The permissions on the /dev directory are 755.
Ok looks like the permissions on the /dev directory are correct. Maybe one thing you could try is to add your user to all the groups through kuser, then try playing a file through a media player like xine, if you get no error, then you know it has to do with permissions of the groups. Then you could remove the user from one group at a time then play a file and see if the error returns, when it does then you've at least narrowed it down to the group responsible.
 
Old 04-30-2009, 08:15 AM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,451
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Hi,
Quote:
Originally Posted by mcody View Post
<snip>

I have read these three man pages and programs without solving the problem. As I mentioned in my post:

Okay, I failed to specifically mention the man pages.

I've been using Linux for fifteen years. Most of those with various Slackware distributions. I know how to use the man pages.
Forgive me for attempting to lead you to possible answers. No where in your post(s) or sig do we see your 15 one year experiences.

Great that you know how to utilize the 'man command'. As a respondent I can't possibly know the level of experience a poster has. Sometimes we do see some experience via the type of post along with the information but we do try to assist everyone. If I stepped on your ego instead of your toe then 'sorry'.

Please remember that the post(s) and thread do benefit everyone, not just the OP. I look to provide detail along with the possible solution. In the future you could use the the next links to aid everyone;
 
Old 04-30-2009, 12:17 PM   #9
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 13.37, 14.0
Posts: 396

Rep: Reputation: 49
Maybe this experience won't help you... but I once had the same problem.
I was unable to get up my sound in user accounts, but when I started KDE as root it worked.
This time I tried to set up my default runlevel to 4, to boot it right into the X11.
When I set it back to 3, and after regular command prompt login I started KDE with startx... it worked.

If it's not usable for you, please ignore it ...
 
Old 05-01-2009, 12:18 AM   #10
mcody
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
First off, thanks to all for the replies.

Quote:
Originally Posted by samac
This may be a long shot, but kde sometimes causes problems with sound. Check the sound setting in your USERS control centre. I found once that the sound system was not enabled even though sound worked for root. I have also found that restarting /etc/rc.d/rc.alsa sometimes works, or as a last resort re-installing alsa, can sometimes help.
I checked and adjusted the control center settings with no effect. I also tried restarting /etc/rc.d/rc.alsa with no effect. Lastly I uninstalled and reinstalled the Alsa packages, as well as the Simple Media Library and Libao. This didn't help either.

Quote:
Originally Posted by fotoguy
Ok looks like the permissions on the /dev directory are correct. Maybe one thing you could try is to add your user to all the groups through kuser, then try playing a file through a media player like xine, if you get no error, then you know it has to do with permissions of the groups. Then you could remove the user from one group at a time then play a file and see if the error returns, when it does then you've at least narrowed it down to the group responsible.
I tried playing an MP3 using Xine. Xine acted like it was playing the music, but there was no sound. I decided to take a "middle ground" approach, so I used kuser to add my user account to all the groups that root belongs to. I logged out and logged back in and verified that my user account was in all of those groups. Still no sound.

@onebuck
Hey, no bruised ego or toes here. Guess that's why I had a smiley face at the end of my comment. True, I could have mentioned my level of experience and I should have. I wan't thinking of a wider audience for this thread. I felt silly that I had forgotten to mention that I had looked at the man pages. That is why the emoticon was rolling its eyes, as in "oops!". I really do appreciate the help.

Quote:
Originally Posted by hua
Maybe this experience won't help you... but I once had the same problem. I was unable to get up my sound in user accounts, but when I started KDE as root it worked. This time I tried to set up my default runlevel to 4, to boot it right into the X11. When I set it back to 3, and after regular command prompt login I started KDE with startx... it worked.

If it's not usable for you, please ignore it ...
I thought it was a reasonable idea, so I gave it a shot. Alas, it did not work either.

Mac
 
Old 05-01-2009, 01:29 AM   #11
mcody
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Okay. Sound is working now. Here's how!

I found that with the VIA 8235 audio device, alsamixer and Kmix display four slider entries labeled "VIA DXS". The leftmost slider with this name appears to affect the volume for KDE sound events. The second slider controls audio volume for web-browser-based audio (e.g. YouTube, Vimeo). The third from left controls audio volume for music player apps (e.g. xine). I don't know what audio the forth slider controls, but I set its level up to maximum, like the others.

I only discovered this when I had my head close to the monitors speakers. I could faintly hear sound. I had un-muted everything, including the inputs (or what I thought were inputs) This caused me to revisit the controls on Kmix and start playing with all of the control settings.

The question now is why, when running under root, is the settings of these "VIA DXS" sliders ignored? I have no idea why.

All I have to take care of now is some crackling in the audio. I know that can probably be taken care of by an option setting of the snd_via82xx module.

Once again, thanks for all the help.

Last edited by mcody; 05-01-2009 at 01:48 AM.
 
Old 05-01-2009, 03:07 AM   #12
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,281

Rep: Reputation: 61
Good to hear some progress has been made

Quote:
All I have to take care of now is some crackling in the audio. I know that can probably be taken care of by an option setting of the snd_via82xx module.
Sometimes turning of one of the settings in kmix may help, I had some crackling coming through my sound and it was the front microphone being on that was the cause, once I turned it off, all was fine.
 
Old 05-01-2009, 12:16 PM   #13
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
This could be eerily similar to a problem I reported here (problem number 2).

I had sound in KDE as normal user but not as root.

I posted my solution later in the same thread here.

Basically, I deleted $HOME/.kde/share/config/kmixctrlrc.

A side note: Start the system in run level 3. Login as normal user. Use the aplay command to test a wave file. If you get sound then the problem likely is KDE, likely the kmix settings. If no sound from aplay, then there has to be something more fundamental.
 
Old 05-02-2009, 02:12 PM   #14
mcody
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
@ fotoguy
Quote:
Originally Posted by fotoguy
Good to hear some progress has been made
...
Sometimes turning of one of the settings in kmix may help, I had some crackling coming through my sound and it was the front microphone being on that was the cause, once I turned it off, all was fine.
I tried your suggestion, but that didn't help. Some further research pointed to settings of the VIA 8233 Alsa driver. The Via8233 page on the Unofficial ALSA Wiki is very helpful in this regard.

@ Woodsman
Quote:
Originally Posted by Woodsman
This could be eerily similar to a problem I reported here (problem number 2).

I had sound in KDE as normal user but not as root.

I posted my solution later in the same thread here.

Basically, I deleted $HOME/.kde/share/config/kmixctrlrc.

A side note: Start the system in run level 3. Login as normal user. Use the aplay command to test a wave file. If you get sound then the problem likely is KDE, likely the kmix settings. If no sound from aplay, then there has to be something more fundamental.
Your problem is similar, but not that similar. I got sound as root, but not as the user. See my earlier post for an explanation of my solution. If I had looked at the VIA 8233 Alsa driver page, mentioned above, I probably would have solved the problem sooner. The VIA 8233 drive has changed a lot more than I would have expected since I installed it with Slackware 10.2 (three years ago).
 
Old 09-05-2009, 03:42 PM   #15
oot
Member
 
Registered: Dec 2002
Distribution: Slackware 12.0
Posts: 240

Rep: Reputation: 30
It is a permissions thing. Had me tearing my hair out for a while too, but I finally found it - cd into /dev/snd and do "chmod a+rw *".
 
  


Reply

Tags
alsa, root, sound, user


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
Alsa + sound works on root, but not on users! r4f Linux - Software 2 04-02-2005 06:43 AM
Sound works as root but not as user? n0x Linux - Hardware 2 09-11-2004 08:27 AM
sound works in root - no sound in user - Debian seanb Debian 9 02-28-2004 01:42 AM
ALSA prob: works fine as root but only partially as nonroot user. Choey Slackware 2 11-01-2003 03:17 PM
sound works with root not user shanenin Linux - Software 3 10-29-2003 07:05 PM


All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement
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