Difference between revisions of "HowTo Prevent A Laptop Lid Close Suspension"

From NST Wiki
Jump to navigationJump to search
(Edit Configuration File for systemd-logind.service)
(Edit Configuration File for systemd-logind.service)
Line 8: Line 8:
  
 
<pre class="programListing">
 
<pre class="programListing">
 +
[root@shopper2 ~]# cat /etc/systemd/logind.conf
 +
#  This file is part of systemd.
 +
#
 +
#  systemd is free software; you can redistribute it and/or modify it
 +
#  under the terms of the GNU Lesser General Public License as published by
 +
#  the Free Software Foundation; either version 2.1 of the License, or
 +
#  (at your option) any later version.
 +
#
 +
# Entries in this file show the compile time defaults.
 +
# You can change settings by editing this file.
 +
# Defaults can be restored by simply deleting this file.
 +
#
 +
# See logind.conf(5) for details.
  
 
+
[Login]
 
+
#NAutoVTs=6
 +
#ReserveVT=6
 +
#KillUserProcesses=no
 +
#KillOnlyUsers=
 +
#KillExcludeUsers=root
 +
#InhibitDelayMaxSec=5
 +
#HandlePowerKey=poweroff
 +
#HandleSuspendKey=suspend
 +
#HandleHibernateKey=hibernate
 +
#HandleLidSwitch=suspend
 +
#HandleLidSwitchDocked=ignore
 +
#PowerKeyIgnoreInhibited=no
 +
#SuspendKeyIgnoreInhibited=no
 +
#HibernateKeyIgnoreInhibited=no
 +
#LidSwitchIgnoreInhibited=yes
 +
#HoldoffTimeoutSec=30s
 +
#IdleAction=ignore
 +
#IdleActionSec=30min
 +
#RuntimeDirectorySize=10%
 +
#RemoveIPC=yes
 +
#InhibitorsMax=8192
 +
#SessionsMax=8192
 +
#UserTasksMax=33%
 +
[root@shopper2 ~]#
 
</pre>
 
</pre>

Revision as of 08:33, 4 January 2018

Overview

This page demonstrates how one can shut the lid of a laptop computer running NST and still have NST run without being suspended. This is especially useful when NST is booted in console mode. The systemd-logind.service can be configured to "ignore" the suspension system power action. This systemd service handles various hardware state system power functionality.

Edit Configuration File for systemd-logind.service

The systemd-logind.service has a configuration file: "/etc/systemd/logind.conf" that contains an entry for controlling the system power when the lid switch is in the Closed position. If one wants to allow an NST system running on a laptop computer not to enter the Suspension power state, then the HandleLidSwitch entry needs to be set to: "ignore".


[root@shopper2 ~]# cat /etc/systemd/logind.conf 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%
[root@shopper2 ~]#