QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
541 stars 48 forks source link

wpa_supplicant stops working after suspend with debian-11 #7185

Open mtdcr opened 2 years ago

mtdcr commented 2 years ago

How to file a helpful issue

Qubes OS release

Brief summary

Every time my machine wakes up from suspend, the wireless connection is broken. Selecting a different network from nm-applet does not help. I need to restart wpa_supplicant manually to fix it.

Steps to reproduce

Expected behavior

Network connection gets restored.

Actual behavior

Network connection does not get restored.

unman commented 2 years ago

Whenever this sort of issue comes up, (and it does - see #6570, #5956,

3008) my thought is the same - I don't WANT my machine

to start spewing network data when it wakes from suspend. I'm (probably) in a minority.

mtdcr commented 2 years ago

Whenever this sort of issue comes up, (and it does - see #6570, #5956, #3008) my thought is the same - I don't WANT my machine to start spewing network data when it wakes from suspend. I'm (probably) in a minority.

While I understand your point, I want to make clear that this bug is not about personal preferences, but about software remaining in a disfunctional state after returning from suspend. Just to avoid confusion.

Warthog-Capital commented 2 years ago

This also happens to me. Wifi does not reconnect after resume from suspend.

Qubes OS release

4.1.1

Brief summary

On a fresh Qubes 4.1.1 installation, my Wifi connection does not come back after I suspend my laptop, and then start it again.

Solutions to make Wifi work again:

My laptop is Thinkpad T440P with Intel network card (iwlwifi). The template is debian-11. Fully updated, but the issue already happens right after the first start of Qubes OS.

Steps to reproduce

  1. Install Qubes 4.1.1
  2. Connect to wireless LAN
  3. Suspend laptop by closing it, or suspending via the XFCE panel menu,
  4. Resume laptop by opening it or pressing the start button
  5. Unlock the screen

Expected behavior

Wifi should reconnect automatically.

Actual behavior

The NetworkManager icon keeps spinning. Occasionally, a message toast pops up which says that "The network connection has been disconnected". After a few tries, it stops trying and my Wifi remains disconnected.

Some debug output from sys-net:

Possibly related issues

andrewdavidwong commented 2 years ago

restarting sys-net, by shutting down all other VMs that recursively depend on it, first

Just FYI, you don't have to shut down all dependent VMs. You can instead just set sys-firewall's NetVM to none, restart sys-net, then set sys-firewall's NetVM back to sys-net again.

unman commented 2 years ago

Sometimes, (if restart is absolutely necessary), qvm-kill sys-net && sleep 5 && qvm-start sys-net will do the the job. I have that saved.

mtdcr commented 2 years ago

FWIW, here's what I ended up with:

$ cat /etc/qubes/suspend-post.d/wpa-supplicant.sh 
#!/bin/sh
if systemctl -q is-active wpa_supplicant.service; then
    systemctl restart wpa_supplicant.service
fi