WiFi disconnects on lid open (fresh install)

I just made a fresh install of EOS KDE and my WiFi is disconnecting whenever I open the lid of my laptop. Even if I select “Do nothing” in energy saving settings, it still happens. Please help.

inxi -Fazy

System:
  Kernel: 5.15.4-arch1-1 x86_64 bits: 64 compiler: gcc v: 11.1.0
  parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux
  root=UUID=ac20bde0-4782-4f94-9728-3c2cf386bfe5 rw rootflags=subvol=@ quiet
  resume=/dev/sdb2 loglevel=3 resume_offset=1907278 nowatchdog
  Desktop: KDE Plasma 5.23.3 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM
  Distro: EndeavourOS base: Arch 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: 41.9 Wh (99.1%) condition: 42.3/42.3 Wh (100.0%)
  volts: 12.8 min: 11.6 model: Hewlett-Packard PABAS0241231 type: Li-ion
  serial: <filter> status: Charging
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: EA cache: L2: 8 MiB
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 32012
  Speed: 800 MHz min/max: 400/4000 MHz Core speeds (MHz): 1: 800 2: 1006
  3: 1957 4: 1022 5: 800 6: 804 7: 878 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 class-ID: 0300
  Device-2: NVIDIA GM108M [GeForce 940MX] vendor: Hewlett-Packard
  driver: nouveau v: kernel bus-ID: 01:00.0 chip-ID: 10de:134d class-ID: 0302
  Device-3: Chicony HP Wide Vision HD Camera type: USB driver: uvcvideo
  bus-ID: 1-5:4 chip-ID: 04f2:b5d6 class-ID: 0e02
  Display: x11 server: X.org 1.21.1.1 compositor: kwin_x11 driver:
  loaded: intel,modesetting unloaded: fbdev,vesa alternate: nouveau,nv
  resolution: <missing: xdpyinfo>
  Message: Unable to show advanced data. Required tool glxinfo missing.
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 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.4-arch1-1 running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.40 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
  vendor: Hewlett-Packard driver: r8169 v: kernel modules: r8168 port: 3000
  bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel bus-ID: 03:00.0
  chip-ID: 8086:095a class-ID: 0280
  IF: wlan0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
  bus-ID: 1-4:3 chip-ID: 8087:0a2a class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: disabled
  rfk-block: hardware: no software: no address: see --recommends
