I have a Linux desktop computer, running Kubuntu, and I cannot get it to sleep.
On the start menu I click 'sleep' but in about 14 seconds the screen turns back on, I am at the password screen; my session is locked but it is completely preserved. I'm not logged out, not rebooted, nothing. It just refuses to stay sleeping.
There is nothing inhibiting sleep:
systemd-inhibit --list --mode=block
WHO UID USER PID COMM WHAT WHY MODE
PowerDevil 1000 juliano 2245 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events block
1 inhibitors listed.
Following the KDE PowerDevil instructions https://github.com/KDE/powerdevil , I tried showing all PowerDevil log messages, but this is all I have got, and I don't think it is related:
nov 06 11:48:34 6kubuntu org_kde_powerdevil[2245]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
nov 06 11:48:34 6kubuntu org_kde_powerdevil[2245]: org.kde.powerdevil: org.kde.powerdevil.backlighthelper.brightness failed
nov 06 11:48:34 6kubuntu org_kde_powerdevil[2245]: org.kde.powerdevil: Handle button events action could not check for screen configuration
nov 06 11:48:34 6kubuntu org_kde_powerdevil[2245]: org.kde.powerdevil: The profile "AC" tried to activate "DimDisplay" a non-existent action. This is usually due to an installation problem, a configuration problem, or because the action is not supported
nov 06 11:48:34 6kubuntu org_kde_powerdevil[2245]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
I tried updating Nvidia drivers, as some suggested. No good;
I tried this command, does not work either:
sudo systemctl suspend -i
It does exactly the same thing as the sleep button. The computer comes back in around 14 seconds.
Here someone suggested systemctl enable nvidia-{suspend,resume,hibernate}. That did not help.
Some people have suggested fixing broken links. I have found no broken links under /etc/systemd.
Some system info:
KDE plasma 5.27.11
kernel 6.8.0-48-generic (64-bit)
Kubuntu 24.04