You are not logged in.

#1 2013-05-13 09:52:11

farmerdave
Member
Registered: 2011-11-23
Posts: 114

[SOLVED] rfkill unblock all won't persist after reboot

I migrated my wireless network connection on my HP 6910p from netcfg to netctl, with quite a lot of trouble. For instance, immediately after a reboot my wireless interface would not even turn on. I needed to run

# ip link set wlan0 up

but would get the response "RTNETLINK answers: Operation not possible due to RF-kill". I found the solution to be

# rfkill unblock all

but this must be done each reboot. It also must be done before I even attempt to start a netctl profile, otherwise stopping the profile and unblocking the soft/hard switches doesn't allow a connection afterwards. The only way (it seems) is to run in order the "rfkill" command followed by a "netctl start profile" command.

I also tried to have a /etc/netctl/interfaces/wlan0 file with

PRE_UP="rfkill unblock all"

much in the style of netcfg, but this didn't work. How can I achieve a wireless connection after reboot without having to manually go through these commands each time?

Last edited by farmerdave (2013-05-14 07:58:21)

Offline

#2 2013-05-13 10:22:33

progandy
Member
Registered: 2012-05-17
Posts: 5,180

Re: [SOLVED] rfkill unblock all won't persist after reboot

You need a unit similar to this https://bbs.archlinux.org/viewtopic.php … 1#p1210751
Take care to add the necessary before/after lines to the service.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2013-05-13 10:38:19

sano
Member
Registered: 2012-02-11
Posts: 114

Re: [SOLVED] rfkill unblock all won't persist after reboot

progandy wrote:

You need a unit similar to this https://bbs.archlinux.org/viewtopic.php … 1#p1210751
Take care to add the necessary before/after lines to the service.

rfkill has a native unit for that, just enable it with:

#systemctl enable rfkill-unblock@all

Offline

#4 2013-05-13 11:12:38

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] rfkill unblock all won't persist after reboot

sano wrote:
progandy wrote:

You need a unit similar to this https://bbs.archlinux.org/viewtopic.php … 1#p1210751
Take care to add the necessary before/after lines to the service.

rfkill has a native unit for that, just enable it with:

#systemctl enable rfkill-unblock@all

Arch includes those in the rfkill package, but when I suggested those I didn't really think about ordering relative to devices and units like bluetooth and network. I'm not sure if you could configure the ordering to suit (almost) everyone, though, so perhaps it is okay to leave that open.

In this case, if you still need the ip command as well, you'll have to customize anyway, but you should be able to enable the unblock service and use a drop-in configuration file to add the ordering dependencies. Create dir /etc/systemd/system/rfkill-unblock@all.service.d (assuming this also works for instances of template units) and put ordering.conf in there with a [Unit] section containing lines such as Before=netctl.service, and a [Service] section with ExecStartPost=/usr/sbin/ip ....

Last edited by Raynman (2013-05-13 11:17:28)

Offline

#5 2013-05-13 21:05:13

farmerdave
Member
Registered: 2011-11-23
Posts: 114

Re: [SOLVED] rfkill unblock all won't persist after reboot

sano wrote:

rfkill has a native unit for that, just enable it with:

#systemctl enable rfkill-unblock@all

Using this approach has worked, and will just do a little more configuring for multiple profiles before marking as solved.

The question needs to be asked though, why was this even necessary to enable the soft unblock? One would think that the default should be to have your wireless switched on by default if present, as it has been for every other network connection method in Arch prior to this? This was more difficult to solve than it should have been!

Offline

#6 2013-05-13 21:06:37

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [SOLVED] rfkill unblock all won't persist after reboot

farmerdave wrote:

How can I achieve a wireless connection after reboot without having to manually go through these commands each time?

First of all, the fact that RFKill switch is toggled off is the kernel's fault. For example, it started happening on my laptop since linux 3.9.0.

There are 2 ways to solve your issue:
1 (simple). Use netctl's "RFKill=" option (see man netctl.profile).
2 (hard). Use rfkill-unblock@<type>.service ordered _before_ netctl@<profile>.service. Notice, <type> instead of "all". Using the latter is not necessary unless you want to unblock bluetooth, GPS, FM radio, etc.

The first way will work for a simple setup whan a card has only one RFKill switch (either soft or hard). The second way is more general and will work when you need to toggle several RFKill switches to activate a card (this is what I had to do). You can either use "rfkill list <idx>" with <idx>=wlan, wifi, gps, ... or "cat /sys/class/rfkill/rfkill?/{type,name}" to see which type your card belongs to.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#7 2013-05-14 08:22:28

effae
Member
Registered: 2013-05-07
Posts: 39

Re: [SOLVED] rfkill unblock all won't persist after reboot

Leonid.I wrote:

First of all, the fact that RFKill switch is toggled off is the kernel's fault. For example, it started happening on my laptop since linux 3.9.0.

There are 2 ways to solve your issue:
1 (simple). Use netctl's "RFKill=" option (see man netctl.profile).
2 (hard). Use rfkill-unblock@<type>.service ordered _before_ netctl@<profile>.service. Notice, <type> instead of "all". Using the latter is not necessary unless you want to unblock bluetooth, GPS, FM radio, etc.

The first way will work for a simple setup whan a card has only one RFKill switch (either soft or hard). The second way is more general and will work when you need to toggle several RFKill switches to activate a card (this is what I had to do). You can either use "rfkill list <idx>" with <idx>=wlan, wifi, gps, ... or "cat /sys/class/rfkill/rfkill?/{type,name}" to see which type your card belongs to.

I have this exact problem, my setup started soft blocking my wifi on startup after upgrading to 3.9.0. What were the changes that cause this behaviour?

e: (# systemctl enable rfkill-unblock@wlan.service - this fixed my problems)

Last edited by effae (2013-05-14 11:54:56)

Offline

#8 2013-05-15 04:45:22

koshak
Member
Registered: 2013-03-13
Posts: 35

Re: [SOLVED] rfkill unblock all won't persist after reboot

Is there a bugreport about this? After upgrade to 3.9.2 my wifi is also blocked.

Offline

#9 2013-05-15 21:00:50

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [SOLVED] rfkill unblock all won't persist after reboot

koshak wrote:

Is there a bugreport about this? After upgrade to 3.9.2 my wifi is also blocked.

Against what? I'm not sure if this is caused by the kernel or linux-firmware. Also, this might be a sane thing: if there is no way to store the state of the wifi card, on a cold boot, the radio is initialized in a disabled state. So it's really a question about defaults...


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

Board footer

Powered by FluxBB