No sound in Mandrake 10 Community

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
I am having trouble getting the sound working on my audigy 2 zs in Mandrake 10. Every time i boot up mandrake i get this message:

Sound server informational message:
Error while initializing the sound driver:
device: default can't be opened for playback (No such file or directory)
The sound server will continue, using the null output device.

This also comes up when i go to System/Configuration/KDE/Sound/Sound System in the start menu and try to enable the Sound System. When i open kmix it is basically blank (no sliders or anything). There is only an empty drop down menu that is labeled Current Mixer. When i click on my sound card in Mandrake Control Center this is what comes up:

Vendor: Creative Labs
Alternative drivers: snd-emu10k1
Bus: PCI
Bus identification: 1102:4:1102:2002
Location on the bus: 1:8:0
Description: EMU10K2 Audigy Audio Processor
Module: audigy
Media class: MULTIMEDIA_AUDIO

If i click on run config tool the displayed options for driver are snd-emu10k1, emu10k1, and audigy, currently at snd-emu10k1. However, changing the driver doesn't seem to help.

A couple other things i noticed that are probably unimportant. I read of a similar problem on another message board and it was suggested that I my add username into the audio group, but in the Mandrake Linux User Management Tool the only group i see is my username. Also there is no dsp folder in /dev/ (read somewhere that this was related to sound).

Obviously i'm a Linux newb. Can Anyone help?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
What is the device it is trying to usee?
Did you try looking at the /etc/groups file?
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
It works now. For some reason kmix is there now and i was able to turn up the volume. Maybe it was in some utils package i downloaded. Anyway i'm still getting the same error message and there are no system sounds, but mp3's work.
 

asb002

Member
Feb 17, 2003
122
0
0
System sounds do not work? That *may* mean that ARTS isn't configured properly (I think you mentioned KDE up there). Try specifiying manually the sound device, probably /dev/dsp or /dev/sound/dsp.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Sound server informational message:
Error while initializing the sound driver:
device: default can't be opened for playback (No such file or directory)
The sound server will continue, using the null output device.


Your using KDE, right?

That's the kde arts sound server, otherwise known as artsd.

It's looking for a special file called /dev/dsp, but for some reason it doesn't exist or you don't have permissions for it.

If your using the snd-emu10k1 driver, that is the ALSA driver that is used for soundlbaster 5.1 live, audigy, and audigy2 sound cards. The other type of sound drivers are emu10k1 and that is for OSS. I won't go into it to much, but generally Alsa stuff is nicer.

Ok, go ahead and open up a terminal. Some commands to try:

This will show all running proccesses.
ps -A
There should be a artsd sound deamon running (like a service in windows) You can search thru the outputs of commands with grep to make it easier to find stuff. It's kinda like old english grep = grope thru output, the | is a pipe to pipe the output to another command. PS shows proccesses, -A shows all proccesses.

ps -A | grep arts

And that should show your artsd server.
Try to use the alsamixer, which is the special mixer for using in Alsa.

alsamixer

That should show a bunch of mixer slides you can move up and down with your keyboard. This will give you the most control over your sound card. If you can control it then that means that the drivers and everything is set up.

A good music player for using with Alsa driven sound cards is alsaplayer, the command is

alsaplayer

See if you can play a cdrom (it goes thru digital proccessing via the IDE stuff this way instead of thru the analog out into your sound card) or a mp3.

So if that works then you know everything is definately working, now we just have to figure out why artsd can't find the sound card.

In the /dev directory we have special files that represent hardware. Normally for legacy OSS drivers you have a /dev/dsp file that represents the sound card, and that's what artsd is probably looking for.

Try:
killall artsd

wait a couple seconds and then try:
ps -A |grep arts

to make sure that it is realy dead. Now restart it and see if we can see any extra comments or errors that may pop up on the command line.

artsd

Now maybe it can't find the /dev/dsp file. So we do a

ls -l /dev/dsp

Did it find anything? If it did maybe we can "cat" a file into it to get static. Cat is a command to dump the contents of a file to standard output (which is your terminal window in this case). So you can read text files by going "cat filename.txt".

It works for binary files and such, too. Like if you cat a "cat sound.wav" file you get a bunch of gibberish to the screen, a ascii representation of the sound file. Well you can redirect standard output to files. Like "cat sound.wav > sound2.wav" will make a copy of the original sound file.

So we will use it to test for which device is the real dsp file, then make a symbolic link (like a shortcut, but more fundamental, using the actual filing system.) so that artsd can find the stupid file easier.

ls -l /dev/dsp*

does it show a bunch of dsp0, dsp1, dsp2, files?

then try (you can use any file, actually, but it will create a bunch of static noises, a wav file will actually play (badly) music though.)

cat sound.wav > /dev/dsp0

Also sometimes on newer versions it makes the sound card file be in /dev/sound, so look in there, too

