Sleep kills running Apps

After a fresh install (Tumbleweed KDE/Plasma) I’ve left my desktop computer with it’s default power saving configuration.

However I find that on automatically going into sleep mode it terminates running applications. Not all, I have 4 apps that I leave open all the time including at shutdown and which are restored on boot, these are conserved. Anything else is killed.

This is not very useful.

Could you name a couple of the apps that get killed off when Sleep mode is engaged ?

This last time Firefox and RawTherapee - and they are killed, not shut down. When I re-opened Rawtherapee it opened in the folder I was using at the start of the session and I’d lost the edits I’d been working on.

It would seem to revert to the beginning of the session at boot - the apps I deliberately leave open so they open automatically on startup.

It would help if you can open an application from the command line, leave that running, and sleep. If the application is gone with after restore share what is on that console.

For firefox that does not work, it detaches itself for the consolse, but for most application it should work.

Had some things to do, so thought I’d start up Firefox which has about 4-5 tabs open … left if running in the foreground, and put the laptop to Sleep.

Came back over an hour later and open up the laptop’s lid to bring it out of Sleep … there it is, Firefox still running as I expected.

Maybe you’re really putting your machine into Hibernate mode vs Sleep mode?
I’ve found Hibernate is volatile (unpredictable) and never use it - ever.

Looking at the power-saving settings, which I’d left on default, it’s supposed try to hibernate after having slept for a while… so it would seem to be that process.

I tried your idea of using Konsole to start an app and see what would happen if I hibernated it - it refused to go into hibernation!

I changed the configuration.

It’s a pity they can’t get hibernation to work properly, particularly as energy saving is vitally important now.

Do you have a swap partition the size of your RAM? That’s required for hibernation.

It’s twice the RAM, officially, and mine’s a little over.

I have used hibernation and it works, sort of. I’m going to fiddle about with it to see what works and doesn’t.

1 Like

Update
Actually it’s not trying to hibernate… The bloody thing’s rebooting the machine! I was on the phone and I thought it was going to sleep and instead it rebooted.

I checked in KDE system power settings and it says nothing about rebooting, so where it’s got the idea from god alone knows…

Did you capture the logs after it happened ?

How do you do that?..

Not good with logs…

journalctl -b -1 --no-pager --full

executed as root immediately after “resume” (or reboot in your case) would be a good start. Upload to https://susepaste.org/

I followed instructions and the file is here https://paste.opensuse.org/pastes/d242519a17a1.

Apps running at the time :
Krusader
Krita
Rawtherapee
Firefox
Zotero
Thunderbird
Ktorrent
KeepassXC

forgot to execute as root… still, it’s a start… next time “sudo…”

No, you did not. I said “as root”.

2nd try…
https://paste.opensuse.org/pastes/539d5d237229

Might I respectfully suggest putting “sudo” at the beginning of root code - that way idiots like me who copy blindly what is there would automatically be root…

This time it wouldn’t wake at all from sleep and then rebooted (without me hitting the button)

Well, I uploaded the file and heard nothing - I gave it a lifespan of 7 days, so it ain’t there any more.