Hello Neville
In my case is the latter (/etc/systemd/logind.conf)
The original file’s content is
# 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. Local configuration
# should be created by either modifying this file (or a copy of it placed in
# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in
# the /etc/systemd/logind.conf.d/ directory. The latter is generally
# recommended. Defaults can be restored by simply deleting the main
# configuration file and all drop-ins located in /etc/.
#
# Use 'systemd-analyze cat-config systemd/logind.conf' to display the full config.
#
# See logind.conf(5) for details.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
#HandlePowerKeyLongPress=ignore
#HandleRebootKey=reboot
#HandleRebootKeyLongPress=poweroff
#HandleSuspendKey=suspend
#HandleSuspendKeyLongPress=hibernate
#HandleHibernateKey=hibernate
#HandleHibernateKeyLongPress=ignore
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#StopIdleSessionSec=infinity
Note: For LAN purposes the laptop’s lid event when it is closed is ignored, it with the purpose to keep the OS running. Therefore in some machines is done the following edition (even in Debian) as follows:
- From:
#HandleLidSwitch=suspend
- To:
HandleLidSwitch=ignore
And then is executed the sudo systemctl restart systemd-logind command and do a simple login.
Therefore when the laptop’s lid is closed
- The laptop’s screen goes black
- The OS is still running
Well it did not work in a MacBook Pro as posted as follows:
Why this history about the /etc/systemd/logind.conf file?
The problem with this Asus (about the /etc/systemd/logind.conf file) is that “1” does not happen. In other words:
- The laptop’s screen does not go black
It was confirmed by doing the following approach:
- The brightness was put in max and when the laptop’s lid is closed is possible see the light of the screen (in the night mostly) through the “slit separation” (if the term is correct) between the lid and keyboard
Well the original configuration for the /etc/systemd/logind.conf file was reestablished and executed the mentioned sudo systemctl restart systemd-logind command.
And even when the OS is reboot the “3” event happens. In other words:
- The laptop’s screen does not go black
And
- The OS is still running (strange behavior, it should be suspended)
So neville
In the original /etc/systemd/logind.conf file
- What setting do you suggest to apply?
Really wondered why it is happening for this Asus. I thought it is related with the nvidia card, but I have other laptop (HP Pavilion) with Debian having a nvidia card (none driver installed by my side) and all work as expected (The lid approach and suspend and resume events).
Let me know your thoughts because exists the assumption that the /etc/systemd/logind.conf file must be edited to have the systemctl suspend command working correctly (and resume too)