0

I have a Raspberry Pi 4 with the official 7" touchscreen with the latest Raspberry Pi OS installed. In the GUI, I've turned on Screen Blanking. It does exactly what I want -- the screen's backlight turns off and the screen is pitch black. The default time for this is 10 minutes.

I've gone searching the interwebs to change this timing. Though I come up with scads of proposed solutions, I have had no success yet. I want to shorten the screen blanking time to one minute.

Note: I've tried the xscreensaver route, but it doesn't turn off the backlight.

Any thoughts?

1

I'm playing in the same corner right now but I want to turn off the blank during the day and let it happend off working hour so I have the info on hand, here it is.

To view current settings:

$ xset q
[...]
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  600
[...]
DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Disabled

As you can see the timer are set to 600 seconds(10minutes)

Adjust for example one hour with:

$ xset s 3600
$ xset dpms 3600 3600 3600

Take a look at the dpms flags in the manpage, the three settings(standby, suspend and off). You can probably just set the first command and it will do it for you, the second allow you to manage the energy star parameters.

Hope this helps.

Ressources: https://linux.die.net/man/1/xset

4
  • Thank you so much! I used xset s 60 60 and the screen goes dark after one minute. Exactly what I needed. – pkSML Feb 24 at 12:31
  • 1
    As for your use case, you could use a cron script that executes your xset commands, e.g. DISPLAY=:0 /usr/bin/xset s YOUR_PARAMETERS. Source: linuxquestions.org/questions/linux-desktop-74/… – pkSML Feb 24 at 12:41
  • 1
    Also note: xset parameters are temporary. They won't survive a reboot. I'm re-setting them using @reboot in cron. – pkSML Feb 24 at 13:04
  • 1
    Yeah that's exactly what I did with few cron jobs to adjust settings according to a fix schedule. Glad it helped you! – Rene Jr Purcell Feb 25 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.