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

Close tombs on hibernation / suspend #34

Open
boyska opened this issue Aug 22, 2011 · 5 comments
Open

Close tombs on hibernation / suspend #34

boyska opened this issue Aug 22, 2011 · 5 comments
Labels

Comments

@boyska
Copy link
Member

boyska commented Aug 22, 2011

Hibernating while a tomb is open is bad: it means that your key is written to disk.
We should close every tomb before hibernating.
This can be done using /etc/pm/sleep.d/99-tomb script which does this.

Also, if closing fails (because of pid locking it) we should choose between slamming and preventing hibernation.
Slamming is easier, but could be unintuitive for the user to "hibernate" and not finding his applications open on reboot.
Preventing hibernation seems to be possible, according to this post: http://askubuntu.com/questions/28328/how-can-i-disable-hibernate-completely-in-kubuntu

@jaromil
Copy link
Member

jaromil commented Aug 31, 2011

i agree.

on my own system i do 'tomb close' in my hybernate/suspend wrapper already.
we might want to enforce this system wide as you say and, meanwhile, mention these issues in the manual under a special section "TIPS" or so.

preventing hibernation might be dangerous for overheating of batteries: imagine users slamming their laptop close and, assuming it hibernates, store it into a backpack....

@jaromil
Copy link
Member

jaromil commented Jan 17, 2012

there is a function for this in cryptsetup luksSuspend and luksRestore, see man cryptsetup

@jaromil jaromil removed this from the Release 2.0 milestone Sep 19, 2014
@CameronNemo
Copy link

In addition to a script in /etc/pm/sleep.d/, you will want another script in /lib/systemd/sleep/ for systemd-logind setups.

@jaromil
Copy link
Member

jaromil commented Jan 22, 2015

Any tip for examples or templates or existing scripts in distributions? I'd go for something already tested rather than reinvent the wheel here.

@Narrat
Copy link
Contributor

Narrat commented Mar 18, 2018

An example for a systemd unit got posted in #310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants