Bug 57014 - /etc/systemd/logind.conf should have HandleExternalPower, HandleBatteryPower if systemd is to replace acpid; or other means to achieve power-friendly "daily tasks" on laptops
Summary: /etc/systemd/logind.conf should have HandleExternalPower, HandleBatteryPower ...
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-12 13:42 UTC by Shawn Rutledge
Modified: 2013-01-15 00:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Shawn Rutledge 2012-11-12 13:42:37 UTC
I was looking for a way that systemd could cause crond to start only when my laptop is plugged in to AC power, and stop it when it's on battery power.  There is HandleLidSwitch, HandleSuspendKey etc. already, but handling change in charging status seems to be something acpid provides which systemd does not yet.  Or am I missing something?

Then again, systemd is supposed to replace cron anyhow.  So maybe what is needed instead is a way to run a task when the system is idle AND it's on AC power (and maybe within a certain time range).  That would be for tasks that have traditionally been done by /etc/cron.daily jobs, such as updatedb.
Comment 1 Pavel Procopiuc 2013-01-10 14:43:25 UTC
This can probably now be solved with systemd-197 using new timer functionality together with ConditionACPower
Comment 2 Lennart Poettering 2013-01-15 00:53:12 UTC
Yeah, ConditionACPower should do the job.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.