Wifi disconnects when laptop is opened

I am having a problem with my laptop. The wifi keeps getting disabled when I open my lid. The laptop does not go to sleep when closed, just set to turn off screen. If I ping from another computer and close the lid I still have connection, but as soon as I open the screen the connection gets disconnected. I am running KDE.

I have looked though the logs and have found a few entries like this that seem to be related to the event:
Dec 04 00:01:27 JLaptop-Endeavour NetworkManager[520]: [1670133687.6955] device (p2p-dev-wlan0): state change: disconnected → unavailable (reason ‘supplicant-failed’, sys-iface-state: ‘managed’)
Dec 04 00:01:36 JLaptop-Endeavour kernel: ACPI: : failed to evaluate _DSM bf0212f2-788f-c64d-a5b3-1f738e285ade (0x1001)
Dec 04 00:01:36 JLaptop-Endeavour kernel: ACPI: : failed to evaluate _DSM bf0212f2-788f-c64d-a5b3-1f738e285ade (0x1001)
Dec 04 00:01:36 JLaptop-Endeavour kernel: ACPI: : failed to evaluate _DSM bf0212f2-788f-c64d-a5b3-1f738e285ade (0x1001)
Dec 04 00:01:36 JLaptop-Endeavour kernel: ACPI: : failed to evaluate _DSM bf0212f2-788f-c64d-a5b3-1f738e285ade (0x1001)
Dec 04 00:01:36 JLaptop-Endeavour kernel: ACPI: : failed to evaluate _DSM bf0212f2-788f-c64d-a5b3-1f738e285ade (0x1001)
Dec 04 00:01:36 JLaptop-Endeavour kernel: ACPI: : failed to evaluate _DSM bf0212f2-788f-c64d-a5b3-1f738e285ade (0x1001)
Dec 04 00:01:36 JLaptop-Endeavour kernel: ACPI: : failed to evaluate _DSM bf0212f2-788f-c64d-a5b3-1f738e285ade (0x1001)
Dec 04 00:01:43 JLaptop-Endeavour dbus-daemon[460]: [system] Activation via systemd failed for unit ‘dbus-org.freedesktop.home1.service’: Unit dbus-org.freedesktop.home1.service not found.

Output for system Info:
https://0x0.st/okvH.txt

Output for logs:
https://0x0.st/okv-.txt

I had this issue for a long long time. But it somehow got fixed automatically after the 6.0 kernel update. None of the suggestions in that post worked for me, but they might end up helping you out.

Yeah, I tried those before and it does not seem to work. It is weird because it did work before, but I did a reinstall to switch from Timeshift to Snapper. Now it acts weird.

I also have another problem this time around. I cannot get NoMachine to work. I have enabled the ports in firewalld, but I cannot connect to my laptop from my other devices. It is acting like the ports are closed, but everything is set up the same. where do I ask about setting up the firewall in the forums? I looked but could not find a networking subsection.

You can try posting in Newbie (even if you’re not a newbie, it’s meant for when you’re not sure where to post). If someone knows a better category, it can be updated.

1 Like

Dec 03 22:26:48 JLaptop-Endeavour NetworkManager[520]: <info> [1670128008.4795] device (p2p-dev-wlan0): state change: disconnected -> unavailable (reason 'supplicant-failed', sys-iface-state: 'managed')

must be related to the issue that device is not going into sleep… i saw this before I think…
Tried LTS kernel already? :wink:

UEFI: American Megatrends v: F.02 date: 07/30/2014
older machine … but is this latest firmware available?

Do you use the default power-profiles-daemon or TLP ?
systemctl status tlp power-profiles-daemon

It is old, a Windows 8 PC with a touch screen. It was 50 dollars and I was tired of broken screens so I found a touch screen thinking it would be more robust, which so far has worked.

I tried lts and is still acts up. It is running power-profiles-daemon. Should I replace it with TLP?

Also, I have no idea how to update the firmware.

ppd is known to not work nicely with AMD CPU yes and it has more options to set power saving up… but you could try disable it first to see if some powersaving option disturbing suspend to work…

sudo systemctl mask power-profiles-daemon or remove it completely sudo pacman -Rc power-profiles-daemon and reboot.

the hardware info do not show any proper device model so I could not check here:

Could be this one but only could be !! there are like 8 similar devices :wink:

But all showing firmware updates from 2018

HP is not offering a generic firmware update file it is only a windows executable… possible to run if you do dualboot or use something like hiren rescue cd

Looks like I’m still experiencing it. I’ve noticed something using acpi_listen. It shows this even called

button/wlan WLAN 00000080 00000000 K

and this is exactly when the issue happens. So I tried to ignore it using the following config:

/etc/acpi/events/anything
--------------------------
# Pass all events to our one handler script
event=.*
action=/etc/acpi/handler.sh %e
/etc/acpi/handles.sh
---------------------
#!/bin/bash
# Default acpi script that takes an entry for all actions

case "$1" in
...
    button/wlan)
        logger "WLAN button event. Ignoring..."
        ;;
...
esac

But it doesn’t seem to work.

I don’t know enough to figure it out and just accepted it. All I know is it only does it when the lid is opened and it is a newish problem. On my original install it never happened but after I reinstalled using the Neo ISO it started to happen. I might have to go back and do an offline install of Artemis then upgrade and see what happens.

Ok, so noticing the keypress was the key step for solving this. Looks like it’s a common issue for HP laptops. I’m surprised that I didn’t find out about this earlier.

The answer provided here ended up working for me. I used the systemd method. Might work for you too.

In case the answer gets down or something, you basically have to create the following systemd unit file:

/etc/systemd/system/hp-keycodes.service
----------------------------------------
[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

and then enable it using

sudo systemctl daemon-reload
sudo systemctl enable --now hp-keycodes.service

and that should be it!

1 Like

Thank you so much. I have been fighting this so long I just started to accept it as a permanent bug like Windoze or Manjaro.

Airplane mode? Wouldn’t that also disable bluetooth? I believe bluetooth was still enabled because my bt mouse was still working.

Oh well, it works and that is all that matters.

I don’t think “Airplane mode” is the accurate word here. It was triggering a button that toggles WLAN.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.