OK, I have a very strange problem which recently started on my laptop (running Arch Linux) and it's got me really stumped!
Basically my battery ran out whilst I was away from my laptop and it shut down... Which shouldn't really be a problem. But when I plugged my laptop in and restarted it a little later on, I could no longer connect wirelessly to my home network or see any other nearby wifi networks. It used to auto-connect to my home network using wicd. And up until this problem started, tools like wifi-menu, wicd-curses and wicd-gtk would show all of my neighbours wifi networks alongside my own too. But nowadays it sees nothing! :(
After trying to connect to my home wifi network manually using wpa_supplicant I kept getting errors like:
Could not set interface wlan0 flags: Operation not possible due to RF-kill
As far as I understand it, rfkill monitors the state of any hardware / software switches that control the wireless card. For some reason it sees the hard switch as always off (hard blocked:yes), regardless of whether it is in the on or off position. So for some reason, something thinks that the actual 'hard' switch, the physical switch for the wifi card on the front of my laptop is off, and never registers that it has been turned on. Consequently the wireless card is never getting powered up....Very odd!
Running the command
rfkill list all yields the following output regardless of whether the wifi switch is on or off:
0: phy0: Wireless LAN Soft blocked: no Hard blocked: yes
rfkill unblock all or
rfkill unblock phy0 does not affect the Hard block, it would only reset the soft block. Which isn't the problem, because the soft block flag is never set!
So I'm completely stuck! I've tried unloading my wireless cards kernel driver module and using
rfkill unblock all before reloading the driver with modprobe (which I've seen mentioned in several places). I've tried removing /dev/rfkill, which has been recommended in several online articles I've seen too. But no matter what I do the wireless card is always disabled.
I've tried booting into some other distros (Crunchbang, Ubuntu, Fedora) and I have absolutely no problems connecting to my network via wifi. The switch for the wireless card works ok under the other distros too. Which leads me to believe that there is nothing wrong with my laptop or the wifi switch. So there must be a data file or configuration setting somewhere in my Arch install which either got corrupted, went out of sync, or had a dodgy value written to it when the battery ran out the other day. Whatever it is, it's causing the system to think that the wireless card is turned off.
I'm considering just cutting my losses and reinstalling Arch (which will probably solve the problem), but any suggestions anybody has would be most welcome because I would like to understand what has caused this issue!
Anyway, thanks in advance.