User avatar
RaspberryPie
Posts: 20
Joined: Thu Apr 26, 2012 3:49 pm
Location: florida

anyone working on a suspend/hibernate driver

Wed May 23, 2012 6:05 pm

just wondering if anyone was making a suspend/hibernate function for the rapi? that way if it was running on batteries, there would be a way to extend the life of the batteries.

would this be a big deal to do?
A Raspberry a Day
Keep the Student at Play
So Get Your Slice of Pi
Let your programming Fly

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32864
Joined: Sat Jul 30, 2011 7:41 pm

Re: anyone working on a suspend/hibernate driver

Wed May 23, 2012 6:25 pm

I'm no expert on this, but is it not already part of standard Linux?

You don't need to worry about the GPU as that will autopower down when not being used. It's the Arm side that needs to be covered by Linux.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

User avatar
RaspberryPie
Posts: 20
Joined: Thu Apr 26, 2012 3:49 pm
Location: florida

Re: anyone working on a suspend/hibernate driver

Wed May 23, 2012 6:38 pm

thanks jamesh, you are correct, appreciate pointing that out.

found this [color=#8080BF]http://www.cyberciti.biz ... t/[/color](text posted below):
Q. Does any Linux distribution support suspend or hibernate functionality?

A. Yes, almost all modern Linux distribution supports suspend or hibernate functionality. In the Linux kernel, Hibernate or suspend-to-disk, suspend-to-ram, suspend-to-file is implemented by swsusp which is built into the 2.6 series.

Hibernate is a feature where the contents of RAM is written to the hard disk (as either a file or on a separate partition) before powering off the system. Later the system can be restored to the state it was in when hibernation was invoked, so that programs can continue executing as if nothing happened. Hibernating and restoring from hibernate is also generally faster than a hard reboot and, if necessary, can be done without user interaction.

I've personally tested following distributions:
+ Red Hat Enterprise Linux 5 ( desktop edition )
+ Debian Linux
+ Fedora Linux
+ Ubuntu Linux
How to suspend and hibernate a laptop under Linux

=> Click on Shutdown > Select Suspend or Hibernate as per requirement.
Can someone who has a pi (please) try this function to see if it works (and how long to cycle between states)?
A Raspberry a Day
Keep the Student at Play
So Get Your Slice of Pi
Let your programming Fly

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: anyone working on a suspend/hibernate driver

Thu May 24, 2012 6:49 am

Funnily enough, I always assumed that hibernate/suspend would work out of the box on the Pi, but there was a post recently (I think in one of the "battery" threads) that seemed to indicate otherwise. So, that's why there was doubt.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

shirro
Posts: 248
Joined: Tue Jan 24, 2012 4:54 am

Re: anyone working on a suspend/hibernate driver

Thu May 24, 2012 8:28 am

Ok, you have suspended your Raspberry Pi. Which button do you press to turn it on again?

User avatar
RaspberryPie
Posts: 20
Joined: Thu Apr 26, 2012 3:49 pm
Location: florida

Re: anyone working on a suspend/hibernate driver

Thu May 24, 2012 2:01 pm

its always the little things, lol :mrgreen:

now where is that "any" key??
A Raspberry a Day
Keep the Student at Play
So Get Your Slice of Pi
Let your programming Fly

User avatar
AndrewS
Posts: 3641
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK

Re: anyone working on a suspend/hibernate driver

Fri May 25, 2012 2:16 pm

jamesh wrote:You don't need to worry about the GPU as that will autopower down when not being used. It's the Arm side that needs to be covered by Linux.
In that case, could you explain this? http://www.raspberrypi.org/phpBB3/viewt ... 188#p81188 :?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32864
Joined: Sat Jul 30, 2011 7:41 pm

Re: anyone working on a suspend/hibernate driver

Fri May 25, 2012 2:28 pm

Not fully, but it's quite possible that GPU power management is turned off (it's very controllable). Not usually needed on a permanently connected device.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

Lotharyx
Posts: 7
Joined: Thu Aug 29, 2013 5:00 pm

Re: anyone working on a suspend/hibernate driver

Thu Mar 10, 2016 3:07 am

On "which button do you press?":

If you're "suspended" (aka sleep, aka suspend-to-RAM, aka low power on state), you're...well, you're in trouble unless you had a USB keyboard connected and USB is still awake.

BUT!

If you're "hibernated" (aka suspend-to-disk, aka power off state), all you have to do is interrupt power to the Pi briefly to wake it back up (just as if you had shut it down with "shutdown -h now"])

Return to “General programming discussion”