80

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

matt@sbod:~$ 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
matt@sbod:~$ 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? – LnxSlck Jul 25 '12 at 16:47
  • 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. – mikewhatever Jul 25 '12 at 16:49
  • 2
    @LnxSlck: Yes, but it disables all wireless capability including the USB wifi card. – Matt Jul 25 '12 at 16:59
  • 1
    @mikewhatever: I'm new to Linux. Blacklisting a module is something I would need help with, haha. Here is the outputs you requested, thanks! – Matt Jul 25 '12 at 17:01
67

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

| improve this answer | |
  • It won't let me save because it's read-only? – Matt Jul 25 '12 at 17:29
  • 5
    @Matt Edit with sudo nano /etc/network/interfaces, add the line, save and exit (Ctrl+O, ENTER, Ctrl+X). – Eric Carvalho Jul 25 '12 at 18:05
  • Works like charm.. – soham Sep 2 '16 at 20:55
  • 4
    In my case it was wifi0 instead of wlan0 (Lubuntu 16). Check ifconfig for the right device name. – Marian Jan 2 '17 at 14:58
  • 2
    Identifying the logical device name can get confusing. ifconfig is absolutely no help in this. Do a sudo lshw -C network to match the plain english descriptions to logical device name. For example, the builtin on my Dell Lattitude running Mint is wlp3s0 and the external wifi (usb) is wlx9cefd5fcd694. – tgm1024--Monica was mistreated Aug 9 at 18:58
22

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

run

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 off (type ifconfig to check, note that in the network manager the adapter still shows, but it is turned off). To turn it on again:

sudo ifconfig wlan1 up

and that's it.

| improve this answer | |
  • How can I find if the adapter I want to disable/enable is wlan1, wlan2 or something else? – mmj Nov 6 '15 at 7:49
  • 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. – Gerhard Burger Nov 6 '15 at 10:23
  • 4
    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. – mmj Nov 6 '15 at 14:15
  • Oh that does give a lot more information than netstat or ifconfig, nice! – Gerhard Burger Nov 6 '15 at 15:04
  • 1
    For me on 16.04 this causes the interface to disappear from ifconfig for a moment, but then it reappears and reconnects soon. – BeeOnRope Oct 25 '19 at 2:07
15

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
| improve this answer | |
  • 3
    If you wanted to blacklist eth1394 woudln't you uncomment the line or add a new line ? Otherwise this is what I needed thanks! – zayquan Feb 3 '15 at 23:35
  • 1
    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. – Joey Feb 22 at 22:39
  • @zayquan Thanks, not sure how i missed that – LnxSlck Feb 24 at 9:38
  • Did this and they still both appear. Btw, does having the default original wifi card connect to the same wifi network as my superfast usb wifi adapter slow down the overall speed? – mLstudent33 Sep 23 at 2:41
3

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.

| improve this answer | |
2

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.

| improve this answer | |
2

Connect usb wifi-dongle and disable internal wifi-adapter as below;

Identify your adapter name by ip link | grep wl or ifconfig | grep wl

The adapter name should resemble e.g wlp2s0 or wlan0 in which the digits in the words could be any number in your case.

Disable the adapter by sudo ip link set wlp2s0 down or sudo ifconfig wlan0 down and in your case replace the adapter name respectively.

This will ensure that only the usb wifi-adapter is active even though the internal wifi driver will still be active.

ALTERNATIVELY;

Disable internal wifi driver module;

sudo modprobe -r iwlmvm

This will ensure that only the usb wifi-dongle is active.

| improve this answer | |
1

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).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.