I have problems with airplane mode. Fixing them sounds insanely difficult. I think that I'd like to simply obliterate the existence of airplane mode, or airplane mode switching by means of any hardware event (perhaps still be able to enable it via command line?) I use airplane mode very rarely. Is there any way to do either of these things?
More details:
I bought an hp laptop (HP ENVY X360 15-EW1073CL) that has a touchscreen which can be opened all the way till it closes again on the other side. It also has an accelerometer to change the display rotation when I rotate it. It all works almost fine in ubuntu (even the display gets rotated accordingly, except for the normal position, but that's a problem for another day). The problem is that, whatever I do: move the laptop around, open or close the lid, or move the lid whatsoever, it will go into airplane mode.
It tried the hp keycodes service proposed at Why does "Airplane Mode" keep toggling on my HP laptop in Ubuntu 18.04?, but no luck. I think that possibly prevents airplane mode in one of the screen rotation thresholds (it seems that this laptop has about four of these rotation thresholds, each triggering aiplane mode switch)
I also ran showkeys to check what keycodes were being triggered when rotating, opening, etc. It's always 247 seemingly for all these events. I tried adding this 247 code to the list in the services solution, no luck either. Also, when I run sudo showkey --scancodes, the tilting does not produce any scancode.
This is the result of acpi_listen, and rotating the screen around:
sudo acpi_listen
A6FEA33E-DABF- 000000d0 00000000
A6FEA33E-DABF- 000000d0 00000000
A6FEA33E-DABF- 000000d0 00000000
video/tabletmode TBLT 0000008A 00000001
video/tabletmode TBLT 0000008A 00000001
A6FEA33E-DABF- 000000d0 00000000
A6FEA33E-DABF- 000000d0 00000000
A6FEA33E-DABF- 000000d0 00000000
video/tabletmode TBLT 0000008A 00000000
video/tabletmode TBLT 0000008A 00000000
A6FEA33E-DABF- 000000d0 00000000
A6FEA33E-DABF- 000000d0 00000000
button/lid LID close
button/lid LID open
And here is what happens when I rotate the laptop, presumably generating the accelerometer events:
sudo acpi_listen
A6FEA33E-DABF- 000000d0 00000000
video/tabletmode TBLT 0000008A 00000001
video/tabletmode TBLT 0000008A 00000001
A6FEA33E-DABF- 000000d0 00000000
A6FEA33E-DABF- 000000d0 00000000
video/tabletmode TBLT 0000008A 00000000
video/tabletmode TBLT 0000008A 00000000