Score:0

Airplane mode turns on automatically when I switch to tablet mode

er flag

My problem is that when I turn my computer (HP envy x360 2 in 1 15'' with Windows 11 and Ubuntu 22.04.1 LTS on Wayland) in tablet mode the airplane mode is automatically activated, and a few seconds later it deactivates. However this is quite annoying when I use the internet. From the research I've done it appears to be a common problem among HP convertibles on linux, but all the solutions I've tried have not worked. However, following the procedure indicated in this discussion the problem was solved, but the touchpad, touchscreen and pen stopped working... what can i try? Thank you, sim.dll

N.B.: Many solutions I've found on the net say to create a systemd service, I've tried several times but it's useless. From what I understand other users using ubuntu 22.04 also have this problem.

Score:0
ee flag

UPDATE: This solution is obsolete, I found a better solution that addresses the root of the issue. There is a bug in Intel's HID driver, to fix, follow the instructions at https://askubuntu.com/a/1483259/1688756

TL;DR: https://github.com/snyball/hawck. Use this tool to remap Keycode 255 to a null character and the problem's solved. Worked like a charm on Ubuntu 22.04 Wayland.

The issue here is that whatever driver Linux uses for the lid/tablet mode switches erroneously interprets them as generating Keycode 255 (or 247, depending on... stuff. I never quite figured out why it's sometimes one or the other). Keyvode 255 happens to be the rfkill key, which puts the system into airplane mode.

It took me so. freaking. long. to fix this. I tried messing with DKMS, I tried using Xmodmap (which actually worked for awhile, until I realized X11 was messing with my touchpad), I ran a program in the background that constantly ran rfkill unblock all, and I even tried disabling the keycode at the kernel level. What finally worked? A free and open source program called Hawck.

Hawck (https://github.com/snyball/hawck) is by far the best solution for this issue, at least until whatever malfunctioning kernel driver is updated. It's desktop-agnostic (heck, it even works in console mode), it's designed to be run on startup, and unlike Xmodmap it's modular and scriptable. What I did was I created a script called "fixapmode.hwk" (the name doesn't matter), with the following contents:

key(255) => insert ""

(If you replicate my method, please keep in mind there is NO SPACE between the quotation marks).

I then set the script as executable, enabled it in Hawck, set Hawck to run on startup, and it worked! The only lingering issue was that my laptop would still start in Airplane mode, since Hawck didn't immediately kick in on boot. I solved that issue by making a new startup program with the command rfkill unblock all. With that, I can say that the problem is completely fixed. The only annoying thing is that the first time you login from boot, you'll get a notification from Hawck letting you know it loaded your script successfully. However, there's probably a way to turn this off, and it's much much better than the alternative.

Hope this helps. Cheers!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.