Skip to content
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

Allow resume from hibernation #58

Merged
merged 1 commit into from
Jul 24, 2024
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
14 changes: 13 additions & 1 deletion __frzr-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,19 @@ main() {
INTEL_UCODE="initrd /${NAME}/intel-ucode.img"
fi

ADDITIONAL_ARGUMENTS=""
RESUME_ARGS=""
if [ -f "/home/swapfile" ]; then
RESUME_OFFSET=$(btrfs inspect-internal map-swapfile -r /home/swapfile)

RESUME_DISK=$(mount | grep "/home" | awk '{print $1}')
PART_UUID=$(blkid -o value -s UUID ${RESUME_DISK})

RESUME_ARGS="resume=UUID=${PART_UUID} resume_offset=${RESUME_OFFSET}"

echo "Add resume hook to boot boot parameters: ${RESUME_ARGS}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"boot" is repeated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. However I think this PR will be superceeded by the frzr rework carried over by me and @ruineka so that the user can choose the size instead of reling on a service to create the file, manually resizing and having to update before having that working...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this seems like a better solution since you don't need an additional partition.

Copy link
Member

@alkazar alkazar Mar 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can bump the default swap size to something more reasonable to support hibernate. Or allow the user to change the size in the advanced menu in the installer.

Copy link
Contributor Author

@NeroReflex NeroReflex Mar 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both have upsides and downsides, we will need to discuss to pick the least poisonous poison

fi

ADDITIONAL_ARGUMENTS="${RESUME_ARGS}"
if [ -e ${SUBVOL}/usr/lib/frzr.d/bootconfig.conf ] ; then
ADDITIONAL_ARGUMENTS="$ADDITIONAL_ARGUMENTS $(cat ${SUBVOL}/usr/lib/frzr.d/bootconfig.conf)"
fi
Expand Down
Loading