cat sound.wav > /dev/sound/dsp

If you get a permission denied anywere along this, use the su command to become root and then try it again. You can use the chmod command to change permissions. This can vary, It could be that Mandrake is using the horrible devfs system to control and maintain the /dev/ files. To make it "easy", which sucks.

But say you find out the /dev/dsp0 file is the real dsp file. So we want to create a symbolic link to /dev/dsp.

If /dev/dsp already exists, but is wrong, then we delete it (btw you have to be root/superuser to do this. And be carefull it's easy to realy screw things up)

rm /dev/dsp

then we create the symbolic link:

ln -s /dev/dsp0 /dev/dsp

then we kill and restart artsd

killall artsd
artsd

And then hopefully everything will be working.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
I have rebooted Linux and the sound has now stopped working again completly. I can't even play mp3s. When I try to open kmix, it is blank again, there are no sliders. When the sound was working before kmix actually did display correctly. I don't remember what i did before that made the sound work.

Yes I'm using KDE

I looked in the /dev/ folder and don't see a file or folder called dsp. How can i get this file?

I looked at my processes like you said, and yes there is an artsd (not artsd sound deamon, just artsd)
When i type alsamixer, this is what comes up: (replaced my username with the word username)

[username@localhost username]$ alsamixer
No mixer elems found

If i type alsaplayer, it says:
bash: alsaplayer: command not found

I killed artsd and restarted it and it said this:

ALSA lib pcm_hw.c:1055:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: No such file or directory
Error while initializing the sound driver:
device: default can't be opened for playback (No such file or directory)

Next i tried:
[username@localhost username]$ ls -l /dev/dsp
ls: /dev/dsp: No such file or directory

in the /dev/sound folder the only two files are midi and dmmidi
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
Update:
I got the sound working a second time, by going to mandrake control center, changing the sound driver to emu10k1 and then back to snd-emu10k1. However, this only worked once, because now whenever i try to change the driver, the small window that says "Please wait, changing system settings" hangs and I have to force quit the control center.
 

Pocatello

Diamond Member
Oct 11, 1999
9,754
2
76
Originally posted by: Sureshot324
Update:
I got the sound working a second time, by going to mandrake control center, changing the sound driver to emu10k1 and then back to snd-emu10k1. However, this only worked once, because now whenever i try to change the driver, the small window that says "Please wait, changing system settings" hangs and I have to force quit the control center.


Mandrake Control Center is buggy. Sometimes I would try to open an application in KDE, the system would hang or slow down. I know Linux doesn't crash, but the GUI in Linux...they still need a lot of work here. For many people the GUI is linux, if it crashes, or slow down to a crawl, then Linux is not working.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
Originally posted by: Pocatello
Originally posted by: Sureshot324
Update:
I got the sound working a second time, by going to mandrake control center, changing the sound driver to emu10k1 and then back to snd-emu10k1. However, this only worked once, because now whenever i try to change the driver, the small window that says "Please wait, changing system settings" hangs and I have to force quit the control center.


Mandrake Control Center is buggy. Sometimes I would try to open an application in KDE, the system would hang or slow down. I know Linux doesn't crash, but the GUI in Linux...they still need a lot of work here. For many people the GUI is linux, if it crashes, or slow down to a crawl, then Linux is not working.

Ok, so is there any way to change the sound driver without using mandrake control center?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
You can manually insert modules into memory by using the module handling command line tools.


lsmod

will list the current modules. The drivers for your sound card, I think (I have a audigy 1), are emu10k1 (for OSS) and snd-emu10k1 (for alsa)

If neither module is present, then do a

modprobe snd-emu10k1

And that will load the sound driver. Then try the alsamixer.

Then if that works go ahead and restart kde and you should have sound.

The only issue is that it won't remember to load the driver next time you boot up, so you would have to do the modprobe thing again. There is a way to make it perminate which is fairly easy, but first lets get sound working.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
It works!
snd-emu10k1 is not there after i boot, but modprobe snd-emu10k1 adds it. Alsamixer still doesn´t work (it says ´no mixer elems found´). Kmix works though and i can play mp3s with xmms. Now how can i get the sound drivers to load at boot?

Thanks a lot for your help so far.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I forget about mandrake.

In your etc directory is kept system wide configurations.

There is a file called /etc/modules.conf that controls the behavior of modules.

In it do you have a "alsa" section?

Also do you have a /etc/modutils directory? Sometimes you have to edit /etc/modules.conf manually, but some distros have a folder called /etc/modutils from which /etc/modules.conf is automaticly generated. It makes it easier to have a package mainater automaticly stick a file into /etc/modutils directory then to have a script edit and possibly mutiliate the /etc/modules.conf file.


Well in most distros you would either add or modify these lines to the /etc/modules.conf file (taken from the www.alsa-project.org website):
# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-emu10k1

# module options should go here

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0

# card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss


And that should ensure that everything gets setup correctly, hopefully. Just copy and paste these lines into that file, as always be sure to backup your config file (they may be already there and just need some modifying to add the snd-emu10k1 stuff) before editing it, just incase you mess it up you can simply copy back the original one and be safe.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
No luck. I added all that stuff to the modules.conf file but snd-emu10k1 still doesn´t load on startup. There is no /etc/modutils folder and the changes i made remained after i rebooted, so i guess the modules.conf file isn´t automatically generated. Here are the contents of my new modules.conf file as well as modprobe.conf.

probeall scsi_hostadapter imm ppa
probeall usb-interface usb-ohci ehci-hcd
alias ieee1394-controller ohci1394
alias eth0 forcedeth
alias sound-slot-0 snd-azt3328
above snd-emu10k1 snd-pcm-oss
above snd-azt3328 snd-pcm-oss


# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-emu10k1

# module options should go here

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0

# card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

And here is modprobe.conf

alias ieee1394-controller ohci1394
alias eth0 forcedeth
alias sound-slot-0 snd-azt3328
install scsi_hostadapter /sbin/modprobe imm; /sbin/modprobe ppa; /bin/true
install snd-azt3328 /sbin/modprobe --first-time --ignore-install snd-azt3328 && { /sbin/modprobe snd-pcm-oss; /bin/true; }
install snd-emu10k1 /sbin/modprobe --first-time --ignore-install snd-emu10k1 && { /sbin/modprobe snd-pcm-oss; /bin/true; }
install usb-interface /sbin/modprobe usb-ohci; /sbin/modprobe ehci-hcd; /bin/true
remove snd-azt3328 { /sbin/modprobe -r snd-pcm-oss; } ; /sbin/modprobe -r --first-time --ignore-remove snd-azt3328
remove snd-emu10k1 { /sbin/modprobe -r snd-pcm-oss; } ; /sbin/modprobe -r --first-time --ignore-remove snd-emu10k1

Some questions. What is snd-azt3328? What exactly are modules.conf and modprobe.conf and what is the difference between them? They seem to contain some of the same lines.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
the azt thing.. I don't know for sure. There is a sound driver for some sound card from aztech that I am not familar with. Maybe onboard sound that was detected or something?

You can probably just comment it out. That is if you put a # at the beginning of the file it will be ignored by the computer. That way you can delete it without realy deleting it.

I don't know realy know what to do next.

Maybe a stopgap fix is good enough. In linux you have what is called init scripts. Init scripts is what controls the behavior of the init program at startup. Init is the first program that comes from the kernel at boot up and basicly starts each and every peice of the OS.

So I beleive that in mandrake there is a file called /etc/rc.d/rc.local. This is were you can safely stick in commands that get going at start up, so that each time you restart the computer it will execute that command. So if modprobe snd-emu10k1 gets the sound going we will simply stick it in that file.

So first do "which modprobe" so that we know the path to the command. It is probably /sbin/modprobe.

So then you stick this line at the end of the /etc/rc.d/rc.local file:

/sbin/modprobe snd-emu10k1

that should get that command running at each and every boot up.

Also check out the forums at mandrake. Maybe they have a fix for the graphical configuration. Or may you just need to play around with it a bit to get it working the "correct" way. Once you do that you can simply delete that new line from the local init script.

Also another thing to check out, maybe you have it installed by default, I am not sure about mandrake.

You may have webmin installed, it's a webbased configuration tool. It runs on your machine, a network service running on port 10000. To get to it go into your browser and type in: https://127.0.0.1:10000/

And that should take you to it if it's installed. I never used it much, but it's fun to play around with. The one mandrake machine I've used had it, so maybe you have it too.
 

ndarlow

Junior Member
Mar 31, 2004
1
0
0
Loading of sound modules in Mandrake GNU/Linux requires starting of the sound and alsa services at boot. Enable both of these services in the Mandrake Control Center.

Unless you wish to use ALSA's OSS emulation the sound devices used are those in /dev/snd/ and will require the snd-emu10k1 module which is specified by the following lines in /etc/modules.conf:

alias sound-slot-0 snd-emu10k1
above snd-emu10k1 snd-pcm-oss

Configure your soundcard in the Mandrake Control Center to use snd-emu10k1. Following reboot you should only need to unmute the mixer channels which can be done in either alsamixer or kmix.

Loading of the snd-pcm-oss module will allow use of /dev/dsp for sound but the ALSA device is /dev/snd/pcmC0D0p although this should be transparent to operation of KDE. Either leave the sound system selector at Autodetect or choose Advanced Linux Sound Architecture (enable Full-duplex too, if you wish) in the Configuration|KDE|Sound|Sound System accessed sound setup screen.

Regards,
Neil Darlow