-   Linux - Hardware (
-   -   Blacklisting automatic driver modules (

xerxesdaphat 11-01-2007 07:04 PM

Blacklisting automatic driver modules
I asked this question here as it's really about blacklisting stuff in general, not just wireless networking.

The rt2570 USB (but internal) wireless card on my laptop running Ubuntu 7.10 has begun to get rather flaky lately, presumably because of heat. So I went out and bought a Atheros-based PCMCIA card (TP-LINK WN-610G, works brilliantly, highly recommended!). That's happily ticking over. However, the internal wireless card is still there. What is irritating is that if a particular button on the laptop's case is accidentally nudged, this switches off the original wireless card and due to bugs in the driver, causes a kernel panic. Not good. If the module is unloaded (rmmod rt2570) first, there's not a problem. However the drivers are automatically loaded every boot. Interestingly if you press the button again to switch the wifi card back on, the modules need to be manually loaded (modprobe rt2570).

My question:
What I'd like to do is make it so the module is not loaded automatically on boot, however if I want to use the original card (for Wireshark, for instance), I'd like to be able to do a `modprobe rt2570' and have the thing still load. How do I accomplish this? Does blacklisting just prevent automatic loading, or does it forbid loading entirely?

Thanks very much.

blackhole54 11-02-2007 02:13 AM


Originally Posted by xerxesdaphat (Post 2945094)
Does blacklisting just prevent automatic loading, or does it forbid loading entirely?

I am not sure, but I think it would be real easy to experimentally find out. I.e., try it and see.

If you don't want to or can't blacklist, another option would be to let the driver load but to manually unload it in /etc/rc.local. If you needed a slight time delay you could have rc.local background another script which first waits using the sleep command and then unloads the module. (BTW, the sleep command in Ubuntu will except fractional seconds.)

There's another option that might work. (I've never tried this; let the buyer beware.) You could create a file in /etc/modprobe.d that contains the line


install rt2570 /bin/true
(I am not at a Linux computer; I think true is in /bin) When modprobe tries to load the module, it will, instead (I hope) simply execute true instead. If you do this and it works, then to actually install the module you would have to:


modprobe --ignore-install rt2570
Hopefully one of these methods will help you out. If you try the last one, please let me know if it works.

All times are GMT -5. The time now is 04:37 AM.