I have a small Acer Revo PC with Ubuntu 14.10 that I'm configuring to run as a portable media center.
I'm trying to set it up as a WiFi access point so that I can control XBMC/Kodi with Android devices via an app. This works fine so far.
However, I'm having trouble with the WiFi being soft blocked by rfkill on every startup.
- I tried unblocking it in /etc/rc.local (rfkill unblock wifi) but this doesn't work. Whatever is causing rfkill to block WiFi probably happens after rc.local is finished running.
- If I SSH into the PC fast enough after a reboot, I can see that WiFi actually works for a couple of seconds and then gets blocked. I can see the network on my smartphone as well, but it disappears shortly after showing up.
- I found the file that supposedly stores the rfkill state: /var/lib/rfkill/saved-state. Changing the line to phy0 0 or phy0 1 doesn't solve the problem. Also the file doesn't seem to change at all, so whatever stores the state doesn't work.
- I tried removing the upstart scripts for rfkill (/etc/init/rfkill-[re]store) – no improvement.
What worked for me was the following line in rc.local:
sh -c "sleep 10 && rfkill unblock wifi" &
But this is a crappy workaround, I have to disable the AP and DHCP services from auto-starting and start them "manually" in rc.local after unblocking WiFi.
What causes rfkill to block things at startup? How do I disable this?
Best Answer
I was just having this problem and
nmcli r wifi on
solved it. NetworkManager was killing the wifi after startup finished which is why startup script solutions didn't work for me.