Recently doing fresh installs of Mageia 9 on a few machines, I noticed that they would frequently go into sleep mode. This is annoying. While sleep/suspend is useful, if not necessary, for laptops, it is most unwelcome behavior for desktops and servers.
Some of the best Linux documentation is found at ArchWiki, and this instance was no exception. It seems that each sleep state can be disabled via an entry in /etc/systemd/sleep.conf.d/disable-sleep.conf. That directory and file did not exist on any of my machines, so I created them and entered the following in disable-sleep.conf:
## https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Disable_sleep_Completely
[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowHybridSleep=no
AllowSuspendThenHibernate=no
Problem solved!
I also remove xscreensaver with
# rpm -evh --nodeps xscreensaver xscreensaver-common xscreensave-base
RESOURCES
man page for systemd.sleep.conf(5)

Comments