SOLVED: Very odd Airplane mode behavior

As the title says, I’m having a very “odd” airplane mode behavior on one of 3 Ubuntu 20.04 Laptops.

Quick backstory:
I disabled automatic suspend in favor of blank screen after 15 mins and shutdown after 1 hour(on battery) due to waking up laptops Ubuntu 20.04 would not reconnect to our WiFi only Epson 410 printer without a reboot(or logout and log back in). Each of the 3 laptops are set to no require password when logging in and disabling password prompt on waking up from blank screen as well.

I also found that I had to edit logind.conf and uncomment HandleLidSwitch and set to “ignore” (HandleLidSwitch=ignore).

All was fine till today I noticed while doing updates and installing BeeBEEP LAN Messenger that my youngests HP was “ENTERING” Airplane mode on lid open. I know because I started a new ssh session into her laptop while the lid was closed and did sudo update sudo upgrade etc…

Once I opened her lid to install the BeeBEEP application and set an autostart launcher it kept entering Airplane mode everytime I OPENED the lid, not closing it as I could still start a new ssh session clear up to an hour after closing lid(on battery) and longer while plugged in.

I’m at a loss on this and looking for any suggestions.

Thanks,
Bill

For those that may encounter a similar situation:

I followed the second solution.

New Recommended systemd Method (type in a terminal):

sudo nano /etc/systemd/system/hp-keycodes.service

Paste the following lines or type them into the file:

[Unit]
Description=HP setkeycodes fix

[Service]
Type=oneshot
Restart=no
RemainAfterExit=no
ExecStart=/usr/bin/setkeycodes e057 240 e058 240

[Install]
WantedBy=rescue.target
WantedBy=multi-user.target
WantedBy=graphical.target

Save and confirm the filename with Ctrl+x, y. Then, type in a terminal:

sudo systemctl daemon-reload
sudo systemctl enable hp-keycodes.service
sudo reboot
2 Likes

Bravo on the solution @MrDeplorableUSA!
This is the first time I’m hearing of this Airplane Mode situation.Yes, I had issues where WiFi (under VPN) wouldn’t reconnect, so I’d simply shoot off the NordVPN service, restart NetworkManager and then re-activate the NordVPN service.

Found that issue solution as well but that particular laptop has no VPN configured, its configured in its router.

1 Like