Automatic Suspend happens once I close the my laptop lid or it is idle for a certain time. In suspend mode, Screen and other parts of the computer switch off to save power more info here.
When I resume my session, Airplane mode is still on and I am not able to set it to off. It says turn off using the hardware switch, but my button doesn't respond.
This only happens after system goes into Suspend mode and comes out of it. All other times my Airplane switch key on my HP Laptop works fine and i can set it on/off.
Here is detailed info of my system. I'm using Ubuntu 20.04 in one of the partition.
Question
How do I fix this Suspend mode ?
PS: It is pain in the ass to restart system every time it goes into suspend mode.
Airplane Mode turning on automatically after suspend is a common problem with many HP laptops running Gnome. This is a fix for the same: (Source: @Nicholas Stommel's answer to this question)
Create and open this file in an editor
Paste the following:
Save and close with ctrl+s, ctrl+x
Enable the script and reboot
If you wish to stop your laptop from suspending at all, turn off Automatic Suspend under Power in Settings.