Airplane mode automatically turns on

When I close my lid and then re-open it, airplane mode turns on automatically.
How do I fix this?
kernel : zen 5.17
DE : gnome 42.1
Model : Hp notebook 15

first of all welcome to the purple fun :enos:

This looks like it does not set ti back to non-airplane mode when wake up from sleep…
We do install and enable power-profiles-daemon per default, so i bet that you do not change that?

The reason for what you got could be some settings on the wifi driver itself and something that goes wrong with p-p-d …

could you give some hardware details and the journal in between this happens would tell a story also:

inxi -Fxxc0z --no-host | eos-sendlog
right after waking from lid close and got the issue:
journalctl --since "10 minutes ago" | eos-sendlog

Sorry for my late reply, I’ve been distro hopping since 3 days but I’m back to endeavour again :laughing:
Here’s the logs before closing the lid:
https://clbin.com/c8hSj
After closing the lid:
https://clbin.com/NGOgI
After looking at the logs, I think the issue arised due to the keycode for flight mode being pressed while closing the lid .
May 15 13:42:20 biplop-hplaptop15bs0xx kernel: atkbd serio0: Unknown key pressed
(translated set 2, code 0xd8 on isa0060/serio0).
May 15 13:42:20 biplop-hplaptop15bs0xx kernel: atkbd serio0: Use 'setkeycodes e058
’ to make it known.
May 15 13:42:20 biplop-hplaptop15bs0xx kernel: atkbd serio0: Unknown key released
(translated set 2, code 0xd8 on isa0060/serio0).
May 15 13:42:20 biplop-hplaptop15bs0xx kernel: atkbd serio0: Use 'setkeycodes e058
’ to make it known.
May 15 13:42:20 biplop-hplaptop15bs0xx systemd-logind[442]: Lid closed.
I tried using the setkeycodes command but couldn’t fix it anyway.

<info> [1652601440.4517] device (wlan0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')

gnome-keyring-daemon[834]: couldn't initialize slot with master password: The password or PIN is incorrect

gnome-shell[885]: An active wireless connection, in infrastructure mode, involves no access point?

shows some errors but not sure what is the issue :wink:
what i see is that NetworkManager is shuting down and also avahi-daemon but wpa_supplicant looks like not stopping and tries to connect wifi:

  1. NetworkManager[470]: [1652601440.3810] device (wlan0): state change: deactivating → disconnected (reason ‘sleeping’, sys-iface-state: ‘managed’)
  2. avahi-daemon[439]: Withdrawing address record for fe80::561e:5596:e04b:1f46 on wlan0.
May 15 13:42:20 biplop-hplaptop15bs0xx wpa_supplicant[566]: p2p-dev-wlan0: CTRL-EVENT-DSCP-POLICY clear_all
May 15 13:42:20 biplop-hplaptop15bs0xx wpa_supplicant[566]: p2p-dev-wlan0: CTRL-EVENT-DSCP-POLICY clear_all
May 15 13:42:20 biplop-hplaptop15bs0xx wpa_supplicant[566]: nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
May 15 13:42:20 biplop-hplaptop15bs0xx wpa_supplicant[566]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
May 15 13:42:20 biplop-hplaptop15bs0xx wpa_supplicant[566]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
May 15 13:42:20 biplop-hplaptop15bs0xx wpa_supplicant[566]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
May 15 13:42:20 biplop-hplaptop15bs0xx gnome-shell[885]: An active wireless connection, in infrastructure mode, involves no access point?

May 15 13:42:33 biplop-hplaptop15bs0xx systemd-sleep[74889]: System returned from sleep state.
NetworkManager[470]: <info> [1652601456.9665] device (wlan0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')

So what could be is that connection was dropped because unavailable wrongly by the fact that wpa_supplicant calls to connect but system deactivated the wifi device already… ?

rfkill list all

after suspending says what?

After rfkill list all command, the output is
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
Isn’t it due to the power saving mode being turned on for wifi (wlan0)?