Hello, all.
I just finished upgrading a machine from AlmaLinux 9 minimal to 10 using ELevate and Leap. And now, for some reason, the machine goes to sleep/suspend/hibernate after a period of time. I can hit the power button and it wakes up. Again, this is a brand new issue since the upgrade. I never experienced this in AlmaLinux 9.
Is there anything I should look for in any configs to disable or enable to keep it from going to sleep/suspend/hibernate?
Thanks.
I found the fix.
For those that may run into the issue: I found in Journalctl the following message before the server went offline, “systemd-logind[925]: The system will suspend now!”. To give credit to Google’s search and AI response, which I am actually reluctant to do, I completed this as the fix:
I created the directory sleep.conf.d under /etc/systemd and a file nosuspend.conf in that new directory with the following contents:
[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
Then ran the command as root systemctl daemon-reload. No more suspend/sleep/hibernation.
2 Likes