How do I stop rfkill module from hardblocking my wifi, without rfkill command?

I went into my BIOS the other day, didn't change anything, and rebooted. After this, my wifi was hardblocked. I looked online for solutions, and learned of the rfkill command. But I get

rfkill: command not found

However, in the startup messages, I see rfkill being called for something. I thought that perhaps it wasn't in the path for some reason. I'm sure it was. (I'll double check that tonight.)

I tried running Linux Mint off a flash drive, and the rfkill command told me that my wifi was hardblocked. I could unblock everything but the wifi hardblock.

There is no wifi switch on my computer. There is a wifi button the keyboard (F12) but it does nothing.

I'd like to know how to fix this obviously, but also I'd like to know why the hell this happened.

UPDATE! 2014.10.5 I've done some investigating and I want to share it, in case someone spots something that can solve this.

I rabbit-holed my way through the beginner's guide, and these are the results:

identify name of wireless interface

$ iw dev
wlp3s0

use wifi-menu to connect to a network

# wifi-menu wlp3s0
Scanning for networks... failed
No networks found

bring interface up

# ip link set wlp3s0 up                             
RTNETLINK answers: Operation not possible due to RF-kill

# rfkill list
bash: rfkill: command not found

I see mention of rfkill in the startup messages, but not in dmesg. rfkill works in Linux Mint flash drive. When I run that, it will change block on all except hard block. There is no hardware switch.

show loaded modules:

# lsmod

produces big list, which includes:

rfkill                 18867  4 cfg80211,toshiba_acpi,bluetooth
iwlwifi               156837  1 iwlmvm
cfg80211              454161  3 iwlwifi,mac80211,iwlmvm

# modinfo rfkill
filename:       /lib/modules/3.16.3-1-ARCH/kernel/net/rfkill/rfkill.ko.gz
license:        GPL
description:    RF switch support
author:         Johannes Berg <[email protected]>
author:         Ivo van Doorn <[email protected]>
depends:        
intree:         Y
vermagic:       3.16.3-1-ARCH SMP preempt mod_unload modversions 
parm:           master_switch_mode:SW_RFKILL_ALL ON should: 0=do nothing (only unlock); 1=restore; 2=unblock all (uint)
parm:           default_state:Default initial state for all radio types, 0 = radio off (uint)

Does that mean everything is blocked by default?

What happens if I blacklist rfkill? I created /etc/modprobe.d/blacklist.conf Inside it says:

 #do not load this.
 blacklist rfkill

Rebooting to see if this did anything... rfkill still loaded. Rebooted again... Got a stream of iwlwifi errors:

iwlwifi 0000:03:00.0:
Failed to load firmware chunk!
Could not load the [0] uCode section
Failed to start INIT ucode: -110
Failed to run INIT ucode: -110

I don't think that this is related to the new conf file because I had this error a few days ago. It doesn't happen every time. As far as the conf file goes: I guess it still loaded because something depends on it. If I still want to try to stop it, I can use the install command I read about.

But at this point, I think I should try to reinstall the firmware?
Does anyone have any input or ideas other than that?


Solution 1:

I had the same problem on my Raspberry.  A simple

sudo apt-get install rfkill

did the job.  I was then able to unblock my devices with

rfkill unblock all

Solution 2:

Add this line in /etc/modprobe.d/blacklist.conf:

blacklist wmi

rfkill will show:

0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

Solution 3:

check your udev rules... if there is a rule alike that, comment it out (or set ATTR{state}="1"):

# SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}="0"

while one can define the default state for the rfkill device with /etc/modprobe.d/modprobe.conf:

options rfkill master_switch_mode=2
options rfkill default_state=1

while in most cases, an ACPI or WMI module is responsible for dispatching the hardware buttons, which is not working properly and therefore leaving the radio in "hard off" state, impossible to enable through software. One can blacklist these module:

blacklist hp_wmi
blacklist acer_wmi
...

Ordinary lsmod | grep -e wmi -e acpi should show which one it is... while the listed module toshiba_acpi might be worth an attempt to blacklist toshiba_acpi (this might require another kernel switch, in order to have the back-light brightness working properly).

The rfkill command would even be available on Mint, while the output of rfkill list would be interesting, in order to determinate if it's a "hard block" (caused by hardware buttons) or "soft block".