I've got a Lenovo ThinkPad Edge E520 laptop (model 1143-3BU). Whether running Ubuntu 14.04 or Linux Mint 17 Cinnamon, its wireless hot key Fn-F9 correctly generates the XF86WLAN keysym and reliably toggles the rfkill wlan soft block state. The problem is that the Network Settings GUI shows that Fn-F9 is toggling "Airplane Mode" rather than "Wireless" state. This means that if the GUI has been used to disable "Wireless", the user cannot enable wireless using what she rightly imagines to be the wireless hot key (Fn-F9).
As far as I can tell, Network Manager's idea of wireless state is recorded in /var/lib/NetworkManager/NetworkManager.state
as the "WirelessEnabled" parameter. However, nm-applet will display wireless state as "On" only if that parameter is true and "Airplane Mode" is off (which is not always the case). But what is the exact definition of airplane mode and where is that state recorded?
My current hypothesis is that airplane mode is nothing but a trivial state reflecting whether all RF devices are hard or soft blocked. The problem is that this laptop only has one RF device (ie. Wi-Fi). There is no Bluetooth. If I'm correct, then having only one device managed by rfkill means XF86WLAN effectively becomes an airplane mode control instead of the WLAN control it should be.
Under no circumstances does toggling Fn-F9 ever change the "WirelessEnabled" parameter in /var/lib/NetworkManager/NetworkManager.state
.
This laptop has no hardware switch for wireless and there is never a hard block reported by rfkill.
Whether or not an Ethernet cable is connected makes no difference to this problem.
How do I fix this so that Fn-F9 (XF86WLAN) actually toggles WLAN state instead of airplane state?
Some additional information:
##### kernel ############################
Linux 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
##### lspci #############################
08:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter [10ec:8176] (rev 01)
Subsystem: Realtek Semiconductor Co., Ltd. Device [10ec:8195]
Kernel driver in use: rtl8192ce
##### lsmod #############################
rtl8192ce 53550 0
rtl_pci 26690 1 rtl8192ce
rtlwifi 63475 2 rtl_pci,rtl8192ce
rtl8192c_common 53172 1 rtl8192ce
mac80211 626489 3 rtl_pci,rtlwifi,rtl8192ce
cfg80211 484040 2 mac80211,rtlwifi
##### NetworkManager.state ##############
[main]
NetworkingEnabled=true
WirelessEnabled=false
WWANEnabled=true
WimaxEnabled=true
##### NetworkManager.conf ###############
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false