You are not logged in.
Pages: 1
Topic closed
After I suspend my laptop and wake it up, WiFi and bluetooth cease working, saying hardware airplane mode is activated and I need to toggle it with hardware switch. However, Fn+F12 (airplane icon) has no effect and there don't seem to be any other options.
Laptop is HP 340S G7, its wireless card is Intel AX 201, it runs daily updated Arch Linux with GNOME 40.4.
There are many such questions on the internet, however none has the same laptop model and the only thing that helped so far is disabling suspend, including on lid closure (I did the latter with gnome tweaks easily). I can generally live with that, but sometimes feel like there might be a more satisfying solution.
Short about the other suggestions I tried:
Adding "acpi_osi=! acpi_osi='Windows 2009'" to GRUB_CMDLINE_LINUX_DEFAULT makes WiFi and touchpad not work after reboot. Many other Windows versions and Linux do the same thing. Some options, e.g. 'Windows 2016', don't seem to break anything but don't help with the suspend issue.
Systemd units/scripts that disable WiFi before suspend (I figured in my case it'd be removing iwlwifi module) and enable it again after don't help.
Blacklisting/removing hp-wmi and/or hp-wireless modules didn't help.
Actually, I just have been able to remove iwlmvm (including iwlwifi), hp-wmi, hp-wireless, wmi-wmof modules before suspend, but after it I loaded iwlmvm back and hardware airplane mode was on again.
setkeycodes scripts don't make any difference, they seem to solve the problem of switch to software, and not hardware airplane mode.
Installing linux-firmware-git or linux-firmware-iwlwifi-git didn't help, the default linux-firmware seems quite fresh already.
Last edited by misharash (2021-08-29 23:34:29)
Offline
Hi misharash
i have the same laptop and I have the same issue.
I have tried to apply all your solutions too but also for me these didn't solve the wirless issue.
If you find a solution please post it here, I'll do the same
Thanks
Offline
That's a BIOS/firmware bug, update your BIOS/UEFI
Offline
Thanks V1del
my firmaware
~$ sudo cat /sys/class/dmi/id/bios_version
F.21
on hp site I found (https://support.hp.com/it-it/drivers/se … c/30268685)
F.21 Rev.A 31.3 MB 11 ago 2021 (windows version)
But I don't understand if them are the same version or F21 is older than F.21 Rev.A
Offline
Thanks V1del.
My BIOS/EFI firmware is clearly older:
~$ sudo cat /sys/class/dmi/id/bios_version
F.13
However, I don't have Windows installed, which makes BIOS update for this model fairly troublesome. It'd be clearly better to know beforehand whether it can actually help, and liuk78's message makes me doubt that.
Last edited by misharash (2021-09-25 02:15:56)
Offline
So I've actually updated BIOS (via installing Windows temporarily, nothing else seemed to work, even with other non-HP Windows laptop) to F.21 Rev.A from HP website and I guess my situation now is identical to liuk78's:
% sudo cat /sys/class/dmi/id/bios_version
F.21
and the hardware airplane mode is still there.
Offline
Its 2024. Im on my HP 15-daxxx with the latest firmware (F.45) and yet im having the same problem. Each time i close my laptop and reopen it, it enabled airplane mode. I didnt have this problem in debian tho. my systemd/logind.conf seems pretty normal.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#SleepOperation=suspend-then-hibernate suspend
HandlePowerKey=ignore
HandlePowerKeyLongPress=ignore
#HandleRebootKey=reboot
#HandleRebootKeyLongPress=poweroff
#HandleSuspendKey=suspend
#HandleSuspendKeyLongPress=hibernate
#HandleHibernateKey=hibernate
#HandleHibernateKeyLongPress=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#StopIdleSessionSec=infinity
Offline
nevermind found a fix on https://askubuntu.com/questions/1156932 … se-the-lid
"
I had the same problem. (Do you have a HP laptop?)
The next steps will test if you have the same problem as I had and also will provide solution. It is based in a very useful comment from usser "ebin92" on reddit about this topic.
TEST
We gonna check if the open/close lid event is sending scancodes and, if so, remap them
Open a terminal and type: <journalctl -f>
Then open and close the lid, and check in the terminal for an unknown scancode (in my case they were "e058" and "e057")
Remap the scancodes that your lid are sending to DISPLAY OFF code (you can remap it to another keycode if you want) For that, use >> setkeycodes [SCANCODE] [KEYCODE] In my case, >> setkeycodes e058 245 e057 245
Try again opening and closing your lid and if the problem is solved, lets make it permanent.
PERMANENT FIX
We are going to enable a new systemd service to remap the scancodes on boot up
Open a terminal and go to /etc/systemd/system. Execute next steps as superuser
Create a new file with name format "YOURNAME.service". In my case it was "lidbehaviour_override.service"
Put inside the attached content (see below) and edit the keycodes to your case
Give to the file execution permissions, running >> sudo chdmod a+x FILENAME In my case >> sudo chdmod a+x lidbehaviour_override.service
Test everything is fine running the service. For that: · reload the daemon configuration (all you have modified in systemd) with sudo systemctl daemon-reload · run the new service with sudo systemctl start YOURNAME.service In my case systemctl start lidbehaviour_override.service · Open and close the lid
If everything went right, then make the service starts on boot up sudo systemctl enable YOURNAME.service In my case systemctl enable lidbehaviour_override.service
SYSTEMD SERVICE CONTENT
[Unit]
Description=Fix aeroplane mode on/off when lid opens/closes
[Service]
ExecStart=/usr/bin/setkeycodes e058 245 e057 245
[Install]
WantedBy=multi-user.target
"
Offline
Closing this old thread.
Offline
Pages: 1
Topic closed