Skip to content

Free some memory on resume before re-loading modules #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
# Force some apps into swap, to free memory for wifi drivers to be loaded
# in a moment. Some of those allocations cannot trigger swappin on their
# own. It's ok for this command to use more memory than VM has RAM. But it
# cannot exceed swap size.
dd if=/dev/zero of=/dev/null bs=512M count=1 status=none
echo 1 > /proc/sys/vm/compact_memory
# Free some RAM for minimal netvm to prevent memory issues when loading
# drivers
if [ -f /var/run/qubes-service/minimal-netvm ]; then
Expand Down