LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   v9.1 Slackware: no sound for regular users? (https://www.linuxquestions.org/questions/slackware-14/v9-1-slackware-no-sound-for-regular-users-579841/)

Laurana 08-25-2007 08:00 PM

v9.1 Slackware: no sound for regular users? (sloved)
 
I am a Newbie user to Linux. I currently use version 9.1 Slackware.
I really do want Ubuntu, but my Dad insisted on this rocky start as I will be studying to become a computer scientist. Hey, even Einstein was a newb once. I have virtually no knowledge of programming, so If you know of a book that was helpful to you when you started out, I'd love to hear about it. But anyways, on to the problem:

>>Sound server informational message:
Error while initializing the sound driver:
device /dev/dsp can't be opened (Permission denied)
The sound server will continue, using the null output device.<<

Every time I enter the KDE desktop on my user account I get this error. Also, no sound comes through at all until I logout, go into root and type this command:
chmod 666 /dev/sound/*
Once I log back into my user account sound returns temporarily. However, Once I restart or shutdown the computer the error message comes back and the sound has once again disappeared.

What do you make of this?

Jeebizz 08-25-2007 08:48 PM

I don't remember 9.1. It has been a long time. I assume you already set the volume levels by using alsamixer, and then ran alsactl store as root. Also, perhaps adding your username to the audio section in the /etc/group files might work. I can't see why you would want to start with 9.1 though. A lot of things has changed since then. Version 12 is out now, and it now transitioned over completely to the 2.6 kernel series, and no longer uses 2.4.

Laurana 08-25-2007 09:12 PM

Actually, I didn't want to start with Slackware at all. My friends all gave Ubuntu high recommendations....But my Dad decided that Slackware was the way to go. So here I am.
Thanks for the suggestion. Does Slackware become ticked off with redundant commands? I don't know if alsamixer and alsactl were already input by my Dad, so I'll have to check in with him.

Honestly, I don't have a clue why he put such an old version on. Last I knew, all versions were/are free. D:

Jeebizz 08-25-2007 09:23 PM

Slackware can always be acquired for free. Anyways, I know I am biased, but its great your dad wants you to start off on Slackware. Normally when Slackware is installed, the volume levels are always set at zero, and so you must go in manually and set them through alsamixer, and then save the settings as root by typing alsactl store. I have also noticed in versions 11 and 12 that there is some slight glitch with the sound. Although whatever sound card you may have, and it is detected by the initial install of Slackware, there is no sound coming out, even after setting the volumes with alsamixer, but the way around this is to run alsaconf and have that program re-detect the soundcard, reset the volume levels, and all is well. I can't say why that is, but it just seems that way. I know I am not the only one who has experienced this, hopefully by the next release this will be resolved, but either way, thats sort of a heads up.

Also, if you yourself don't want to use Slackware that is also fine. Your dad might recommend Slackware, but if Ubuntu works for you, go for it, and just because you will use Ubuntu, doesn't mean that you might not find yourself having to use the command line every once in a while.

Furlinastis 08-25-2007 10:17 PM

http://www.linuxquestions.org/questi...84&postcount=3

That work?

Laurana 08-25-2007 10:24 PM

The command works until you shut your computer down. ^_^

Jeebizz 08-25-2007 10:34 PM

That is strange. I can't say why the command doesn't hold up if the system is rebooted or shut off. :scratch: Hopefully someone more experienced than I can offer some insight.

General Failure 08-26-2007 03:26 AM

Put the user in audio group?

janhe 08-26-2007 05:07 AM

This sure smells like a permission problem.

I was a newbie myself in the 9.1 era (and still am one in some respect).
after you have booted, do
Code:

ls -l /dev/dsp
ls -l /dev/sound/

as your dad already may have pointed out, this command shows the permissions and the owners of /dev/dsp and everything in /dev/sound/

/dev is a special directory, it contains interfaces for your software (kernel, programs) to your hardware. I like to think of it as a way for the OS to give names to hardware devices.
If my memory serves me well (it doesn't always do that), in 9.1 /dev/ contained a bunch of files that were created at boot time, to contain every possible device the kernel could interface with.(no computer could contain all these devices)


BTW, I don't think using ubuntu isn't that much of a difference in respect to using a old slackware version when your dad is the sysadmin
If you really want to learn something about linux, tell your dad to back off, burn yourself a nice slackware 12 install cd set, and slack on!
Some of my friends also use linux, but I haven't met a slackware user in person. Slackware has the reputation of being an old, rusty distro (some people even think it is unmaintained), but it has everything I like about linux distro's (stability).

I can understand that some people like ubuntu better than Slackware. Slackware puts you completely in control. This means you can really costumise your linux install as you want. I also means you will have to read some howto's to do basic system configuration after installation, instead of just accepting some default configs. (Try The Slackware Book, linked from http://www.slackware.com )

I bet you could make Slackware behave just like Ubuntu does, so that an end user (without admin rights) doesn't notice the difference.
The difference will be that you know what is going on inside the config files, and your friends will know which "Ubuntu wizard applications" edit these config files "automagically" (I really hate that word, it makes me feel powerless as a scientist)

janhe 08-26-2007 05:10 AM

forgot to mention, I'd like you to post the output of the ls -l commands
that is, if you don't decide to follow my suggestion and install slackware 12 (or another distro)

dive 08-26-2007 06:49 AM

Slackware isn't a rusty distro by any means, but it is the oldest distro. Slack 12 with a 2.6 kernel is as up to date as any other distro. The main difference is the editing of text files to configure it where most other distros will use gui programs to do this.

Slack is a great way to learn about linux.

To the OP: if you have newish hardware I would definitely recommend downloading the Slack 12 DVD and installing that. You will find most things work straight out the box. You sound problem sounds like Alsa isn't installed properly. That's the usual cause of /dev/dsp missing.

piete 08-26-2007 08:09 AM

You're probably overwhelmed by all the stuff that you're reading here, and I don't want to put you off by dumping yet *more* on your plate, but I cannot resist the urge to help out when it comes to learning, so read this post, or don't read this post, whatever you like. You'll find so many opinions, some of which may seem contradictory at first - as you learn more these contradictions resolve themselves and you'll understand why people do things in different ways; until you get that far, it's best to give as many details as you can with respect to your hardware -- and in this case, your permissions!

On with the show ...

I have to back Janhe up here - your learning will be gimp'd if you have to constantly check with someone else before you perform an action. Put all your important data elsewhere and get a disposable PC (at the very least some harddrive you can just wipe-clean when you get it wrong, if necessary) to install slackware onto it. Using newer versions of Slack will provide more stuff out-of-the box and typically more people will be able to help you out, but Slack is Slack, so use whatever you like.

Let's have a look at your actual problem, though. Please forgive me if it sounds patronising, but I have no idea of your existing understanding =)

"Sound server informational message:
Error while initializing the sound driver:
device /dev/dsp can't be opened (Permission denied)
The sound server will continue, using the null output device."

When you boot, /dev is populated with, potentially, all the device nodes you'll ever need. In *nix everything is represented as a file - so these device nodes are interfaces to your hardware, but act pretty much just like files. You can read to them, write to them, set the permissions and so on.

The error message is "Permission denied" which could occur for only one reason. You don't have permissions to do anything with that device (sound typically is an output device, so you really need to be able to write to it). As mentioned before, there are a couple of options to solve this:

1. Set the node 666 (that is rw-rw-rw- or rw for owner, group AND world) - you can find permission info here: http://www.perlfect.com/articles/chmod.shtml
2. Add yourself to the group that already has rw- on that node.

In the latter case, I mean if you get:

rw-rw-rw- root:audio /dev/sound/dsp

When you `ls -l` then you need to add your user to the audio group. How? From http://www.slackbook.org/html/essent...hardusers.html

Quote:

All normal users are members of the “users” group on a typical Slackware system. However, if you want to create a new group, or add the new user to additional groups, you'll need to modify the /etc/group file. Here is a typical entry:

cvs::102:chris,logan,david,root

The fields are group name, group password, group ID, and group members, separated by commas. Creating a new group is a simple matter of adding a new line with a unique group ID, and listing all the users you want to be in the group. Any users that are in this new group and are logged in will have to log out and log back in for those changes to take effect.
So just add your name to the end of the audio list =)

Remember how device nodes are links to the hardware? Those links are generated every time you boot up, not just once (iirc), so the reason chmod 666 doesn't persist through shutdown, is because the changes are lost!

My short-cut method to fixing that would be to add the fix to a startup script - so every time it boots, you change the permissions automatically. How?

I'll let you try and figure it out, but I'd start by searching the forum and your harddrive for /etc/rc.d/rc.local

Good luck, welcome to Slackware!
- Piete.

PS: Using Slackware means you get help (and help to help yourself) from this forum, which imho is a fantastic reason to stick with us =D

Laurana 08-27-2007 09:06 AM

>>
Flattery will get you everywhere.

aleksandra@abp:~$ ls -l /dev/dsp
lr-xr-xr-x 1 root root 9 Aug 27 09:57 /dev/dsp -> sound/dsp
aleksandra@abp:~$ ls -l /dev/sound/
total 0
crw------- 1 root root 14, 3 Dec 31 1969 dsp
crw------- 1 root root 14, 0 Dec 31 1969 mixer
aleksandra@abp:~$
<<

Sorry I haven't responded. Things are getting more hectic the closer I get to college starting. Here's what I get when I type in those commands, janhe. I haven't done the "patch" command yet. I'm told that this: crw------- means only root has the ability to listen to sound, groups and users have nothing.

Piete, thanks for the thorough response. Don't worry about sounding patronising, tones generally have a difficult time coming through in text form. I'll check back this evening.

piete 08-27-2007 03:29 PM

And this is where I show my ignorance ... since newer versions typically use udev to control the /dev directory. At the time of 9.1 udev was only in current (first seen in 10.0!), so you see *every* node, not the ones udev makes for you. I have no idea how to adjust the permissions at creation time (like I can with udev), so you will have to fish through some old documentation to see how the nodes are created, or hope someone who had to do that a couple of years back remembers how and posts here =)

Or, you can tweak rc.local to add the permission changes. Say so if you want a walkthrough for doing so (although it literally is adding the line that fixes the problem into the rc.local file) ...

- Piete.

janhe 08-28-2007 04:40 AM

I know that when you're going to college the first time, things can be a bit hectic. It will pass...
after you graduate
(I know, it isn't nice to tease people who are about to make the big step)

If it might help, here's the output from my laptop:
Code:

bash-3.1$ ls -l /dev/dsp
lrwxrwxrwx 1 root root 9 2007-08-28 10:16 /dev/dsp -> sound/dsp
bash-3.1$ ls -l /dev/sound/
total 0
crw-rw--w- 1 root audio 14, 12 2007-08-28 10:16 adsp
crw-rw--w- 1 root audio 14,  4 2007-08-28 10:16 audio
crw-rw--w- 1 root audio 14,  3 2007-08-28 10:16 dsp
crw-rw--w- 1 root audio 14,  0 2007-08-28 10:16 mixer
crw-rw--w- 1 root audio 14,  1 2007-08-28 10:16 sequencer
crw-rw--w- 1 root audio 14,  8 2007-08-28 10:16 sequencer2
bash-3.1$

One thing you might try, is to run "alsaconf" or "alsaconfig". In slack 12, alsaconf is included, but I don't know about 9.1 (maybe alsaconfig is included instead of alsaconf)
If one of these commands works, run alsactl store, and you're on to the next step!

The long-term solution probably involves installing slack 12, because it comes with newer libraries and drivers.


All times are GMT -5. The time now is 02:32 AM.