Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to wake up Ubuntu from hibernation at a predefined time? It should not be WOL, but rather Ubuntu waking itself up. For example, it should do what the app WakeupOnStandBy does on MS Windows.

share|improve this question
add comment

3 Answers 3

When hibernating, the operating system is off and can't do anything. It's the computer's BIOS that does the waking up, so it's only possible if your computer's BIOS supports it. With some BIOSes, you can configure a scheduled wakeup quite easily.

Press the key that gets you into "setup" or similar when the computer first boots up (often F2 or Del) and see what options you have.

Alternatively you may be able to configure the BIOS to wake from Ubuntu, if the BIOS supports waking and allows the OS access to configure it. This guide is quite comprehensive:
http://www.mythtv.org/wiki/ACPI_Wakeup

share|improve this answer
    
Is this also true for suspension (vs. hybernation)? –  Benjamin Jun 16 '11 at 10:20
    
This is the correct answer. BIOS should support wake up at a certain time feature. –  powerrox Mar 16 '12 at 1:46
add comment
up vote 3 down vote accepted

I found that it is difficult to wakeup Ubuntu from hibernation. So I use the following commands to boot Ubuntu at a predefined time:

# Clear previously set wakeup time 
sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"

# Set the wakeup time at 2:02 am
sudo sh -c "echo `date '+%s' -d '2am next day + 2 minutes'` > /sys/class/rtc/rtc0/wakealarm"

#Check if alarm is set. It should show the unix time stamp
cat /sys/class/rtc/rtc0/wakealarm

#After setting the time, PC can be turned off with this command
sudo shutdown -P now 

This setup has been very consistent and it has never failed. Auto-login should be enabled during Ubuntu installation for this to work, or else Ubuntu will wait at the login screen when it auto boots up. More info here.

share|improve this answer
add comment

Since hibernation implies power-off I wonder if your BIOS supports automatically booting on power application. If so, you could cycle your power supply using an external timer or some other device.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.