How to disable built-in wifi and use only USB wifi card?

  • The built-in wifi card in my laptop (Dell XPS M1330) is crap, pretty much. I have an Asus USB wifi card which is significantly better, and it works fine. What I'd like to do is disable the built-in wifi card. Is there a way to do this (without having to boot into BIOS each time I want to disable/enable the built-in wireless)?

    @mikewhatever: Here are those outputs

    [email protected]:~$ lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 002: ID 0b05:179d ASUSTek Computer, Inc. 
    Bus 002 Device 004: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam
    Bus 007 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
    [email protected]:~$ lspci -nnk | grep -iA2 net
    09:00.0 Ethernet controller [0200]: Broadcom Corporation NetLink BCM5906M Fast Ethernet PCI Express [14e4:1713] (rev 02)
        Subsystem: Dell XPS M1330 [1028:0209]
        Kernel driver in use: tg3
    0c:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)
        Subsystem: Dell Wireless 1395 WLAN Mini-Card [1028:000b]
        Kernel driver in use: wl

    Doesn't your laptop have a button to switch wireless on and off?

    Of cause, just blacklist the module. In case you need help with that, post some more info. We'll need the outputs of `lsusb` and `lspci -nnk | grep -iA2 net`.

    @LnxSlck: Yes, but it disables all wireless capability including the USB wifi card.

    @mikewhatever: I'm new to Linux. Blacklisting a module is something I would need help with, haha. Here is the outputs you requested, thanks!

  • Add the following line to /etc/network/interfaces:

    iface wlan0 inet manual

    NetworManager doesn't manage interfaces configured in the interfaces file. Replace wlan0 with the interface you want to disable, if it's not the name of the built-in interface.

    Then restart network manager

    sudo service network-manager restart

    It won't let me save because it's read-only?

    @Matt Edit with `sudo nano /etc/network/interfaces`, add the line, save and exit (Ctrl+O, ENTER, Ctrl+X).

    Works like charm..

    In my case it was `wifi0` instead of `wlan0` (Lubuntu 16). Check `ifconfig` for the right device name.

  • I think the most easy way to do this is with ifconfig.



    then look at which adapter you want to turn off, in my case wlan1 is my internal wifi and wlan2 is my usb wifi. Then run

    sudo ifconfig wlan1 down

    and it will turn of (type ifconfig to check, note that in the network manager the adapter still shows, but it is turned of). To turn it on again:

    sudo ifconfig wlan1 up

    and that's it.

    How can I find if the adapter I want to disable/enable is `wlan1`, `wlan2` or something else?

    `ifconfig` will tell you which adapters are there, most likely the lowest number will be your built-in adapter, but I think you should just try it to be sure.

    It seems that `sudo lshw -C network` give a list of items whose 'logical name's are the ones to be used with `sudo ifconfig [logical name] up`.

    Oh that does give a lot more information than `netstat` or `ifconfig`, nice!

    Go to System Settings -> Network -> Wireless, the find your network name and click the ">" (greater-than symbol) at the far right edge. Then click "Settings" in the lower-right corner, and ensure the "Wi-Fi" tab is selected. The line "Device MAC address" will show both the h/w address and the network name (in parentheses). The network name is the same as that shown by `ifconfig`

    Actually, the above seems to reconnect. Look at the detail page in System Settings -> Network. Instead of `Wi-Fi` tab, go to `General` tab and uncheck `Automatically connect to this network when it is available`, as well as the `All users may connect...`. This seems to keep the built-in card from connecting to wifi.

    For me on 16.04 this causes the interface to disappear from `ifconfig` for a moment, but then it reappears and reconnects soon.

  • To blacklist the module of your wireless card:

    1. sudo vi /etc/modprobe.d/blacklist.conf (or create a custom one)
    2. Uncomment the module name that has a # in the beginning of the line:

      blacklist eth1394
    3. Save, run sudo update-initramfs -u and reboot

    To remove a module manually without rebooting:

    sudo modprobe -r eth1394

    Looses effect after reboot.

    To load the module:

    sudo modprobe eth1394

    To see modules loaded:

    sudo lsmod

    If you wanted to blacklist eth1394 woudln't you _uncomment_ the line or add a new line ? Otherwise this is what I needed thanks!

    For me this is the right solution. I'm on MX Linux and was confused, because doing `sudo ifconfig wlan0 down` sets the interface down only for a few minutes, when checking back with `ifconfig` the interfaces was up again. So I added `blacklist iwlwifi` to my `/etc/modprobe.d/blacklist.conf` and that's it. Btw. I don't need wifi at all.

    @zayquan Thanks, not sure how i missed that

  • The built in wifi is Broacom's BCM4312, which uses the proprietary STA driver. So, no need to blacklist anything in your particular case, just deactivate the driver, using the Additional Drivers utility.

  • Most laptops these days have Intel wireless cards, which you can very easily disable using the command sudo modprobe -r iwlwifi or disable and blacklist permanently using sudo modprobe -r iwlwifi; sudo modprobe -b iwlwifi. I do this with my laptop to use my high-gain TP-Link adapter instead of the internal wifi card.

  • I usually physically remove the internal card. this is usually a mini PCI-e card with 1 or 2 antenna connections. the antenna connections can be carefully lifted up and they disconnect without any fuss. there will usually be 1 Phillips screw holding the card in place. once the screw is removed, lift the back of the card and slide it out of it's edge connector. i usually fold electrical (vinyl) tape over the antenna wire connectors and push the screw through the electrical tape. then re-install the screw (thus holding the antenna wires in their former place). this solves the problem of an undesired internal wireless quite nicely.

    note that some cards also include Bluetooth and this procedure removes such Bluetooth as well.

    also note that with usb radios, the radio must be turned off before unplugging the radio. on some operating systems, the system crashes if the radio is unplugged before being turned off in the operating system (while still booted).

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM