0

What options do I have to hard-reset a linux driver?

I have a problem with my USB-connected dvb tuners. They crash from time to time with a stack trace in the kernel log and disappear from the device manager. The application (tvheadend, which runs in a docker container) freezes and is not killable anymore, and the docker container can't shutdown, not even being killed.

As all this is connected to an unstable state of the driver, I wonder if it's possible to force-unload or reset it so that I can startup the whole dvb subsystem again without rebooting the machine?

The drivers in my case are si2157 and em28xx*. Unloading using modprobe -r for all dvb-relevant modules fails because the devices are still in use by the frozen process.

Daniel Alder
  • 533
  • 1
  • 8
  • 19

1 Answers1

0

Unloading modules can be done with rmmod -f Do note the part below where it says DANGEROUS

This might not work if it is completely blocked, The best approach might to try and get the drivers fixed, Maybe not to a "working" state, but at least to a "if it crashes make it possible to unload and retry" state

Usage:
        rmmod [options] modulename ...
Options:
        -f, --force       forces a module unload and may crash your
                          machine. This requires Forced Module Removal
                          option in your kernel. DANGEROUS
        -s, --syslog      print to syslog, not stderr
        -v, --verbose     enables more messages
        -V, --version     show version
        -h, --help        show this help
NiKiZe
  • 1,189
  • 7
  • 17
  • nope, `rmmod -f mc videodev tveeprom em28xx dvb_core em28xx_dvb` fails with errors like `could not remove module em28xx: Resource temporarily unavailable`, so far no solution found except rebooting the server – Daniel Alder Oct 29 '21 at 21:11