WiFi disconnects on lid close

My WiFi is getting disconnected whenever I close the lid. Bluetooth etc. are remaining intact. This started happening after the latest update.
I’ve set it up to only lock the screen on lid close in the Advanced Power Management Settings.
WiFi doesn’t get disconnected if I lock the screen without closing the lid.
WiFi gets disconnected even if I set it to do nothing on lid closure.
Please help.

inxi -Fazy
System:
  Kernel: 5.10.2-2-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=fe64fafd-1c2a-4b55-846f-c264196ff166 rw nomce "acpi_osi=Windows 
  2018" quiet resume=UUID=4517ac81-4ac6-42a0-8e7a-a5870b5f98df 
  Desktop: KDE Plasma 5.20.4 tk: Qt 5.15.2 wm: kwin_x11 dm: GDM 3.38.2, SDDM 
  Distro: Manjaro Linux 
Machine:
  Type: Laptop System: HP product: HP Pavilion Laptop 14-bf1xx 
  v: Type1ProductConfigId serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: HP model: 83CE v: 59.38 serial: <filter> UEFI: Insyde v: F.31 
  date: 10/30/2017 
Battery:
  ID-1: BAT1 charge: 2.3 Wh condition: 31.1/42.1 Wh (74%) volts: 10.7/11.6 
  model: Hewlett-Packard PABAS0241231 type: Li-ion serial: <filter> 
  status: Unknown 
CPU:
  Info: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP 
  arch: Kaby Lake note: check family: 6 model-id: 8E (142) stepping: A (10) 
  microcode: E0 L2 cache: 8 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 32012 
  Speed: 800 MHz min/max: 400/1800 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 
  4: 800 5: 800 6: 800 7: 800 8: 800 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported 
  Type: l1tf mitigation: PTE Inversion 
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: conditional, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Hewlett-Packard driver: i915 
  v: kernel bus ID: 00:02.0 chip ID: 8086:5917 
  Device-2: NVIDIA GM108M [GeForce 940MX] vendor: Hewlett-Packard 
  driver: nvidia v: 455.45.01 alternate: nouveau,nvidia_drm bus ID: 01:00.0 
  chip ID: 10de:134d 
  Device-3: Chicony HP Wide Vision HD Camera type: USB driver: uvcvideo 
  bus ID: 1-5:4 chip ID: 04f2:b5d6 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 
  driver: modesetting,nvidia alternate: fbdev,intel,nouveau,nv,vesa 
  display ID: :0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 115 s-size: 424x238mm (16.7x9.4") 
  s-diag: 486mm (19.1") 
  Monitor-1: eDP-1 res: 1920x1080 dpi: 158 size: 309x173mm (12.2x6.8") 
  diag: 354mm (13.9") 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.1 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus ID: 00:1f.3 
  chip ID: 8086:9d71 
  Sound Server: ALSA v: k5.10.2-2-MANJARO 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8168 v: 8.048.03-NAPI modules: r8169 
  port: 3000 bus ID: 02:00.0 chip ID: 10ec:8168 
  IF: eno1 state: down mac: <filter> 
  Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel port: 3000 
  bus ID: 03:00.0 chip ID: 8086:095a 
  IF: wlo1 state: up mac: <filter> 
Drives:
  Local Storage: total: 1.03 TiB used: 544.99 GiB (51.9%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM035-1RK172 
  size: 931.51 GiB block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  serial: <filter> rev: RSM7 
  ID-2: /dev/sdb maj-min: 8:16 vendor: SanDisk model: SD8SN8U-128G-1006 
  size: 119.24 GiB block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  serial: <filter> rev: 0006 
Partition:
  ID-1: / raw size: 50 GiB size: 48.72 GiB (97.43%) used: 37.14 GiB (76.2%) 
  fs: ext4 dev: /dev/sdb5 maj-min: 8:21 
  ID-2: /boot/efi raw size: 277 MiB size: 276.4 MiB (99.80%) 
  used: 280 KiB (0.1%) fs: vfat dev: /dev/sdb1 maj-min: 8:17 
  ID-3: /home raw size: 60.87 GiB size: 59.67 GiB (98.02%) 
  used: 31.76 GiB (53.2%) fs: ext4 dev: /dev/sdb2 maj-min: 8:18 
Swap:
  Kernel: swappiness: 5 (default 60) cache pressure: 50 (default 100) 
  ID-1: swap-1 type: partition size: 8.1 GiB used: 2.58 GiB (31.9%) 
  priority: -2 dev: /dev/sdb3 maj-min: 8:19 
Sensors:
  System Temperatures: cpu: 36.0 C mobo: 29.8 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 328 Uptime: 23h 42m wakeups: 6 Memory: 7.69 GiB 
  used: 4.63 GiB (60.2%) Init: systemd v: 247 Compilers: gcc: 10.2.0 
  Packages: 1961 pacman: 1960 lib: 453 flatpak: 1 Shell: fish v: 3.1.2 
  running in: server inxi: 3.2.01 

I solved it (or so I thought). Had to edit my /etc/systemd/logind.conf to

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
#HandleRebootKey=reboot
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=no
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodes=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

and reboot.

EDIT: The problem is back after reboot.

1 Like

Deleting the file /etc/systemd/logind.conf altogether seems to have fixed my issue (it said in the file that deleting it restores defaults, so I don’t think it breaks anything else).
The fix has survived a reboot, so I hope it works as a permanent fix.

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