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

Conversation

NeroReflex
Copy link
Contributor

This PR is aimed at appending to kernel boot parameters the btrfs offset and uuid of the file /home/swapfile when such file is present.

This in turn allows an initramfs that was generated with mkinitcpio containtaining the "resume" hook so resume from hibernation.

This PR is therefore required to support sleeping consoles that only supports S5 status.

@alkazar
Copy link
Member

alkazar commented Mar 31, 2024

Very nice. But I don't think this will work after install since the swapfile does not exist yet. It is created by a service on first boot.


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

@ruineka ruineka merged commit c528274 into ChimeraOS:master Jul 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants