Games prevent the system from entering sleep mode

Games prevent the system from entering sleep mode. All I've managed to do with the system so far is create a systemctl service that temporarily enables WoL via ethtool on PC startup. That's all, no further interaction with the system.

Log: https://paste.centos.org/view/0073fa7d

The graph shows the PC performance after 20 minutes of AFK time. The system is configured to enter sleep mode after 20 minutes of inactivity.
20250110183700_1.jpg
Solution
I have found a workaround for me:
sudo systemctl edit systemd-suspend.service

and then add
[Service]
Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=true"

Not sure what horrible bugs this could cause but it got sleep working for me again.

I did some digging regarding that setting. Looks like it got set to false in this commit https://src.fedoraproject.org/rpms/systemd/c/6162965002f9e6052e0ce8d6810028da4679e55a?branch=rawhide as a fix for this bug https://bugzilla.redhat.com/show_bug.cgi?id=2321268
Not sure why this is having an effect now since it was already set to false in stable-41.20241209 so it is not responsible for my issue on its own.
Was this page helpful?