Systemd-logind: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 2: Line 2:


* http://www.freedesktop.org/software/systemd/man/logind.conf.html
* http://www.freedesktop.org/software/systemd/man/logind.conf.html
=Internal=
* [[Linux Power Management]]


=Overview=
=Overview=
Line 14: Line 18:
* device access management for users
* device access management for users
* automatic spawning of text logins (gettys) on virtual console activation and user runtime directory management
* automatic spawning of text logins (gettys) on virtual console activation and user runtime directory management
=How to Prevent the Computer to Go to Sleep when the Lid is Closed=
Edit <tt>/etc/systemd/logind.conf</tt>.
Set the following:
<pre>
...
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
...
LidSwitchIgnoreInhibited=yes
...
</pre>
"LidSwitchIgnoreInhibited=yes" must be set explicitly, so our "HandleLidSwitch=ignore" configuration is executed in any case, and it is not subjected to "inhibitor locks taken by the application".

Latest revision as of 04:05, 5 June 2018

External

Internal

Overview

systemd-logind is a system service that manages user logins. It is responsible for:

  • keeping track of users and sessions, their processes and their idle state
  • providing PolicyKit-based access for users to operations such as system shutdown or sleep
  • implementing a shutdown/sleep inhibition logic for application
  • handling power/sleep hardware keys
  • multi-seat management
  • session switch management
  • device access management for users
  • automatic spawning of text logins (gettys) on virtual console activation and user runtime directory management

How to Prevent the Computer to Go to Sleep when the Lid is Closed

Edit /etc/systemd/logind.conf.

Set the following:

...
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
...
LidSwitchIgnoreInhibited=yes
...

"LidSwitchIgnoreInhibited=yes" must be set explicitly, so our "HandleLidSwitch=ignore" configuration is executed in any case, and it is not subjected to "inhibitor locks taken by the application".