None of the methods described in the link work Prevent wireless from turning off when lid goes down
Power management from iwconfig is OFF.
Any suggestions, what else can be done?
None of the methods described in the link work Prevent wireless from turning off when lid goes down
Power management from iwconfig is OFF.
Any suggestions, what else can be done?
This guide is what helped solve the issue for me: http://tipsonubuntu.com/2018/04/28/change-lid-close-action-ubuntu-18-04-lts/
Basically, open your preferences using sudo gedit /etc/systemd/logind.conf and change the line starting with HandleLidSwitch to HandleLidSwitch=ignore
Run:
sudo nano /etc/UPower/UPower.conf
Set:
IgnoreLid=true
If on systemd, issue the following command:
sudo service upower restart
Only for HP Laptops:
open terminal
step 1: run
sudo nano /etc/systemd/system/hp-keycodes.service
step 2: paste script below in nano editor.
[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 it by pressing ctrl+s. then press ctrl+x to exit nano editor
step 3: run every step as follow:
sudo systemctl daemon-reload
step 4:
sudo systemctl enable hp-keycodes.service
step 5:
sudo systemctl start hp-keycodes.service
step 6: reboot your system.
The issue is still around on Ubuntu 20.04 with the latest kernel 5.4.0-51-generic, and perhaps other distros as well. It's a long standing bug (there is at least one bug report describing this behavior) with rather slim chances of being fixed, IMHO.
Some people report to have fixed it via BIOS settings, others - via blacklisting some or all of the wmi,hp-wmi,hp-wireless modules. None of the ad-hoc fixes have worked for me so far - blacklisting kernel modules, messing with setkeycodes, custom systemd services etc. etc.
Long story short, as @TWinters has pointed out, the only workaround is to avoid the network controller going in "hard blocked" mode in the first place. Once RF_KILL bit toggled to disable radio occurs, the only remedies are a hardware switch or reboot.
Since the "hardware switch" governed by hp-wireless usually does not work (e.g. fn+F12), the only way out appears to be disabling suspend on lid close or power button events.