Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to reset a device?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 459
Location: Saitama, JP

PostPosted: Fri Jul 04, 2003 11:46 pm    Post subject: how to reset a device? Reply with quote

I found that I had no sound all of a sudden. Sending a sound file to /dev/dsp gave me the message that the device was busy. I did lsof on the device and found that gtv was using it. I killed gtv (it wasn't really running but it wasn't dead either), but I still got /dev/dsp busy messages.

The question is, how do I reset the /dev/dsp device short of rebooting (which is what I did)?

Thanks.
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Sat Jul 05, 2003 12:33 am    Post subject: Reply with quote

One way is to rmmod and unload the module that is controlling your sound, but this requires that you have your sound compiled in the kernel as a module.

Chris
Back to top
View user's profile Send private message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 459
Location: Saitama, JP

PostPosted: Sat Jul 05, 2003 4:14 pm    Post subject: Reply with quote

I didn't try that this time, but whenever I've done this in the past I've always gotten the device busy message. What we really need is a -f switch on rmmod to force removal of the module.
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Sun Jul 06, 2003 5:30 am    Post subject: Reply with quote

Uhhm.. when I do "man rmmod" I see a --force and a --wait option:
Code:
       -f --force
                 This option can be extremely dangerous: it has no effect unless CONFIG_MOD-
                 ULE_FORCE_UNLOAD was set when the kernel was compiled.  With  this  option,
                 you  can  remove modules which are being used, or which are not designed to
                 be removed, or have been marked as unsafe (see lsmod(8)).


       -w --wait Normally, rmmod will refuse to unload modules which are in use.  With  this
                 option,  rmmod  will  isolate  the  module, and wait until the module is no
                 longer used.  Noone new will be able to use the module, but it's up to  you
                 to  make  sure  the current users eventually finish with it.  See lsmod(8))
                 for information on usage counts.
Back to top
View user's profile Send private message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 459
Location: Saitama, JP

PostPosted: Mon Jul 07, 2003 7:46 pm    Post subject: Reply with quote

Huh? I don't have that in my man rmmod! What version of modutils are you using? Mine is sys-apps/modutils-2.4.25.
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Mon Jul 07, 2003 8:13 pm    Post subject: Reply with quote

I have the same version, but I also played with the 2.5.x kernels. I had to
emerge the 'module-init-tools' package so maybe this changed my rmmod!?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum