First, try to find out if this is even KDE-related. Did you have a look into the journals? Anything crashing there after / before the resume? Do you have another kernel to try out?
Also, before heading out to work, put system to “performance” and “sleep” at 55 min.
Lo and behold, (after 2 hours out in the yard) it came back (as expected) with simple touch to keyboard.
ksystemlog is a nice GUI to the journals that is easy to use.
you can search for suspend to see if there are any errors
alternatively you can disable the plasma suspend feature and just use the systemd commands by creating a script that you can call after a period of inactivity (what i do).
in the energy saving settings, i set it to execute after 20min of inactivity and it will hibernate 3hrs after it goes to sleep.
to execute the sudo without requiring a password, i’ve modified the sudoers … from my notes
## SUPERUSER NOPASSWD ##
# to run commands that require root without having to enter a password
# the commands must be added to the sudoers file (man sudoers for more info)
sudo visudo
# place new entries at the very end of the file
# to allow foo to run systemctl without a password
foo ma=(ALL:ALL) NOPASSWD: /usr/bin/systemctl
# where 'foo' is the user name, 'ma' is the machine name, (ALL) are the users foo can impersonate.
# and NOPASSWD: is the trick to avoid the password prompt.
# the trick is limited to the command(s) listed by their fully qualified path
# and limited to the user and machine combination listed
# to see the changes have taken effect use
sudo -ll
you must have a working swap space big enough for ram + sqrt(ram) for sleep and hibernate to work properly.
and you may need to un comment and modify some of the keys in /etc/systemd/sleep.conf depending on your distro’s defaults.
Hey, don’t give up that fast
A little digging is fine for everyone and really not that hard.
Assuming you had the sleep problem and had to hard-reboot your laptop, you can do the following:
Let’s have a look at what the kernel did on your last boot. Open a terminal (look for Konsole in the application launcher). There, you can enter this
journalctl -r -b -1
This will show all the messages from the boot before your current one (the -1) in reverse order. It will open like a file-viewer in the terminal. You can move through the messages with the arrow keys or j and k. You can exit this by pressing q.
You can save this into a file with
cd Desktop
journalctl -r -b -1 > boot-messages.txt
This will put the file on your desktop. You can then paste it here for us to have a look at.
journalctl -r -b -1
Specifying boot ID or boot offset has no effect, no persistent journal was found.
Patience!
Have found way to sleep via shortcuts after locking screen.
This a.m., it locked after a min. or so.
2 and a half hours later… it woke up after simple keyboard touch.
If this holds, i’ll be happy for now.
Ah, now we’re getting somewhere. Do you - by any chance - have a Lenovo laptop?
I have an X13 G5 and on this, it wakes from sleep by opening the lid or pressing the FN key. The power button will not wake the laptop. But that is normal. And it doesn’t have anything to do with KDE or Linux.
On my desktop tower PC and my older Lenovo laptop the power button will wake the system. But again, this is a hardware / BIOS thing.
Did you maybe install a BIOS update which introduced this “feature”?
After 3 hours away for yard work… with system on sleep mode… as before, it didn’t want to wake up. Probably wants to sleep in more, ahead of the weekend.