Skip to content

Instantly share code, notes, and snippets.

@conorsch
Last active April 22, 2021 22:52
Show Gist options
  • Save conorsch/d038d676becd138d4b2228eb3096936a to your computer and use it in GitHub Desktop.
Save conorsch/d038d676becd138d4b2228eb3096936a to your computer and use it in GitHub Desktop.
Debugging loss of wifi functionality on Qubes, on a Lenovo Thinkpad T480

First, add the following to sys-net:/rw/config/suspend-module-blacklist:

iwlmvm
iwlwifi

Order is important. Then, copy this patch to sys-net, saving it as /home/user/prepare-suspend.patch:

--- prepare-suspend.orig    2021-04-22 15:27:35.977185499 -0700
+++ prepare-suspend.new    2021-04-22 15:26:01.263809185 -0700
@@ -62,7 +62,7 @@
     echo "$LOADED_MODULES" > /var/run/qubes-suspend-modules-loaded
 else
     # shellcheck disable=SC2013
-    for mod in $(cat /var/run/qubes-suspend-modules-loaded); do
+    for mod in $(cat /var/run/qubes-suspend-modules-loaded | sort -r); do
         modprobe "$mod"
     done
     rm -f /var/run/qubes-suspend-modules-loaded
     

Apply it with:

sudo dnf install -y patch
sudo patch /usr/lib/qubes/prepare-suspend < prepare-suspend.patch

Now close your laptop lid, wait a few minutes, and open it back up. Does wifi work after suspend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment