1

I want to do a bunch of tasks before and after the screensaver is activated in KDE (still using X11, since Wayland has too many flaws even after 10 years). So I made a custom script that is triggered after 5 minutes of inactivity (KDE settings > Power Management > Other Settings).

The problem: when I come back and press a key, KDE takes around 8 seconds to show the desktop, and when it does, it is not quite ready, turns the screen off/on, moves things around, blinks, etc, during around 6 to 8 seconds more until it is finally back from the Dead. Probably that consumes more energy than keeping the screen on!

This is my script:

#!/bin/bash sleep 2 xset dpms force off 

If instead of the xset line I put the next line the problem persists:

dbus-send --session --print-reply --dest=org.kde.kglobalaccel \ /component/org_kde_powerdevil org.kde.kglobalaccel.Component.invokeShortcut \ string:'Turn Off Screen' 

So: why is KDE making such a mess, and how can I prevent it?

Or maybe there is a better way to do this? I would love to know your own way.

2
  • @terdon Please see my edit. Commented Nov 10, 2024 at 20:38
  • Thanks, that makes things much clearer (but also much weirder, I have no clue what could cause this given that very simple script). Commented Nov 10, 2024 at 22:40

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.