Ubuntu – Airplane mode switch does not respond


HP Envy 15 x360 PC running Ubuntu 17.10 shows airplane mode ON and grayed out despite all the efforts.

(fn+f12) does not work.

Wifi/bluetooth are off and cannot be switched on using menus.

More details:

se@se-hp:~$ nmcli radio wifi on

se@se-hp:~$  rfkill list all
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes

lspci -knn | grep Net -A3
03:00.0 Network controller [0280]: Intel Corporation Wireless 7260 [8086:08b1] (rev c3)
Subsystem: Intel Corporation Dual Band Wireless-AC 7260 [8086:4070]
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi

ls /lib/firmware/*7260*
/lib/firmware/iwlwifi-7260-10.ucode  /lib/firmware/iwlwifi-7260-7.ucode
/lib/firmware/iwlwifi-7260-12.ucode  /lib/firmware/iwlwifi-7260-8.ucode
/lib/firmware/iwlwifi-7260-13.ucode  /lib/firmware/iwlwifi-7260-9.ucode

BIOS photo

Best Answer

My new HP computer also had some problems with wi-fi under Ubuntu. Slightly different model and problems, and I managed to fix the most of them, though.

I'm using an HP 15-bs048ns. Maybe you can try these methods, ordered by increasing desperation ‒ hope it helps.

(Please excuse me if you already tried some of them or they're really obvious. I don't know how knowledgeable are you at Linux, and it could help other users out there. I'll try to add links to related answers and pages, too.)

Try not holding the Fn key

You probably have already tried this, but, is your airplane key Fn + F12 or just F12? Some laptops, by default, require that you hold Fn for the F1...F12 keys and not for the special keys.

In my laptop, F12 is airplane, and Fn+F12 is F12. You can set your Fn key to work the traditional way from the BIOS, though. (F12 = F12, Fn+F12 = airplane)

(No matter what the setting, modifier keys work normally with function keys: Shift+F10 will never press the Play/Pause key.)

Airplane key won't work in a GUI - try from the text console

I have an airplane key in F12, but for some reason, it doesn't work under X or Wayland. But it works from the text console (TTY)

If I want to use the Airplane key, I need to:

  • Press Ctrl+Alt+F3 (no need to worry for the Fn key).
  • Type my username and password
  • Press the Airplane key
  • Press Ctrl+Alt+F2 to return to the GUI.

If my keyboard shortcuts to move between the TTY and the GUI don't work, just try different function keys (F1, F2... through F7)

Install a different module for your wi-fi

My computer didn't even have drivers for my wireless. Yours appears to, but they might not be working properly.

If you need to install new drivers, you'll need first to disable the Secure Boot in shim:

sudo mokutil --disable-validation

It will ask you for a one-time password. Don't bother using a good one, it only works until the next reboot.

You reboot, and when you encounter a blue screen reading “Press any KEY to perform MOK management”, press a key and follow the instructions. You'll probably need to type three separate characters from the password, suppose you used abcdefgh as password:

Type character 4 of password: d
Type character 8 of password: h
Type character 1 of password: a

Press Enter after every letter. Yes, these instructions look too detailed, but it's pretty common to screw up the first time (I did).

I don't know where you can find better modules for your computer. Mine works with lwfinger's drivers (my problems were only with the wi-fi; you'll probably need modules for both bluetooth and wifi).

In any case, if you find your module, it needs to be recompiled every time you upgrade the kernel (or else, the wireless interface and the wireless menus at Ubuntu disappear on your next boot.). You can set up DKMS to recompile them automatically every kernel upgrade ‒ I'm still testing this so I can't give you detailed instructions.

Reprogram your keyboard

I read somewhere (I'll link it if I find it) I could use the showkey command under the TTY to read key events straight from the kernel. And showkey -s to find the address of the pressed key.

Looking at the showkey man page, it doesn't directly read them from the kernel anymore, and the airplane key doesn't output any key event for me... even though it clearly works.

But my computer manages its wireless differently (I'm not sure I even have a hard lock), so it might work for you. If it sends some key event, you can reprogram the key to a different function ― maybe it will work.

You can read at the answer NicoTho that posted how to reprogram a key.

Related Question