2

I need to get my Pi4 running Raspbian to sleep or hibernate. The when I type the commands systemctl suspend or systemctl hibernated I get the error 'not supported'. Is it possible to enable this functionality? Or is there another way to do this?

My goal is to get the Pi4 to boot as fast as possible. Current, it takes 30 seconds.

My Pi4 has is the 2gig version.

Please help. Thanks!

Sarphati
  • 21
  • 1
  • 3

1 Answers1

7

Raspbian kernel is built without CONFIG_HIBERNATION which is needed to provide the necessary interfaces for systemctl. You will have to build a custom kernel to enable those interfaces. You will also need a swap partition which is at least as big as your RAM size (2GB) for the hibernation to actually work, and you need to make sure the kernel command line is updated before power-off so that the kernel knows it must resume from swap instead of a regular boot. I don't think systemctl is aware of /boot/config.txt.

Another issue making hibernation less practical is the Pi power management after shutdown. You'll need to configure the Pi bootloader with POWER_OFF_ON_HALT to actually get the power consumption down, and once you do that, you need to either toggle the GLOBAL_EN node (HI-LO-HI), or unplug and re-plug the power to boot again.

Note that @goldilocks have tried enabling hibernation on a Pi, and it didn't work. See his comment below.

Suspending to RAM and standby (or power-on suspend) additionally require hardware support (ACPI/APM or the like) which AFAIK is missing on Raspberries, so even if you get the command accepted by systemctl, there will be no reduction in power consumption.

The simplest thing you can do is to leave the Pi running: it doesn't consume that much power in the first place, and there will be no boot time at all when you need it.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147