The monitor turns on immediately after `Turn Off Screen` shortcut

The situation is very much the same as described in Monitor will not power off and remain off

I press the shortcut, the screen turns off, and then, in one second, it goes back on.

The system info is above.

Can you suggest something to try? I’ve tried disabling Kscreen 2 as suggested in https://www.reddit.com/r/kde/comments/ewbqst/display_doesnt_sleep_in_power_save_mode/, didn’t help

Do you have Steam running? It will block the screen powering off. I have to turn off Steam to make it work at all.

On X-11, I often have to do it 2 or 3 times before it stay off. Wayland it works just fine.

pgrep -iaf steam returns nothing, so it doesn’t run

hmmm, funny, but I’ve found something

I’ve set the shortcut Turn Off Screen to Meta+m, and it shuts the screen off but brings it back immediately

The command xset dpms force off in the terminal works, though. The monitor remains off for some time… until the external monitor is switched off.

I have Philips 329P1H connected via USB-C. And it looks like it enters standby mode, the number of screens in Settings -> Display and monitor -> Display configuration switches to 1, and the screens are enabled.

It turns off when you press the key. Then when you release the key, that event turns it back on.

Try to press both keys very quickly and very simultaneously. It’s much better in Wayland, as screens turn off smoothly there, gives you about 1 second to release the key.

Or it would help if you bind the shortcut to a single key, e.g. F12, and press it quickly.

it behaves the same as with Meta+m

The only way I could ever get this to work was by putting it into a script, so I could add the sleep line. Then call the script.

I put this in ~/.local/bin/XSreenOff.sh and place a link to it to click. You can also set a hot key to it.

#!/bin/bash
# puts the monitor into powersave mode.
# Any mouse movement or keystroke will turn it on again.

# It needs to be placed in a location in the $PATH and then drop a link
# to it on the desktop. Don't forget to set it to executable!

sleep 3  # Gives 3 seconds to let go of the mouse if clicking a link on the desktop.

# Choose the one that works for you. For me, they all work fine.
#xset dpms force suspend
#xset dpms force standby
xset dpms force off

I also have one for Wayland. Sometimes, you just want to darken the room without having to wait for the timeout.

Place script in ~/.local/bin/WSreenOff.sh

#!/bin/bash

# This script will immediately put the monitor into powersave mode.
# Any mouse movement or keystroke will power the monitor on again.
# It must be placed in the $PATH and be set to executable.
# You can run it from a shortcut on your desktop if needed.
# This only works in a Wayland Plasma session.


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

But it doesn’t work. Whenever the external monitor enters into standby mode, the screen on the laptop becomes the only one, and they both turn on again.

It looks like plasma processes the displays scheme change as signal to brings everything back

I no longer have a laptop and and external monitor to test with, so I can’t help any further with this one, but that does make sense.

This is 423035 – Turn off screen shortcut turns the screen back on automatically.

1 Like

I don’t think so. Launching xset dpms force off disables the screens. Then, both laptop’s and external monitor remain off for a time while the external monitor is not switched off completely. And then the laptop’s screen becomes the only one, triggers itself on, and external switches on too.

2024-01-24 21-46-51

I had a similar problem once. Turned out to be a bad hdmi cable.

Every time I have seen this posting the thought pops into my head, what is wrong with pushing the power button to turn off the monitor? A tried and true method that works flawlessly for me to have a monitor not display an image anytime it feels like it. Seeing the video just now reinforces that thought, it appears to be within arms reach for easy access to the power button…

@redgreen925

That was my first thought. When I powered the monitor on again, things had moved around.

Lovely, I call that one the monitor lottery. That can be the disadvantage especially if using the Wayland. With that the programs just go wherever random chance seems to put them. With X11 on my install they stay put for the most part when powered off and on, I cannot remember the last time any of them moved from their monitor to another. Though when I boot my spare machine with a new clone of my OS what an ungodly mess I get there as all the programs start on the single monitor attached to it, when the session is restored.

1 Like

For me, it wasn’t just the icons that moved around. Programs that I had open were moved and resized, much like the resolution had changed somewhere in that time frame.

  1. People might have multiple monitors. So one shortcut is more convenient than multiple power buttons.

  2. Laptops have no such button. And closing the lid is usually bound to sleeping. So when you want to turn off the screen without enter sleep, you either turn on the sleep inhibitor and close the lid, or use this shortcut. Some might just prefer the latter.

2 Likes

Oh yeah I can see it happening there is still a lot of work to be done to solve all the glitches. I do not care about icons on desktop I never have used them at all. Anything I want to start quickly is pinned to my taskbar. Then the rest is a quick Meta key and type a few letters brings it up in the launcher to hit enter and start it.

I only have a handful of icons on the desktop. They are just there temporarily. Moving my open apps is another ballgame.