10

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?

5 Answers 5

5

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
3
  • This obviously does not answer the question, which is how to do it without the rfkill command.
    – Flimzy
    Sep 28, 2016 at 19:05
  • @Flimzy, it isn't obvious. I got lost trying to follow what the objective is; couldn't tell if rfkill might not be installed on the system (just on a flash drive), or there might be a problem with the installation. It isn't even clear whether it's a package and needs to be installed, or is built into the kernel, but netlinker installed it as a package. My read was the OP just wants to get the job done, and rfkill could be a solution if it was working. If that's the case, this answer might not be totally off-target. The OP has been back since this answer was posted and didn't provide feedback.
    – fixer1234
    Sep 28, 2016 at 19:39
  • 1
    While this temporary solution will work once after a boot, the problem will remain with each subsequent boot.
    – reukiodo
    Mar 2, 2023 at 23:31
1

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

0

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

blacklist wmi

rfkill will show:

0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
5
  • When I do that, it doesn't work. wmi is still loaded. So I used 'install wmi /bin/false' and that stops it from loading. However, the rfkill problem remains. I will try to do the same thing through a Mint flash drive. Oct 6, 2014 at 20:50
  • ok, well it is a definite fix but as you mentioned it seems you need to restart some of the services for it to work correctly.
    – DarkEvE
    Oct 7, 2014 at 10:33
  • It's clearly not a definite fix. It didn't work at all. Oct 7, 2014 at 14:45
  • ok, I thought it would as i had a similar issue and it worked for me
    – DarkEvE
    Oct 7, 2014 at 14:46
  • this didn't work for me either, rfkill still randomly disables my WiFi
    – reukiodo
    Oct 24, 2023 at 4:39
0

There is a way. You can reach rfkill by using sysfs file system. I have tested this only on Debian though.

if you run systemctl without any parameters it lists everything it controls. In the devices list, you should find the rfkill device. And the name points to the sysfs path.

Name:

sys-devices-virtual-misc-rfkill.device ....    loaded active plugged ...

If you follow that path, you will see the device's parameters. But you cannot control the device from there. According to the kernel documents, the device control path is /sys/class/rfkill/rfkill*/. The asterisk denotes a number assigned to each device. In my situation, there is only 1 device which is rfkill0.

In the directory, you will see files named hard and soft. If you cat the files you will see the contents as 0 or 1. If hard is 1 this means a hardware switch or similar blocks the driver. This means there must be a hardware switch. If soft is 1 this means the software blocks the driver.

To unblock just put a 0 into the soft file like:

echo 0 > soft

Now if you ifup wlan0 it should start working.

When you restart your PC the setting will go blocking again. So you can create a systemd service that resolves the soft block.

-1

mint 19 and levono z560, (no bluetooth)

pc was rfkill hard block, not from hardware switch, nor keyboard.

unplugging the laptop power cord when the pc is off, (yes off) enables wifi, no rfkill block. My battery is weak, I think they block wireless if they think the battery is low.

fixed for me!!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .