SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
Last edited by Laurana; 09-20-2007 at 03:54 PM.
Reason: Solution to problem found: Upgrade system. XD
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.
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:
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.
I was a newbie myself in the 9.1 era (and still am one in some respect).
after you have booted, do
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)
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.
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:
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:
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!
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
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/
crw------- 1 root root 14, 3 Dec 31 1969 dsp
crw------- 1 root root 14, 0 Dec 31 1969 mixer
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.
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) ...
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.
Last edited by janhe; 08-28-2007 at 04:42 AM.
Reason: [code] and [/code] added