rfkill unblock all service does not work on ArchLinux

1

I'm trying to set up my HP EliteBook 2530p with ArchLinux. Everything works except for the wifi card which is hardblocked by default.

Typing rfkill unblock all works and unblocks the wifi card until I restart the computer.

I'd like to set up systemctl to start the rfkill unblock service when my computer starts, but systemctl enable rfkill-unblock@all.service doesn't work. The service symbolic link is created, but when I reboot the computer and log in I still need to unblock my card manually. The funny part is that systemctl start rfkill-unblock@all.service works.

I think that something re-blocks my card after it has been unblocked, but I can't figure out what...

I tried to follow these instructions https://bbs.archlinux.org/viewtopic.php?pid=1210751#p1210751 but it doesn't work for me...

Can someone help me? Thanks

Luda' オタク

Posted 2013-08-31T12:06:46.840

Reputation: 11

Can you show the output of systemctl status rfkill-unblock@all.service? – bennofs – 2013-08-31T17:08:06.517

@bennofs Okay:

rfkill-unblock@all.service - RFKill-Unblock all
Loaded: loaded /usr/lib/systemd/system/rfkill-unblock@.service; enabled)
Active: inactive (dead) since Sun 2013-09-01 00:19:17 CEST; 14s ago
Process: 179 ExecStart=/usr/bin/rfkill unblock %I (code=exited, status=0/SUCCESS) – Luda' オタク – 2013-08-31T18:22:00.200

Answers

0

Install and configure urfkill. This seems to work for me on Ubuntu:

# cat /etc/urfkill/urfkill.conf |grep '^[[:alpha:]]\|\['
[general]
user=root
master_key=true
force_sync=true
persist=true

midenok

Posted 2013-08-31T12:06:46.840

Reputation: 190

0

I also had a HP EliteBook 2530p with the same issue and solved it. To get my WiFi Card unblocked automatically I first followed the instructions from the link shared by Luda.

So first, create the file rfkill-unblock.service

nano /etc/systemd/system/rfkill-unblock.service

and inserted the following:

[Unit]
Description=RFKill-Unblock All Devices

[Service]
Type=oneshot
ExecStart=/usr/sbin/rfkill unblock all
ExecStop=
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Afterwards I enabled and started the startup-Script

systemctl enable rfkill-unblock.service
systemctl start rfkill-unblock.service

In a second step, I edited the /etc/wpa_supplicant/wpa_supplicant.conf accordingly.

nano /etc/wpa_supplicant/wpa_supplicant.conf

network={
        ssid="Name of AP"
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
        psk="Passphrase"
}

Finally I followed the archWiki and added the second unit, to bring the interface up and connect it to the AP on startup. Therefore, I created a file called wifi@[interface].service. [interface] must be replaced by the name (e.g. wlan0, wls1, etc.). The name can be retrieved with iw dev.

In my case I used the following commands:

iw dev
nano /etc/systemd/system/wifi@wls1.service

and put this text into the file.

[Unit]
Description=
#Wants=network.target
#Before=network.target
Wants=rfkill-unblock.service
After=rfkill-unblock.service
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainAfterExit=yes

ExecStartPre=/usr/bin/ip link set dev %i up
ExecStart=/usr/bin/wpa_supplicant -B -i %i -c /etc/wpa_supplicant/wpa_supplicant.conf
ExecStart=/usr/bin/dhcpcd %i
ExecStop=/usr/bin/ip link set dev %i down

[Install]
WantedBy=multi-user.target

I changed the the dependency of this service, so it is not started with the network but after the rfkill-unblock.service. Once again I enabled and started the script.

systemctl enable wifi@wls1.service
systemctl start wifi@wls1.service

In my case, my wifi-device seems to connect on startup.

I hope this is of any help to you.

T_Torture

Posted 2013-08-31T12:06:46.840

Reputation: 1