Skip to content

Commit

Permalink
free RAM before reloading wireless driver after suspend
Browse files Browse the repository at this point in the history
  • Loading branch information
Guiiix committed Feb 11, 2025
1 parent 3f276af commit 1f09402
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qubes-rpc/prepare-suspend
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ if [ "$action" = "suspend" ]; then
done
echo "$LOADED_MODULES" > /var/run/qubes-suspend-modules-loaded
else
# Free some RAM for minimal netvm to prevent memory issues when loading
# drivers
if [ -f /var/run/qubes/this-is-netvm ] && [ -f /var/run/qubes-service/minimal-netvm ]; then
sync
echo 3 > /proc/sys/vm/drop_caches
fi
# shellcheck disable=SC2013
for mod in $(cat /var/run/qubes-suspend-modules-loaded); do
modprobe "$mod"
Expand Down
1 change: 1 addition & 0 deletions qubes-rpc/qubes-suspend-module-blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ehci_pci
xhci_pci
iwldvm
iwlmvm
iwlwifi

0 comments on commit 1f09402

Please sign in to comment.