1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00
systemd/src/login
Zbigniew Jędrzejewski-Szmek 19adb8a320 systemd-sleep: add support for freeze and standby
A new config file /etc/systemd/sleep.conf is added.
It is parsed by systemd-sleep and logind. The strings written
to /sys/power/disk and /sys/power/state can be configured.
This allows people to use different modes of suspend on
systems with broken or special hardware.

Configuration is shared between systemd-sleep and logind
to enable logind to answer the question "can the system be
put to sleep" as correctly as possible without actually
invoking the action. If the user configured systemd-sleep
to only use 'freeze', but current kernel does not support it,
logind will properly report that the system cannot be put
to sleep.

https://bugs.freedesktop.org/show_bug.cgi?id=57793
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=7e73c5ae6e7991a6c01f6d096ff8afaef4458c36
http://lists.freedesktop.org/archives/systemd-devel/2013-February/009238.html

SYSTEM_CONFIG_FILE and USER_CONFIG_FILE defines were removed
since they were used in only a few places and with the
addition of /etc/systemd/sleep.conf it becomes easier to just
append the name of each file to the dir name.
2013-05-06 22:51:57 +02:00
..
.gitignore login: properly detect MIMO USB displays 2012-05-31 01:20:37 +02:00
70-power-switch.rules login: Use the GOTO properly in udev rule 2012-05-30 18:34:28 +02:00
70-uaccess.rules uaccess: remove needless usb_id call from udev rules 2013-03-23 16:30:49 +01:00
71-seat.rules.in Move udevadm to rootbindir 2013-03-11 07:18:33 +01:00
73-seat-late.rules.in relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
inhibit.c inhbit: show comm field of inhibiting processes 2013-04-24 19:02:12 -03:00
libsystemd-login.pc.in relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
libsystemd-login.sym login: add new call sd_get_machine_names() to get a list of current virtual machines and containers 2013-04-24 19:02:13 -03:00
loginctl.c inhbit: show comm field of inhibiting processes 2013-04-24 19:02:12 -03:00
logind-acl.c relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
logind-acl.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
logind-action.c systemd-sleep: add support for freeze and standby 2013-05-06 22:51:57 +02:00
logind-action.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
logind-button.c logind: don't hit an assert if an close() on an input device fd fails with ENODEV because the device is gone 2013-03-07 16:48:14 +01:00
logind-button.h logind: add support for automatic suspend/hibernate/shutdown on idle 2012-12-24 00:29:40 +01:00
logind-dbus.c systemd-sleep: add support for freeze and standby 2013-05-06 22:51:57 +02:00
logind-device.c logind: expose CanGraphical and CanTTY properties on seat objects 2012-06-21 13:48:01 +02:00
logind-device.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
logind-gperf.gperf util: rename parse_usec() to parse_sec() sinds the default unit is seconds 2013-04-03 20:12:57 +02:00
logind-inhibit.c Use initalization instead of explicit zeroing 2013-04-05 19:50:57 -04:00
logind-inhibit.h logind: split up HandleSleepKey= into HandleSuspendKey= and HandleHibernateKey= 2012-09-21 15:44:14 +02:00
logind-seat-dbus.c move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
logind-seat.c log: introduce a macro to format message id 2012-10-13 14:26:30 +02:00
logind-seat.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
logind-session-dbus.c move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
logind-session.c cgroup: make sure all our cgroup objects have a suffix and are properly escaped 2013-04-22 23:14:12 -03:00
logind-session.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
logind-user-dbus.c move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
logind-user.c cgroup: make sure all our cgroup objects have a suffix and are properly escaped 2013-04-22 23:14:12 -03:00
logind-user.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
logind.c conf-parser: restrict .include usage 2013-04-25 00:05:14 -03:00
logind.conf logind: add support for automatic suspend/hibernate/shutdown on idle 2012-12-24 00:29:40 +01:00
logind.h logind: rework delay inhibition logic 2013-01-25 06:30:23 +01:00
Makefile
multi-seat-x.c multi-seat-x: drop a lot of unnecessary code 2012-09-21 17:03:40 +02:00
org.freedesktop.login1.conf logind: allow HybridSleep methods in default DBus context 2012-12-18 17:45:20 +01:00
org.freedesktop.login1.policy.in logind: Allow active sessions to always shutdown by default 2013-02-11 21:04:25 +01:00
org.freedesktop.login1.service relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
pam-module.c move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
sd-login.c cgls: add --machine/-M 2013-05-01 10:15:25 -04:00
sysfs-show.c logind: rename "seat-master" tag to "master-of-seat" 2013-02-09 01:25:55 +01:00
test-inhibit.c logind: use "sleep" as generic term for "suspend", "hibernate", and later on "hybrid suspend" 2012-05-08 13:54:23 +02:00
test-login.c login: add new call sd_get_machine_names() to get a list of current virtual machines and containers 2013-04-24 19:02:13 -03:00
user-sessions.c util: rename write_one_line_file() to write_string_file() 2013-04-03 20:12:56 +02:00