How to disable WiFi in Raspberry Pi4, possibly keeping the chip powered off.
-
1Does one of the answers solve your question? It should. Please accept one to finish the question. – Ingo Oct 25 '19 at 09:40
3 Answers
Raspbian is managing hardware with overlays. In /boot/overlays/README you will find:
Name: pi3-disable-wifi
Info: Disable Pi3 onboard WiFi
Load: dtoverlay=pi3-disable-wifi
Params: <None>
I suggest you just add
dtoverlay=pi3-disable-wifi
to /boot/config.txt to disable wifi. I have tested it with a Raspberry Pi 4B. It is also valid for Pi4. When disabled you will not get a WiFi interface wlan0 as you can check with ip -br addr.
UPDATE:
@JeffAtwood noted in his comment
They renamed it to
disable-wifiso you can use that,pi3-disable-wifiwas kept as a synonym for compatibility. Same thing with disabling bluetooth.
2019-10-25: seems everything is documented now in /boot/overlays/README.
- 42,107
- 20
- 85
- 197
-
Has anyone tested this? I don't really want to risk bricking my pi based on an assumption :) – Wossname Jul 16 '19 at 18:05
-
1
-
-
4One small tweak, they renamed it to
disable-wifiso you can use that,pi3-disable-wifiwas kept as a synonym for compatibility. Same thing with disabling bluetooth. – Jeff Atwood Jul 22 '19 at 09:11 -
@JeffAtwood I cannot find it in the official documentation
/boot/overlays/README. Where do you get it? – Ingo Jul 22 '19 at 10:40 -
@JeffAtwood At the moment, using latest Raspbian Buster, using disable-wifi simply does not work. – Zuzu Corneliu Sep 14 '19 at 20:19
-
4@Ingo Looking in
/boot/overlays/READMEfrom the September release of Raspbian Buster I can now seedisable-btanddisable-wifidocumented. – Heinrich Ulbricht Oct 24 '19 at 21:29 -
Is there a way to enable/disable this on every boot? I don't want to use Wi-Fi if Ethernet is connected. – Eric P Pereira Aug 09 '20 at 06:02
-
I am using Fedora 34 server image on Raspberry 4, there you find
config.txtunder/boot/efi. – Erich Kuester Oct 05 '21 at 12:59 -
Thanks for the answer, and +1. Do you know whether this also turns off the power to the WiFi module? After all, we'd like not only the device (in the file system) to vanish, but also not be subject to radiation any more. – Binarus Nov 26 '22 at 19:15
Use rfkill block wifi and reboot to disable and rfkill unblock wifi and reboot to enable it again.
- 211
- 2
- 5
Create /etc/modprobe.d/brcm-blacklist.conf with the following content:
blacklist brcmfmac
blacklist brcmutil
Reboot, and WiFi should be disabled. You may find errors in the system log depending on what method you are using to configure the network. You can choose to correct those, or not, of course.
- 520
- 3
- 5