Drives:
  Local Storage: total: 1.36 TiB used: 641.65 GiB (45.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
  type: HDD rpm: 5400 serial: <filter> rev: RSM7 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital
  model: WDS500G2B0B-00YS70 size: 465.76 GiB block-size: physical: 512 B
  logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 20WD
  scheme: GPT
Partition:
  ID-1: / raw-size: 465.47 GiB size: 465.47 GiB (100.00%)
  used: 26.83 GiB (5.8%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
  used: 576 KiB (0.2%) fs: vfat dev: /dev/sdb1 maj-min: 8:17
  ID-3: /home raw-size: 465.47 GiB size: 465.47 GiB (100.00%)
  used: 26.83 GiB (5.8%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
  ID-4: /var/log raw-size: 465.47 GiB size: 465.47 GiB (100.00%)
  used: 26.83 GiB (5.8%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 20 GiB used: 0 KiB (0.0%) priority: -2
  file: /swap/swapfile
Sensors:
  System Temperatures: cpu: 39.5 C mobo: 29.8 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 238 Uptime: 7m wakeups: 7 Memory: 15.55 GiB used: 1.46 GiB (9.4%)
  Init: systemd v: 249 tool: systemctl Compilers: gcc: 11.1.0 Packages:
  pacman: 948 lib: 221 Shell: Bash v: 5.1.8 running-in: konsole inxi: 3.3.07

first thing to do is to uninstall the r8168 legacy driver … it is known to interfere with devices like yours.
sudo pacman -R r8168

and if this do not help try setting up TLP or disable it… as we do enable this per default.

and if nothing helps… give log to see if it shows some hints:

journalctl --since "10 minutes ago" | eos-sendlog
right after wakeup

2 Likes

None of them worked.
Here’s the log you asked for.

If you close the lid then the Wifi is shutting down so when you open it it’s not working. Maybe a power setting on the Wifi card itself possibly but there is also settings for lid close maybe too.

Uninstalling the r8168 package is best as you don’t need it if your Ethernet works on the r8169 kernel module.

Your WiFi is Intel 7265 chip using iwlwifi module.

The question is your laptop in suspend mode or hibernation when you open the lid and it’s not connecting or is it powered off.

I see in the log it looks like it’s turning off and not turning back on when lid is opened?

Nov 24 17:31:01 sintan-laptop wpa_supplicant[684]: wlan0: CTRL-EVENT-DISCONNECTED bssid=98:52:4a:4a:c4:6a reason=3 locally_generated=1
Nov 24 17:31:01 sintan-laptop NetworkManager[397]: <info>  [1637796661.5356] manager: rfkill: Wi-Fi now disabled by radio killswitch
Nov 24 17:31:01 sintan-laptop NetworkManager[397]: <info>  [1637796661.5359] device (wlan0): state change: activated -> unavailable (reason 'none', sys-iface-state: 'managed')
Nov 24 17:31:01 sintan-laptop wpa_supplicant[684]: rfkill: WLAN soft blocked
Nov 24 17:31:01 sintan-laptop wpa_supplicant[684]: rfkill: WLAN soft blocked
Nov 24 17:31:01 sintan-laptop NetworkManager[397]: <info>  [1637796661.5661] dhcp4 (wlan0): canceled DHCP transaction
Nov 24 17:31:01 sintan-laptop NetworkManager[397]: <info>  [1637796661.5662] dhcp4 (wlan0): state changed bound -> terminated
Nov 24 17:31:01 sintan-laptop NetworkManager[397]: <info>  [1637796661.5670] dhcp6 (wlan0): canceled DHCP transaction
Nov 24 17:31:01 sintan-laptop NetworkManager[397]: <info>  [1637796661.5670] dhcp6 (wlan0): state changed bound -> terminated
Nov 24 17:31:01 sintan-laptop NetworkManager[397]: <info>  [1637796661.5704] device (wlan0): set-hw-addr: set MAC address to EA:3D:B4:A5:E3:A6 (scanning)
Nov 24 17:31:01 sintan-laptop NetworkManager[397]: <info>  [1637796661.5778] manager: NetworkManager state is now DISCONNECTED
Nov 24 17:31:01 sintan-laptop wpa_supplicant[684]: nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
Nov 24 17:31:01 sintan-laptop NetworkManager[397]: <info>  [1637796661.6651] device (p2p-dev-wlan0): state change: disconnected -> unavailable (reason 'supplicant-failed', sys-iface-state: 'managed')
Nov 24 17:31:01 sintan-laptop wpa_supplicant[684]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Nov 24 17:31:01 sintan-laptop systemd-logind[398]: Lid opened.
Nov 24 17:31:01 sintan-laptop kded5[1002]: plasma-nm: Network connectivity limited, scheduling notification
Nov 24 17:31:04 sintan-laptop tlp[5253]: Warning: systemd-rfkill.service is not masked, radio device switching may not work as configured.
Nov 24 17:31:04 sintan-laptop tlp[5253]: >>> Invoke 'systemctl mask systemd-rfkill.service' to correct this.
1 Like

Actually, the WiFi is on when the lid is closed (I verified by pinging the device), it’s only turning off when the lid is opened.

I’ve already uninstalled the r8168 package as @joekamprad suggested.

It’s none of them. I’ve set it up to only lock the screen, and what it’s doing, except for this bug. Even if I choose “do nothing” in the KDE settings, it still happens.

Very strange? I have an HP and running KDE no issues. I see the log shows Bluetooth is disabled? Is it turned off or doesn’t work? Not installed or set up?

Now that you mention it, bluetooth is not working. Which is weird, as it worked flawlessly in the Manjaro KDE that I used before. First of all, bluedevil wasn’t installed, which is weird. I installed it, but still bluetooth won’t show up in the system tray.

I can’t connect devices as well. It shows “Setup has failed” when trying to pair. But the entry gets added. But when I try to connect, it shows br-connection-profile-unavailable.

Edit : This is what I get when I try to pair :

bluedevil.wizard: Manager initialized
bluedevil.wizard: Initialize Discover Page
bluedevil.wizard: Starting scanning
bluedevil.wizard: Stopping scanning
bluedevil.wizard: PIN:  "0000"
bluedevil.wizard: Device type:  "headphones"
bluedevil.wizard: Legacy:  false
bluedevil.wizard: From DB:  true
bluedevil.wizard: PIN:  "0000"
bluedevil.wizard: Initialize Pairing Page
bluedevil.wizard: Pairing finished:
bluedevil.wizard:        error     :  false
bluedevil.wizard:        errorText :  ""
bluedevil.wizard: Initialize Connect Page
kf.bluezqt: PendingCall Error: "br-connection-profile-unavailable"
bluedevil.wizard: Connect finished:
bluedevil.wizard:        error     :  true
bluedevil.wizard:        errorText :  "br-connection-profile-unavailable"
bluedevil.wizard: Initialize Fail Page
bluedevil.wizard: Wizard done:  0

Edit2 : It started working after doing this.
sudo pacman -S pulseaudio-alsa pulseaudio-bluetooth bluez-utils bluez
And the system tray thing was due to me making the latte-dock profile read-only.

Did you follow the wiki? Did you enable it?

Yes, it started working after installing some packages as I mentioned in my previous post after edit. But the WiFi closing while opening lid is still there. I should mention though that it magically disappears in some boots, and stays that way as long as I hibernate. But it comes back after reboot.