Kde Neon Plasma 6.4 will not wake up from sleep mode

After only 10 min. (or so) in sleep mode, must hard shutdown (twice) before getting back.

Operating System: KDE neon User Edition
KDE Plasma Version: 6.4.0
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.0
Kernel Version: 6.11.0-26-generic (64-bit)
Graphics Platform: Wayland
Processors: 6 × Intel® Core™ i5-8500 CPU @ 3.00GHz
Memory: 8 GiB of RAM (7.6 GiB usable)
Graphics Processor: Intel® UHD Graphics 630
Manufacturer: Dell Inc.
Product Name: OptiPlex 7060

Update: after posting, tried cleaning out tons of cache (remnants of initial install) with Stacer.
Reboot this a.m., still same issue.

1 Like

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?

Never had this issue with previous 6.3

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.

Manual, pushing shutdown button as “sleep” mode didn’t work again…

@poljpocket - where do i find the “journals” to look at?

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).

Thanks for the tip about ksystemlog (which showed no errors).

Disabling Plasma suspend is a no brainer.
But creating a systemd command with script… that’s another story!

this is my script, which i keep in ~/bin

#!/bin/bash

sudo systemctl suspend-then-hibernate

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.

this of course assumes your distro uses systemd

Think i’m sorry to have asked bud.
This is too techie for my little head.
So much manual labor waiting for me…

Might just go over to Fedora who still have 6.3

Hey, don’t give up that fast :slight_smile:
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.

Disclaimer: This log may contain sensitive information. Be mindful when posting stuff like this online.

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”?

Nothing different from previous installs before and up to Plasma 6.3:

OS: KDE neon User Edition x86_64
Host: DELL OptiPlex 7060
Kernel: Linux 6.11.0-26-generic
Uptime: 2 hours, 58 mins
Packages: 2271 (dpkg), 9 (flatpak)
Shell bash 5.2.21
interface ‘kde_output_device_v2’ has no event 27
Display (DP-2): 1920x1080 @ 60 Hz in 22" [External] *
Display (DP-1): 1920x1080 @ 60 Hz in 22" [External]
DE: KDE Plasma 6.4.0
WM: KWin (Wayland)
WM Theme: Breeze
Theme: Breeze (Dark) [Qt], Breeze-Dark [GTK2], Breeze [GTK3]
Icons: bes-own-circle-teal [Qt], bes-own-circle-teal [GTK2/3/4]
Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK2/3/4]
Cursor: breeze (24px)
` Terminal: konsole 25.4.2
CPU: Intel(R) Core™ i5-8500 (6) @ 4.10 GHz
GPU: Intel UHD Graphics 630 @ 1.10 GHz [Integrated]
Memory: 3.85 GiB / 7.55 GiB (51%)
Swap: 0 B / 512.00 MiB (0%)
Disk (/): 19.90 GiB / 84.57 GiB (24%) - ext4
Local IP (eno1): 192.168.1.3/24
Locale: en_US.UTF-8

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.

Back to square one.

what is the contents of

/etc/systemd/sleep.conf

and what does

swapon

say?

No longer use sleep mode for now.
Just shutdown.

[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateDelaySec=
#SuspendEstimationSec=60min

swapon
NAME TYPE SIZE USED PRIO
/swapfile file 512M 0B -2

Hum… don’t want Hibernation.

Maybe that’s the problem?

you need more swap if you want to suspend with 8GB of ram.

configure a swap space of at least 12GB of space.

if you want to prevent hibernation, you need to edit that file

remove the comment “#” and change the value to “no”

Normally I set KDE Neon 6.3 to replace a partition and it did well for me in the past.

Time for manual partitioning?

i prefer a swap partition so you can add the partition UUID to grub and that way the kernel will load everything back into ram again when it wakes up.

not sure you can do the same with swap file, or even how to make it persistent across reboots.

so, yes… that would mean you need to free up some unallocated space and make a swap partition.