Skip to content

Instantly share code, notes, and snippets.

@alansenairj
Created December 25, 2024 15:54
Show Gist options
  • Save alansenairj/d03b5dd284009d78140bb9a46d8bf7a8 to your computer and use it in GitHub Desktop.
Save alansenairj/d03b5dd284009d78140bb9a46d8bf7a8 to your computer and use it in GitHub Desktop.
put suspendo to work in fedora 41 - lid closing
# follow sleep logs
sudo journalctl --unit=systemd-logind --follow
#copy this file content
vi /usr/lib/systemd/logind.conf
#create folder for configuration
mkdir -p /etc/systemd/logind.conf.d
:> /etc/systemd/logind.conf.d/logind.conf
vi /etc/systemd/logind.conf.d/logind.conf
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#SleepOperation=suspend-then-hibernate suspend
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment