Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
Can you show the output of systemctl status rfkill-unblock@all.service? –  bennofs Aug 31 '13 at 17:08
    
@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' オタク Aug 31 '13 at 18:22

1 Answer 1

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 I created 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=
Remain AfterExit=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

ExecStart=/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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.