Power off system on LUKS decryption timeout #6147
brutalsam96
started this conversation in
Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have faced an issue where my laptop was left powered on for 6 hours stuck in the drive decryption password screen. Fortunately, the device did not suffer any known damages to the hardware, but it's vital to have a flow where after a certain amount of time, the password prompt times out and automatically shuts down the device to prevent thermal stress, battery drain, or panel burn-in.
I have fixed this issue with two methods. One was patching the legacy
encrypthook, which was not the best or cleanest solution. The other, better method was replacingencryptwith the nativesd-encrypthook and utilizing its built-in methods to handle the timeout. Additionally, I added a custom companion hook that automatically shuts down the device instead of dropping it into systemd's default emergency mode—which was causing the system to freeze in an infinite loop due to a locked root account.Here are exact steps i took to implement these changes:
1. The Custom Hook File (
usr/lib/initcpio/install/timeout-shutdown)2. The Updated Hooks Array Configuration (/etc/mkinitcpio.conf.d/omarchy_hooks.conf)
@dhh @ryanrhughes
Let me know if you want me to spin this up into a formal Pull Request!
Beta Was this translation helpful? Give feedback.
All reactions