View previous topic :: View next topic |
Author |
Message |
sl70 Guru


Joined: 18 Jun 2002 Posts: 459 Location: Saitama, JP
|
Posted: Fri Jul 04, 2003 11:46 pm Post subject: how to reset a device? |
|
|
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 |
|
 |
ctford0 l33t


Joined: 25 Oct 2002 Posts: 774 Location: Lexington, KY,USA
|
Posted: Sat Jul 05, 2003 12:33 am Post subject: |
|
|
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 |
|
 |
sl70 Guru


Joined: 18 Jun 2002 Posts: 459 Location: Saitama, JP
|
Posted: Sat Jul 05, 2003 4:14 pm Post subject: |
|
|
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 |
|
 |
xentric Guru


Joined: 16 Mar 2003 Posts: 410 Location: Netherlands
|
Posted: Sun Jul 06, 2003 5:30 am Post subject: |
|
|
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 |
|
 |
sl70 Guru


Joined: 18 Jun 2002 Posts: 459 Location: Saitama, JP
|
Posted: Mon Jul 07, 2003 7:46 pm Post subject: |
|
|
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 |
|
 |
xentric Guru


Joined: 16 Mar 2003 Posts: 410 Location: Netherlands
|
Posted: Mon Jul 07, 2003 8:13 pm Post subject: |
|
|
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 |
|
 |
|