Ubuntu Linux: "Wi-Fi is disabled by hardware switch" #

A weedy wireless on/off switch on an ancient Sony VAIO laptop suddenly started acting up:
Wi-Fi Network (Intel Vaio VGN-SZ795N C)
Wi-Fi is disabled by hardware switch
No problem - let's plug in a USB wifi adapter:
Wi-Fi Network (Intel Vaio VGN-SZ795N C)
Wi-Fi is disabled by hardware switch

Wi-Fi Network (Realtek 802.11n WLAN Adapter)
Wi-Fi is disabled by hardware switch
That's strange:
$ rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: yes
1: phy1: Wireless LAN
	Soft blocked: no
	Hard blocked: no
$ sudo rfkill unblock all
$ rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: yes
1: phy1: Wireless LAN
	Soft blocked: no
	Hard blocked: no
Won't bore you with all of the dead ends I explored (booting from a live CD, resetting the BIOS, removing the battery and draining the capacitors, performing all manner of mudras with the wifi switch, running a slew of esoteric commands I don't remember, etc); happily, I finally stumbled, exhausted, on Pfistodactyl's concise answer for disabling the built-in wifi adapter:
  1. $ lspci -v
  2. Note the value of "Kernel driver in use:" for the onboard wireless LAN controller (e.g., "iwl4965")
  3. Add the following line to /etc/modprobe.d/blacklist.conf: "blacklist iwl4965" (without quotes)
  4. Reboot
Happiness restored!

/nix | Dec 24, 2015


Subscribe or visit the archives.