Sleep works when activated manually, but not after automatically x minutes of being idle

If I press the power button and then select “sleep”, the computers sleeps correctly. If the computer is idle, I find it hours later with the fans still running. How can I make automatic sleep work?

Here are relevant settings:

Operating System: Feren OS 2025.03
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Kernel Version: 6.8.0-87-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-3770 CPU @ 3.40GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4000
Manufacturer: Dell Inc.
Product Name: OptiPlex 9010
System Version: 01

you need to check that box next to suspend session.

I had it checked, but the appearance settings didn’t show that clearly. I changed the appearance settings to be clearer. Here’s what I have (and still no automatic sleep)

if you open a terminal and type sudo systemctl suspend what happens?

post the contents of /etc/systemd/sleep.conf

what do these say about your machine?

cat /sys/power/state

cat /sys/power/mem_sleep

cat /sys/power/disk

and finally to see what your firmware supports

cat /proc/acpi/wakeup

It turns out it’s working correctly now. The only reason I can think of is that earlier, due to appearance settings, I couldn’t see if “suspend session” was checked or not. Changing the settings to make that clearer, and having the box checked seemed to have fixed it.

Thank you @skyfishgoo.
Is there still any reason or interest to see the results of the commands you listed?

no, not if it’s working as expected now.