Hacker News new | ask | show | jobs
by mwpmaybe 197 days ago
> Power management on Macbooks is unbeatable in my experience, both Windows and Linux have really serious issues dealing with sleep and low power modes.

I've been dealing with this recently. Linux won't hibernate if you have Secure Boot enabled, even if your swap is encrypted. So I either have to leave my laptop plugged in all the time or remember to shut it down before unplugging it so it doesn't completely drain its battery while sleeping.

1 comments

this just sounds absolutely horrendous. I could not operate like this. Is this a general linux on laptop thing or just a specific to your situation thing?
It's... not great. It's a dual-boot laptop that I take out into the field so I'd like to encrypt the Windows and Linux volumes with BitLocker and LUKS respectively, and ideally I would leave Secure Boot enabled for that extra bit of security. Ultimately I'll need to decide whether to disable Secure Boot or patch the kernel to let me override lockdown mode. I know SuSE has implemented it but I don't know if their patch series will apply cleanly to a mainline Ubuntu kernel.
It's a Linux thing.

> The Linux kernel disables the possibility of hibernation when Secure Boot is in use because it cannot guarantee that the swap file is unchanged. "Unencrypted hibernation/suspend to swap are disallowed as the kernel image is saved to a medium that can then be accessed."

https://wiki.debian.org/Hibernation

I think it's specific to their machine? I've got an old Skylake (6600u) machine with Secure Boot disabled that will last a weekend with the lid closed.
This is a general Linux issue. Over the years patches have floated around to address it (like letting people force it to be allowed if their swap is encrypted).

https://man7.org/linux/man-pages/man7/kernel_lockdown.7.html

> with Secure Boot disabled

That's why it works for you. Enable secure boot and you lose hibernate.