Anacron killed on resume - how to fix it? ACPI setup?

Chris G cl at
Sat Jan 2 17:48:41 UTC 2010

On Sat, Jan 02, 2010 at 12:42:18PM -0500, Brian McKee wrote:
> On Sat, 2010-01-02 at 17:16 +0000, Chris G wrote:
> > I recently started using suspend/resume on my desktop when shutting it
> > down for short periods, or sometimes even when shutting it down for
> > longer periods, as it's so much faster to resume than doing a full
> > power-up. 
> > 
> > However, when I resume anacron gets killed because for some reason the
> > resume scripts think my system is a laptop (which it isn't) and they
> > kill anacron to save power.  Doing a standard start-up from power off
> > anacron isn't killed.
> > 
> > I've done some searches and there are a couple of reports of this bug
> > but no really reasonable workaround.  Can anyone suggest any sensible
> > way around this problem?
> I'm not sure I understand. Laptops need anacron - it shouldn't be
> getting killed on resume... What makes you think that's happening?
> It usually sleeps for five minutes or so after startup to prevent trying
> to do too many things at once.
My Google searches suggest that if a laptop is resumed from a
suspended state or started up in battery power mode then anacron gets
killed to save power.  Anacron doesn't get killed when the laptop is
on mains power.

> I do know the output on screen can be misleading as sometimes things
> killed on the way down don't get printed to the screen on the way up.
Anacron definitely gets killed, entries from syslog:-

    Jan  1 00:52:48 chris anacron[5664]: Anacron 2.3 started on 2010-01-01
    Jan  1 00:52:48 chris anacron[5664]: Will run job `cron.daily' in 5 min.
    Jan  1 00:52:48 chris anacron[5664]: Jobs will be executed sequentially
    Jan  1 00:52:49 chris init: anacron main process (5664) killed by TERM signal

This *only* happens when resume[ing], not at normal power-up.  After
this happens (anacron killed) ps shows no anacron process.

Chris Green

More information about the ubuntu-users mailing list