Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4940

Official Display • Turning the display blank from command line

$
0
0
Hello all

For my kids touch media player for audiobooks (https://github.com/Roemer/TouchMediaPlayer), I finally switched from an RPI 3b+ to an RPI 5. The kids will love the much improved performance.

But I still have one issue:
I have a button for them to send the screen to sleep until they touch the display again. In the RPI3+, I did this with the following command:

Code:

xset -display :0 s activate
but that does not work with RPI5 + bookworm.

I tried many commands:

Code:

DISPLAY=:0 xset dpms force offDISPLAY=:0 xset s blankxset -display :0 dpms force offxrandr --display :0 --output DSI-0 --offxrandr --display :0 --output DSI-1 --offxrandr --display :0 --output DSI-2 --off
But nothing does work. The Screen Blanking from the settings seems to work as it makes the screen go to sleep after 10 minutes or so but what is a working way to make it go to sleep immediately with a command?

Many thanks for your help!

Edit: I can turn the screen off with

Code:

wlr-randr --output DSI-2 --off
but that does completely turn it off and does not turn it back on with a touch on the display. I don't want to turn it off, just go to sleep like the "Screen Blanking" does.

Statistics: Posted by Roemer — Sat Apr 27, 2024 7:50 pm — Replies 0 — Views 16



Viewing all articles
Browse latest Browse all 4940

Trending Articles