LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-06-2004, 04:30 PM   #1
Benedictus
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian
Posts: 6

Rep: Reputation: 0
device /dev/dsp can't be opened


I am running Debian (sarge) and just built a new kernel (2.6.7). When I boot with the new kernel and start KDE I get the message:

Quote:
Error while initializing the sound server:
device /dev/dsp can't be opened (No such device)
Quote:
$ ls -l /dev/dsp
crw-rw---- 1 root audio 14, 3 Mar 23 15:49 /dev/dsp
When I do 'groups', I see that I am in the audio group, so I should be able to read/write the device. I tried this:

Quote:
$ cat /dev/random > /dev/dsp
bash: /dev/dsp: No such device
The sound worked with my previous kernel (2.4.25).

I figure I must have goofed something up when configuring the kernel (didn't include a module or something). I took the defaults for just about everything; I added two or three things, but that's about it.
 
Old 08-06-2004, 05:21 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Well if you only added a couple of things then most likely you did not include support for your card and possibly the sound system itself do you have some place where you can post the config file so we can have a look at it. BTW what is the card and are you trying to use OSS or ALSA. You can also check with lsmod to see if the modules are loaded for the card and you may want to go into the Control Center and under the Sound & Multimedia -> Sound System -> Hardware tab and make sure that you have the actual sound system selected for what you are using sometimes the autodetection does not work.
 
Old 08-06-2004, 05:46 PM   #3
Benedictus
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
I put my config file here.

This is what lsmod shows:
Quote:
$ lsmod
Module Size Used by
soundcore 9408 -
sis 53920 -
slip 12960 -
slhc 7108 -
ipv6 237600 -
af_packet 21228 -
ehci_hcd 27912 -
usbcore 107936 -
evdev 9024 -
ide_scsi 16008 -
epic100 18248 -
mii 4612 -
crc32 4164 -
8250 20576 -
serial_core 21924 -
parport_pc 32736 -
lp 10372 -
parport 38920 -
ide_cd 40548 -
cdrom 37216 -
rtc 12060 -
ext3 116616 -
jbd 57692 -
sd_mod 19264 -
ata_piix 7528 -
libata 39112 -
scsi_mod 119120 -
ide_disk 19044 -
via82cxxx 11520 -
trm290 4360 -
triflex 4648 -
slc90e66 7372 -
sis5513 13772 -
siimage 12164 -
serverworks 10648 -
sc1200 7916 -
rz1000 2308 -
piix 12324 -
pdc202xx_old 15328 -
pdc202xx_new 9632 -
opti621 4136 -
ns87415 3816 -
hpt366 19620 -
hpt34x 5188 -
generic 3780 -
cy82c693 4164 -
cs5530 5580 -
cmd64x 11424 -
amd74xx 12832 -
alim15x3 9776 -
aec62xx 9664 -
ide_core 129420 -
unix 27344 -
 
Old 08-06-2004, 06:03 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
You have no sound support compiled just the basic module for sound you need to either select your card from the list in the OSS section or if you want to use the newer ALSA which is supposed to be the default now then you should select them making sure to select the OSS compatibility layer support for the older apps which require it.

Code:
#
# Sound
#
CONFIG_SOUND=m

#
# Advanced Linux Sound Architecture
#
# CONFIG_SND is not set

#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
 
Old 08-06-2004, 06:32 PM   #5
Benedictus
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks! I'll give it a shot.
 
Old 08-07-2004, 09:57 AM   #6
Benedictus
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
Okay, I've rebuilt the kernel, but I still have the same problem.

Code:
# Sound
#
CONFIG_SOUND=y

# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=m
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

# PCI devices
#
CONFIG_SND_AC97_CODEC=m
...
CONFIG_SND_ES1938=m
The full config file is here

Code:
$ ls -l /dev/dsp
crw-rw----    1 root     audio     14,   3 Mar 23 15:49 /dev/dsp
$ cat /dev/random > /dev/dsp
bash: /dev/dsp: No such device
 
Old 08-07-2004, 02:36 PM   #7
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Ok so have you installed the ALSA needed from the archives the packages are alsa-utils and alsa-base then once done if it does not automatically configure it for you then alsaconf to have the auto-detection run. Using lsmod you should a whole bunch of modules loaded for the snd_??? if it is working correctly.

Code:
nvidia               4816116  12
apm                    17028  2
snd_via82xx            18564  1
snd_ac97_codec         59556  1 snd_via82xx
snd_pcm_oss            46152  0
snd_mixer_oss          15456  2 snd_pcm_oss
snd_pcm                76356  2 snd_via82xx,snd_pcm_oss
snd_timer              18916  1 snd_pcm
snd_page_alloc          8488  2 snd_via82xx,snd_pcm
snd_mpu401_uart         5248  1 snd_via82xx
snd_rawmidi            18528  1 snd_mpu401_uart
snd_seq_device          6120  1 snd_rawmidi
snd                    42788  9 snd_via82xx,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore               6432  2 snd
uhci_hcd               27312  0
via686a                16584  0
i2c_sensor              2304  1 via686a
i2c_isa                 1600  0
i2c_core               17872  3 via686a,i2c_sensor,i2c_isa
ns558                   4448  0
sidewinder             10976  0
joydev                  7616  0
gameport                3360  3 snd_via82xx,ns558,sidewinder
parport_pc             25408  1
lp                      8324  0
parport                31976  2 parport_pc,lp
tulip                  36128  0
crc32                   3776  1 tulip
Make sure that you run alsamixer at least once as your normal user to check on the master and PCM volumes they should be unmuted and about 75% volume. Then when you exit the default levels will be set for each and will be used every time you boot.
 
Old 08-07-2004, 03:30 PM   #8
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The changes that you did in alsamixer will not be set after you boot unless you run "alsactl store" as su or root.
 
Old 08-07-2004, 03:53 PM   #9
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally posted by Electro
The changes that you did in alsamixer will not be set after you boot unless you run "alsactl store" as su or root.
Debian runs that automatically when shutting down a working alsa daemon at least I have never had to use it on any of my machines I only see the "ALSA saving mixer settings" in the shutdown messages.
 
Old 08-07-2004, 09:36 PM   #10
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
In some Linux distributions, they may not have the script in /etc/init.d or whatever init directory they are stored in. It does not hurt anything by running "alsactl store".
 
Old 08-08-2004, 03:09 PM   #11
Benedictus
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
Okay, I installed alsa-utils and alsa-base. I ran alsaconf, which seems to find my soundcard, but complains about not being able to not being able to restore the ALSA mixer settings and suggests running 'alsactl restore'. When I run that I get:

Code:
# alsactl restore
alsactl: load_state:1134: No soundcards found...
If I run alsamixer, I get something similar:

Code:
# alsamixer

alsamixer: function snd_ctl_open failed for default: No such device
I tried Googling this, but didn't find any solutions.

This is what lsmod shows:

Code:
$ lsmod
Module                  Size  Used by
snd_pcm_oss            51944  0
snd_pcm                93572  1 snd_pcm_oss
snd_page_alloc         11304  1 snd_pcm
snd_timer              24772  1 snd_pcm
snd_mixer_oss          18496  1 snd_pcm_oss
sis                    54624  0
slip                   13408  1
slhc                    7200  1 slip
snd                    54980  4 snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
ipv6                  238688  16
af_packet              21544  4
ehci_hcd               28036  0
usbcore               108416  1 ehci_hcd
evdev                   9120  0
ide_scsi               16132  0
epic100                18340  0
mii                     4736  1 epic100
crc32                   4288  1 epic100
8250                   20704  0
serial_core            22048  1 8250
lp                     10436  0
parport                39304  1 lp
ide_cd                 40644  1
cdrom                  37312  1 ide_cd
rtc                    12248  0
ext3                  116712  1
jbd                    57816  1 ext3
sd_mod                 19424  0
ata_piix                7652  0
libata                 39204  1 ata_piix
scsi_mod              119596  3 ide_scsi,sd_mod,libata
ide_disk               19168  3
via82cxxx              11644  0 [permanent]
trm290                  4484  0 [permanent]
triflex                 4772  0 [permanent]
slc90e66                7496  0 [permanent]
sis5513                13896  0 [permanent]
siimage                12288  0 [permanent]
serverworks            10772  0 [permanent]
sc1200                  8040  0 [permanent]
rz1000                  2432  0 [permanent]
piix                   12416  0 [permanent]
pdc202xx_old           15452  0 [permanent]
pdc202xx_new            9756  0 [permanent]
opti621                 4260  0 [permanent]
ns87415                 3912  0 [permanent]
hpt366                 19716  0 [permanent]
hpt34x                  5312  0 [permanent]
generic                 3904  0 [permanent]
cy82c693                4288  0 [permanent]
cs5530                  5704  0 [permanent]
cmd64x                 11548  0 [permanent]
amd74xx                12956  0 [permanent]
alim15x3                9900  0 [permanent]
aec62xx                 9788  0 [permanent]
ide_core              129804  26 ide_scsi,ide_cd,ide_disk,via82cxxx,trm290,triflex,slc90e66,sis5513,siimage,serverworks,sc1200,rz1000,piix,pdc202xx_old,pdc202xx_new,opti621,ns87415,hpt366,hpt34x,generic,cy82c693,cs5530,cmd64x,amd74xx,alim15x3,aec62xx
unix                   27664  274
 
Old 08-08-2004, 03:29 PM   #12
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Gives us more information about your sound device. What does modules.conf, conf.module, rc.modules, etc because I think you did not add any lines to load the module. You may want to compile the kernel for all sound cards as modules instead of one sound card. Make sure soundcore is loaded or compiled in the kernel.
 
Old 08-08-2004, 03:59 PM   #13
Benedictus
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: 0
modules.conf

Code:
### This file is automatically generated by update-modules"
#
# Please do not edit this file directly. If you want to change or add
# anything please take a look at the files in /etc/modutils and read
# the manpage for update-modules.
#
### update-modules: start processing /etc/modutils/0keep
# DO NOT MODIFY THIS FILE!
# This file is not marked as conffile to make sure if you upgrade modutils
# it will be restored in case some modifications have been made.
#
# The keep command is necessary to prevent insmod and friends from ignoring
# the builtin defaults of a path-statement is encountered. Until all other
# packages use the new `add path'-statement this keep-statement is essential
# to keep your system working
keep

### update-modules: end processing /etc/modutils/0keep

### update-modules: start processing /etc/modutils/actions
# Special actions that are needed for some modules

# The BTTV module does not load the tuner module automatically,
# so do that in here
post-install bttv insmod tuner
post-remove bttv rmmod tuner


### update-modules: end processing /etc/modutils/actions

### update-modules: start processing /etc/modutils/aliases
# Aliases to tell insmod/modprobe which modules to use

# Uncomment the network protocols you don't want loaded:
# alias net-pf-1 off            # Unix
# alias net-pf-2 off            # IPv4
# alias net-pf-3 off            # Amateur Radio AX.25
# alias net-pf-4 off            # IPX
# alias net-pf-5 off            # DDP / appletalk
# alias net-pf-6 off            # Amateur Radio NET/ROM
# alias net-pf-9 off            # X.25
# alias net-pf-10 off           # IPv6
# alias net-pf-11 off           # ROSE / Amateur Radio X.25 PLP
# alias net-pf-19 off           # Acorn Econet

alias char-major-10-175 agpgart
alias char-major-10-200 tun
alias char-major-81     bttv
alias char-major-108    ppp_generic
alias /dev/ppp          ppp_generic
alias tty-ldisc-3       ppp_async
alias tty-ldisc-14      ppp_synctty
alias ppp-compress-21   bsd_comp
alias ppp-compress-24   ppp_deflate
alias ppp-compress-26   ppp_deflate

# Crypto modules (see http://www.kerneli.org/)
alias loop-xfer-gen-0   loop_gen
alias loop-xfer-3       loop_fish2
alias loop-xfer-gen-10  loop_gen
alias cipher-2          des
alias cipher-3          fish2
alias cipher-4          blowfish
alias cipher-6          idea
alias cipher-7          serp6f
alias cipher-8          mars6
alias cipher-11         rc62
alias cipher-15         dfc2
alias cipher-16         rijndael
alias cipher-17         rc5


### update-modules: end processing /etc/modutils/aliases

### update-modules: start processing /etc/modutils/alsa-base
above snd-pcm snd-pcm-oss

### update-modules: end processing /etc/modutils/alsa-base

### update-modules: start processing /etc/modutils/apm
alias char-major-10-134 apm
alias /dev/apm_bios             /dev/misc/apm_bios
alias /dev/misc/apm_bios        apm

### update-modules: end processing /etc/modutils/apm

### update-modules: start processing /etc/modutils/diald
alias tap0      ethertap
options tap0    -o tap0 unit=0
alias tap1      ethertap
options tap1    -o tap1 unit=1

### update-modules: end processing /etc/modutils/diald

### update-modules: start processing /etc/modutils/paths
# This file contains a list of paths that modprobe should scan,
# beside the ones that are compiled into the modutils tools
# themselves.


### update-modules: end processing /etc/modutils/paths

### update-modules: start processing /etc/modutils/setserial
#
# This is what I wanted to do, but logger is in /usr/bin, which isn't loaded
# when the module is first loaded into the kernel at boot time!
#
#post-install serial /etc/init.d/setserial start | logger -p daemon.info -t "set
serial-module reload"
#pre-remove serial /etc/init.d/setserial stop | logger -p daemon.info -t "setser
ial-module uload"
#
alias /dev/tts          serial
alias /dev/tts/0        serial
alias /dev/tts/1        serial
alias /dev/tts/2        serial
alias /dev/tts/3        serial
post-install serial /etc/init.d/setserial modload > /dev/null 2> /dev/null
pre-remove serial /etc/init.d/setserial modsave  > /dev/null 2> /dev/null

### update-modules: end processing /etc/modutils/setserial

### update-modules: start processing /etc/modutils/arch/i386
alias parport_lowlevel parport_pc
alias char-major-10-144 nvram
alias binfmt-0064 binfmt_aout
alias char-major-10-135 rtc

### update-modules: end processing /etc/modutils/arch/i386
 
Old 08-08-2004, 04:40 PM   #14
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
It is not loading the module for the sound card for some reason use modprobe SND-ES1938 to load the module for the card and any related modules needed. You may also want to check in the /etc/modprobe.d/old_etc_modprobe.conf file to make sure that you have the alias for the card correctly in there that seems to be where the settings got moved too.

Code:
[HappyTux:/home/stephen]# grep -r -i snd-via /etc/
/etc/modprobe.d/old_etc_modprobe.conf:alias snd-card-0 snd-via82xx
/etc/modprobe.d/old_etc_modprobe.conf:alias sound-slot-0 snd-via82xx
[HappyTux:/home/stephen]# cat /etc/modprobe.d/old_etc_modprobe.conf
# Place your local directives here.

# This line loads the part of the modprobe configuration managed with
# update-modules(8) and built from the contents of /etc/modprobe.d/.

alias char-major-195 nvidia
# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF verion 1.0.2 ---
alias snd-card-0 snd-via82xx
alias sound-slot-0 snd-via82xx
# --- END: Generated by ALSACONF, do not edit. ---
 
  


Reply



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
KDE -device/dev/dsp - can't be opened High-gain Linux - Newbie 13 12-14-2004 10:47 AM
device /dev/dsp can't be opened (Permission denied) jon_k Linux - Software 1 10-27-2004 08:51 PM
device /dev/dsp can't be opened kalif Linux - Software 26 08-31-2003 06:38 PM
No sound > device /dev/dsp can't be opened DarkGhost Linux - Hardware 1 12-25-2002 06:36 PM
Device /dev/dsp can't be opened... MatMan5959 Linux - Hardware 4 06-20-2002 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:26 PM.

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
Open Source Consulting | Domain Registration