Networking Not Recognising WiFi After Sleep Mode

Continuing the discussion from Strategy for the first 1000+ hours on Qubes:

1 Like

Instead of restarting all qubes, you should be able to just restart
sys-net - you can just chain kill and start together and associate it
with a script or keyboard shortcut.

Thanks :slight_smile:

Didn’t really work in the start at least, whenever I restarted sys-net it did not trigger whatever event that reconnects wifi… Instead the wifi connection appears as Ethernet, the Qubes get an IP but sys-net doesn’t connect properly…

Works for me every time.
I don’t know what you mean by “appears as Ethernet”.

What hardware are you using?
What version of Qubes?
What template are you using for sys-net?

If you allocate only WiFi to sys-net,(remove wired NIC), does the restart work then?

I have the exact same problem with Qubes OS 4.0.3/4.0.4/4.1

My first solution was to restart sys-net, but it’s just taking to much time

The faster solution I found is just to do in a sys-net terminal :

systemctl restart NetworkManager

And the wifi will work again no problemo :call_me_hand:

1 Like

I’m responding for him

NetworkManger & co will not see the wifi interface anymore for whatever reason once out of suspend mode, and so the icon and the top right for NetworkManager will not show the usual wifi icon but instead the ethernet interface icon as it dont have the wifi interface anymore. And that the ethernet interface are the only one left for Network Manager.

But I think it’s more a linux problem than a qubes os problem as I got the same behavior in the past with other computer with debian, fedora, linux mint …

And so restarting with systemctl restart NetworkManager do the job to fix it

Great, thanks! Will. try that tomorrow, for now I’m back in OSX unfortunately…

1 Like

Works great!

Also added it to /usr/lib/pm-utils/sleep.d simply by adding it to the script there. I see others recommend adding it as a separate script like this:

#!/bin/bash

case "$1" in
  hibernate)
    # put commands to run on hibernation here
    ;;
  thaw)
    # put commands to run when returning from hibernation here
    ;;
  suspend)
    # put commands to run on suspend here
    ;;
  resume) 
    # put commands to run when returning from suspension
    ;;
esac

[quote=“quququbebebe, post:5, topic:4509”]
systemctl restart NetworkManager
[/quote] is then simply added at the end.

This issue could be due to a kernel regression. I had the same problem with my debian-10-minimal based sys-net. Trying systemctl restart NetworkManager didn’t make a difference. It seems that the root of the problem was using a 5.4.x kernel in buster, since using 4.19.x did not cause networking issues after waking from sleep mode.

Upgrading to bullseye (debian-11-minimal) solved the problem.

1 Like

Thanks!

In the meantime I’ve decided to try avoid wifi altogether, we’ll see how that goes…

Might just have a disk with Mint on it to swap out if I take the Lenovo to a café or such, trying to separate real work on PCs with a desk with being offline when around in the real world :slight_smile: