Difference between revisions of "User:Chazza"

From ArchWiki
Jump to: navigation, search
(remove holiday notice)
(add draft for acpi events section)
Line 2: Line 2:
  
 
Hello all. I'm from the UK and I've been using Arch since mid 2013. See also, my [https://aur.archlinux.org/packages/?SeB=m&K=Chazza AUR packages].
 
Hello all. I'm from the UK and I've been using Arch since mid 2013. See also, my [https://aur.archlinux.org/packages/?SeB=m&K=Chazza AUR packages].
 +
 +
== ACPI events (draft) ==
 +
 +
''systemd'' handles some power-related [[Wikipedia:Advanced_Configuration_and_Power_Interface|ACPI]] events. These events include actions such as pressing the sleep button or closing the laptop lid. Event actions can be configured in {{ic|/etc/systemd/logind.conf}} or {{ic|/etc/systemd/logind.conf.d/*.conf}} - see {{ic|man logind.conf}}. On systems with no dedicated power manager, this may replace the [[acpid]] daemon which is usually used to react to these ACPI events.
 +
 +
The specified action for each event can be one of {{ic|ignore}}, {{ic|poweroff}}, {{ic|reboot}}, {{ic|halt}}, {{ic|suspend}}, {{ic|hibernate}}, {{ic|hybrid-sleep}}, {{ic|lock}} or {{ic|kexec}}. If these options are not configured, ''systemd'' will use its defaults: {{ic|1=HandlePowerKey=poweroff}}, {{ic|1=HandleSuspendKey=suspend}}, {{ic|1=HandleHibernateKey=hibernate}}, and {{ic|1=HandleLidSwitch=suspend}}.
 +
 +
To apply any changes, [[restart]] the {{ic|systemd-logind}} daemon (be warned that this will terminate all login sessions that might still be open).
 +
 +
;Power managers
 +
Some [[desktop environment]]s include power managers which [http://www.freedesktop.org/wiki/Software/systemd/inhibit/ inhibit] (temporarily turn off) some or all of the ''systemd'' ACPI settings. If such a power manager is running, then the actions for ACPI events can be configured in the power manager alone. Changes to {{ic|/etc/systemd/logind.conf}} or {{ic|/etc/systemd/logind.conf.d/*.conf}} need be made only if you wish to configure behaviour for a particular event that is not inhibited by the power manager.
 +
 +
Note that if the power manager does not inhibit ''systemd'' for the appropriate events you can end up with a situation where ''systemd'' suspends your system and then when the system is woken up the other power manager suspends it again. Currently, only the power managers of [[KDE]], [[GNOME]] and [[Xfce]] issue the necessary ''inhibited'' commands. If the ''inhibited'' commands are not being issued, such as when using [[acpid]] or others to handle ACPI events, set the {{ic|Handle}} options to {{ic|ignore}}. See also {{ic|man systemd-inhibit}}.
 +
 +
{{Note|
 +
* ''systemd'' cannot handle AC and Battery ACPI events, so if you use [[Laptop Mode Tools]] or other similar tools [[acpid]] is still required.
 +
* If the system is inserted in a docking station, or more than one display is connected, the action specified by {{ic|HandleLidSwitchDocked}} occurs ({{ic|ignore}} by default). As such, a laptop connected to an external display will not suspend by default, when closing the lid.
 +
}}

Revision as of 16:17, 3 October 2015

ArchWiki Maintainer

Hello all. I'm from the UK and I've been using Arch since mid 2013. See also, my AUR packages.

ACPI events (draft)

systemd handles some power-related ACPI events. These events include actions such as pressing the sleep button or closing the laptop lid. Event actions can be configured in /etc/systemd/logind.conf or /etc/systemd/logind.conf.d/*.conf - see man logind.conf. On systems with no dedicated power manager, this may replace the acpid daemon which is usually used to react to these ACPI events.

The specified action for each event can be one of ignore, poweroff, reboot, halt, suspend, hibernate, hybrid-sleep, lock or kexec. If these options are not configured, systemd will use its defaults: HandlePowerKey=poweroff, HandleSuspendKey=suspend, HandleHibernateKey=hibernate, and HandleLidSwitch=suspend.

To apply any changes, restart the systemd-logind daemon (be warned that this will terminate all login sessions that might still be open).

Power managers

Some desktop environments include power managers which inhibit (temporarily turn off) some or all of the systemd ACPI settings. If such a power manager is running, then the actions for ACPI events can be configured in the power manager alone. Changes to /etc/systemd/logind.conf or /etc/systemd/logind.conf.d/*.conf need be made only if you wish to configure behaviour for a particular event that is not inhibited by the power manager.

Note that if the power manager does not inhibit systemd for the appropriate events you can end up with a situation where systemd suspends your system and then when the system is woken up the other power manager suspends it again. Currently, only the power managers of KDE, GNOME and Xfce issue the necessary inhibited commands. If the inhibited commands are not being issued, such as when using acpid or others to handle ACPI events, set the Handle options to ignore. See also man systemd-inhibit.

Note:
  • systemd cannot handle AC and Battery ACPI events, so if you use Laptop Mode Tools or other similar tools acpid is still required.
  • If the system is inserted in a docking station, or more than one display is connected, the action specified by HandleLidSwitchDocked occurs (ignore by default). As such, a laptop connected to an external display will not suspend by default, when closing the lid.