Command for idle screen

I want to set my new KDE system similar as on my old Mate system.

What are the commands alternatives similar as:

Screensaver timeout in minutes
2 min
dconf write /org/mate/desktop/session/idle-delay "2"

Screen turn-off delay in seconds
5 min
dconf write /org/mate/power-manager/sleep-display-ac "300"

Weird, I can’t edit my post.
So, my edit will be:
What are commands to set

  • screensaver timeout
  • screen turn-off delay

In the SystemSettings UI the first timeout is in the screen lock section, the second in the power management section

I ask for the commands, in order to make a script for specific purpose.

From the modifications of the system settings app my guesses are

kwriteconfig6 --file kscreenlockerrc --group Daemon --key Timeout 2
kwriteconfig6 --file powerdevilrc --group AC --group Display --key TurnOffDisplayIdleTimeoutWhenLockedSec 300

thanks, so if I understand well, KDE doesn’t have a screensaver without lock screen, right ? If we disabled lock screen for kscreenlockerrc then session can’t be manually locked with win+L. Weird.

I don’t think that’s right.

You can set locking to never happen, like this:

Then still set whatever time you like for “turn off screen” here in Power Management. (Obviously the “When locked:” part of the setting will have no effect.)

That’s I affirm. If lock screen auto is set to never in screen locking + turn off screen in minutes = then there is not a screen saver + lock screen is disabled even with type win+L. Is there other way to setup a screensaver (not turn off screen) and keep the possibility to lock screen with type win+L ? I never see this kind of weird setupt in other Linux DE.

Do you mean “screensaver” in the traditional sense of an animated image on a black background, like we used to use to avoid burning our CRTs? I can see that people might want the same thing now with OLEDs, for the same reason.

I don’t think Plasma provides that at all as standard. The lockscreen is just a static image, which is the opposite of a screensaver. (Edit - to be fair, Slideshow is available, which would be a bit better than a static image.)

Yep, a screensaver to displays fix color or animations when a computer is idle, screen turn on.
In orther words, I want a screensaver (screen turn on) and the possibility to lock screen with win+L. Acutally, I didn’t succeed with KDE.

I give up my search. I found another way.

As KDE has no screensaver without turn off screen, then I made this script to create a black window fullscreen, and run it when idle. I set my custom screensaver like this:

Settings

  • Power Management
    • Display & brightness
      • Automatically adjust after 2 minutes
      • Turn off screen: After 5 minutes
      • When locked: Turn off screen after 1 minute
    • Other Settings
      • When inactive: After 2 minutes
      • Execute: qml6 /Scripts/KDE_black_screensaver.qml
  • Screen Locking
    • Lock screen automatically: Never
    • Enable: Lock on resume from suspend
import QtQuick
import QtQuick.Window

Window {
    visible: true
    visibility: Window.FullScreen
    color: "black"
    flags: Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint

    Item {
        anchors.fill: parent
        focus: true
        Component.onCompleted: forceActiveFocus()
        Keys.onPressed: Qt.quit()
        MouseArea {
            anchors.fill: parent
            cursorShape: Qt.BlankCursor
            onPressed: Qt.quit()
            onWheel: Qt.quit()
            onClicked: Qt.quit()
        }
    }
}

Just as a minor hint: MouseArea is an Item you could just use it as the window’s content item