Home

Is there a way to turn on the screen programmatically in Wayland (KDE Plasma 6)?

$$19228
https://europe.pub/u/blackbeard posted on Mar 28, 2026 11:37

Hi everyone, I’m running KDE Plasma 6 with Wayland and I’m trying to find a way to turn on the screen programmatically via the command line. In X11, I could use xset dpms force on, but this doesn’t work in Wayland due to its security model. Has anyone found a reliable method to wake or turn on the screen from the command line in a Wayland session? I’m aware of the security and architectural reasons behind this limitation, but I’m curious if there are any workarounds, compositor-specific DBus calls, or third-party tools that might help. What I’ve tried so far: xset dpms force on (fails, as expected)

Simulating keyboard input with wtype/ydotool (unreliable)

Checking KWin’s DBus interface (no obvious method exposed)

Context: I’m automating some tasks and would like to avoid switching back to X11 just for this feature. Any insights, scripts, or suggestions would be greatly appreciated! Thanks in advance for your help.

https://europe.pub/post/10816439
Reply
$$19230
https://lemmy.world/u/Hominine posted on Mar 28, 2026 11:48
In reply to: https://europe.pub/post/10816439

screen_off = “qdbus org.kde.kglobalaccel /component/org_kde_powerdevil invokeShortcut ‘Turn Off Screen’” I use this on deck and the following on desktop where the monitors shut off: kscreen-doctor output.DP-2.disable hope it helps! 

https://lemmy.world/comment/22914133
Reply
$$19239
https://lemmy.world/u/just_another_person posted on Mar 28, 2026 12:15
In reply to: https://europe.pub/post/10816439

Probablyrtcwake

https://lemmy.world/comment/22914443
Reply
$$19240
https://lemmy.zip/u/frongt posted on Mar 28, 2026 12:16
In reply to: https://europe.pub/post/10816439

Like the monitor has gone to sleep? Maybe ddcutil?

https://lemmy.zip/comment/25544767
Reply
$$19267
https://lemmy.sdf.org/u/lambalicious posted on Mar 28, 2026 13:27
In reply to: https://europe.pub/post/10816439

Hahahaha! Wayland sucks so much you users can’t even turn the screen on or off.

Welp, time to return to physical switches I guess!

https://lemmy.sdf.org/comment/26916815
Reply
$$19310
https://piefed.zeromedia.vip/u/guynamedzero posted on Mar 28, 2026 14:43
In reply to: https://lemmy.sdf.org/comment/26916815

Did you read anything other than half of the words in the title? If you’re a troll, please, stop, we don’t need more separation of communities in this world. If you’re not a troll and genuinely this stupid: get off the internet, go to your local library and just read any nonfictional book, that should give you some insight on how things actually work in the real world.

https://piefed.zeromedia.vip/comment/1981278
Reply
$$19338
https://piefed.social/u/minfapper posted on Mar 28, 2026 15:30
In reply to: https://europe.pub/post/10816439

I think it’s something like

kscreen-doctor --dpms off  

works the same as xset dpms

https://piefed.social/comment/10725670
Reply
$$19369
https://lemmy.world/u/gartheom posted on Mar 28, 2026 16:11
In reply to: https://europe.pub/post/10816439

I use this in a cronjob to turn a raspberry pi screen off at night and back on in the morning:

wlr-randr --output "HDMI-A-1" --off

wlr-randr --output "HDMI-A-1" --on

I’ve also go this environment variable set but I don’t know if it is needed outside of cron:

XDG_RUNTIME_DIR=/run/user/1000

https://lemmy.world/comment/22917796
Reply
$$20601
https://europe.pub/u/blackbeard posted on Mar 30, 2026 18:08
In reply to: https://lemmy.world/comment/22917796

Thank you for sharing your setup. Your solution using wlr-randr in a cron job is indeed useful for wlroots-based compositors (such as Sway, Hyprland, or labwc), where the wlr-output-management protocol is supported.

For those (like me) encountering the error ‘compositor doesn’t support wlr-output-management-unstable-v1’, this indicates that the compositor in use (e.g., KDE/KWin, GNOME/Mutter, or other non-wlroots compositors) does not support wlr-randr. In such cases, alternatives should be considered.

I will be post my findings, I can’t believe I’m the only or just one of the few looking to archive this in a laptop..

https://europe.pub/comment/6766434
Reply
$$20873
https://europe.pub/u/blackbeard posted on Mar 31, 2026 14:01
In reply to: https://piefed.social/comment/10725670

This works!

Key Commands

  1. List Connected Displays To see all connected outputs and their status:

kscreen-doctor -o``

Example output:

Output: 1 eDP-1
        enabled
        connected
        Modes: 1:2560x1600@60.00*!

This helps identify your display names (e.g., eDP-1 or HDMI-A-1).

  1. Turn Off All Displays (DPMS) To put all displays into low-power mode:

kscreen-doctor --dpms off

Uses DPMS (Display Power Management Signaling) to turn off displays safely.

  1. Turn On All Displays To wake all displays:

kscreen-doctor --dpms on

  1. Disable/Enable a Specific Output To control a specific display (e.g., HDMI-A-1):

kscreen-doctor output.HDMI-A-1.disable kscreen-doctor output.HDMI-A-1.enable

Note: Avoid disabling your primary/laptop panel (e.g., eDP-1) unless you have another display connected.

  1. Bonus: Adjust Brightness or Scale

kscreen-doctor output.eDP-1.brightness.50 # 0-100 kscreen-doctor output.eDP-1.scale.1.5 # Scale factor

https://europe.pub/comment/6780178
Reply