Debian sound not working

From LinuxNewbie

okay. I moved the article down. My laptop worked until I apt-get update upgrade. I am now having sound problems. The error box when I start KDE:

Sound server informational message:

Error while initalizing the sound driver:

device /dev/dsp can't be opened (No such device)

The sound server will continue, using the null output device.

Okay. I got it to work! I put the problem, then the solution, then the long road I took getting there.

#!/bin/bash
modprobe -r snd_cs46xx
modprobe -r snd_pcm_oss
modprobe -r snd_mixer_oss
modprobe -r snd_pcm
modprobe -r snd_timer
modprobe -r snd
modprobe -r cs461x
modprobe -r gameport
modprobe snd_cs46xx
cat /proc/asound/cards

I will see if I can find a real fix. Basically, lsmod and remove snd modules until they are all gone (see -r above). Then modprobe only the chipset driver back in; this is just a shortcut since modprobe will reload the depended modules for you.
$ lsmod

Module                  Size  Used by
snd_cs46xx             88904  0
snd_rawmidi            24896  1 snd_cs46xx
snd_seq_device          8588  1 snd_rawmidi
snd_ac97_codec         77056  1 snd_cs46xx
snd_pcm_oss            54148  0
snd_mixer_oss          20288  1 snd_pcm_oss
snd_pcm                98248  3 snd_cs46xx,snd_ac97_codec,snd_pcm_oss
snd_timer              25796  1 snd_pcm
snd                    56868  8 snd_cs46xx,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore              10176  1 snd
snd_page_alloc          9924  2 snd_cs46xx,snd_pcm
gameport                4512  1 snd_cs46xx




The tale continues...

so, I gave myself permission

chmod 777 /dev/* -R
$ ls -l dsp*
lrwxrwxrwx  1 root root       9 Sep  6 21:37 dsp -> /dev/dsp0
crwxrwxrwx  1 root audio 14,  3 Sep  6 21:37 dsp0
crwxrwxrwx  1 root audio 14, 19 Sep  6 21:37 dsp1
crwxrwxrwx  1 root audio 14, 35 Sep  6 21:37 dsp2
crwxrwxrwx  1 root audio 14, 51 Sep  6 21:37 dsp3

Okay. Still happens. And I also tried as root with the same result.

Okay. I went to K - Control Center - Sound & Multimedia - Sound System - Hardware Tab. I selected ALSA applied and the restarted to make sure I had a clean slate.
no joy

I ran alsaconf to be sure it was setup. The card detected and modprobed fine. no joy

I uninstalled alsa because it was suggested on a forum post, and another system didn't have it.
no joy

I reinstalled alsa because the sound modules don't load without it. (duh).
no far, no luck.

I did apt-get install libsdl1.2debian-all. It conflicts with -alsa. In the process it wants to remove all the depends. When it told me I copied them to a text note and told it go ahead.
When it was done, I apt-get install all the stuff that was removed except -alsa.
Then I loaded aptitude, and did g to go to the queued list. On the "remove" catagory I highlighted the category and did + (add them). Since they were already installed it simply removed them from the queue to be removed. This is because things like kde are depended.
no joy.
I tried installing alsa-oss and set control panel - sound to oss. This didn't work.

Okay, a strange twist. Maybe I just missed this earlier when I ran alsaconf:

alsactl: load_state:1134: No soundcards found...
FATAL: Error running install command for snd_cs46xx

I selected snd-cs46xx.
$ lspci

0000:00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 03)
0000:00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)
0000:00:02.0 CardBus bridge: Texas Instruments PCI1450 (rev 03)
0000:00:02.1 CardBus bridge: Texas Instruments PCI1450 (rev 03)
0000:00:03.0 Ethernet controller: 3Com Corporation 3c556B CardBus [Tornado] (rev 20)
0000:00:03.1 Communication controller: 3Com Corporation Mini PCI 56k Winmodem (rev 20)
0000:00:05.0 Multimedia audio controller: Cirrus Logic CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator] (rev 01)
0000:00:07.0 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
0000:00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
0000:00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01)
0000:00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 03)
0000:01:00.0 VGA compatible controller: S3 Inc. 86C270-294 Savage/IX-MV (rev 11)
0000:02:00.0 Network controller: Intersil Corporation Intersil ISL3890 [Prism GT/Prism Duette] (rev 01)


Okay. I got it to work!






Okay, you just install Debian or a debian distro such as ubuntu, mepis or knoppix. You don't have sound when you login! You are cursing the person that suggested it because "it worked fine in Windows"...

The problem is that Debian restricts who has access to devices. The devices are accessed through /dev. They are all owned by root, but the groups vary. Sound has the group "sound", floppy="floppy" group, cdrom, video. You get the idea.

You can fix this several ways:

  • Add yourself to the appropriate group
  • Change the groups so a group you are in has access
  • Change the permissions so everyone can access all devices


I am taking the broad approach here. You can amend this if you want to walk through the other possibilities. I understand the security implications, and assume we are talking about a workstation with limited access to other individuals that you don't trust.

Open a console (command line, shell)
su   (become root)
cd /dev
chmod o+rwx * -R



Alzabo added:
root@3[dev]# ls dsp* -l
lrwxrwxrwx 1 root root 9 2005-01-09 14:06 dsp -> /dev/dsp0
crwxrwxrwx 1 root audio 14, 3 2003-10-01 00:12 dsp0
crwxrwxrwx 1 root audio 14, 19 2003-10-01 00:12 dsp1
crwxrwxrwx 1 root audio 14, 35 2003-10-01 00:12 dsp2
crwxrwxrwx 1 root audio 14, 51 2003-10-01 00:12 dsp3

<Revantine> alzabo: ln -s /dev/dsp0 /dev/dsp
<Revantine> chmod 777 /dev/dsp
</pre>