I've read about two dozen various other similar issues, and none of those solutions have worked for me.
I'm running a dual boot of Windows 10 and Ubuntu 18.04 on an HP Pavillion, and whenever I'm running Ubuntu and I close the lid, airplane mode turns on (hard on, not soft on). I can turn it off by restarting my laptop, but that isn't practical to do every time.
I've tried F1-F12, and FN+F1-F12, and those don't turn airplane mode off. When I run sudo rfkill list all
I get:
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes
Running sudo rfkill unblock all
doesn't change anything.
EDIT: I've already tried this, and it didn't work.