View Categories

DISABLE SLEEP, HIBERNATE, SUSPEND ON DEBIAN LINUX

https://addspice.net/disable-sleep-hibernate-suspend-on-debian-linux

关闭

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

查看

sudo systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target

————————————————————————————————————————————————–

https://forums.debian.net/viewtopic.php?t=156005

I found the solution. This method works better and doesn’t have the spurious message on connected SSH clients.

Create /etc/systemd/sleep.conf.d/nosuspend.conf as

[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no

They should probably edit the documentation and swap both solution so this one is the first one and not marked as an “alternative”