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.
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.
# 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
# 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'
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.
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…
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.
People might have multiple monitors. So one shortcut is more convenient than multiple power buttons.
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.
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.