oz1sej
Posts: 11
Joined: Tue Feb 23, 2016 11:16 am

Disabling screensaver on Buster

Sun Aug 25, 2019 10:23 am

I've been playing with Raspberry Pi a lot for the past few years, but it seems like the standard way of disabling the screen blanker has changed with Buster. Normally, I would add the lines

Code: Select all

@xset s noblank 
@xset s off 
@xset -dpms
to either

Code: Select all

~/.config/lxsession/LXDE/autostart
~/.config/lxsession/LXDE-pi/autostart
/etc/xdg/lxsession/LXDE/autostart or
/etc/xdg/lxsession/LXDE-pi/autostart
Now, on my lastest Buster, I've added the lines to /etc/xdg... and it's not working. Moreover, I don't have a ~/.config/lxsession folder, so I can't add it there.

So does anyone know how to do this in Buster?

alphanumeric
Posts: 2514
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Disabling screensaver on Buster

Sun Aug 25, 2019 11:05 am

I'm lazy, I just install xscreensaver, then set it to disable. No screen blanking after that. ;)

oz1sej
Posts: 11
Joined: Tue Feb 23, 2016 11:16 am

Re: Disabling screensaver on Buster

Mon Aug 26, 2019 7:25 am

alphanumeric wrote:
Sun Aug 25, 2019 11:05 am
I'm lazy, I just install xscreensaver, then set it to disable. No screen blanking after that. ;)
That was a great tip - thank you so much! :-)

klricks
Posts: 7129
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Disabling screensaver on Buster

Tue Aug 27, 2019 1:35 am

xscreensaver works but is a 40MB download and adds a background process.
(I haven't tried xscreensaver on RPi 4)

The default autostart for Buster and later updates to Stretch is:

Code: Select all

/etc/xdg/lxsession/LXDE-pi/autostart
To stop blanking on a RPi B3+ or < put these 2 commands in autostart: (Stretch or Buster)

Code: Select all

@xset s off 
@xset -dpms
To stop blanking on RPi4B use these commands in autostart:

Code: Select all

@xset s off
@xset dpms 0 0 0
To enable blanking at a different timeout period: (For example 15 min instead of the default 10 min.)

Code: Select all

@xset s off
@xset dpms 900 0 0
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

LichtiMC
Posts: 2
Joined: Sun Jun 17, 2018 8:52 am

Re: Disabling screensaver on Buster

Sat Nov 23, 2019 10:37 pm

Apparently the commands are only respected when added a pause (e.g. sleep 5) before the commands.
Seems like something overrides dpms values with:

Code: Select all

DPMS (Energy Star):
  Standby: 7200    Suspend: 7200    Off: 14400
  DPMS is Disabled
Does anyone know where these defaults are being set?

User avatar
Paeryn
Posts: 2950
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Disabling screensaver on Buster

Sun Nov 24, 2019 1:53 am

LichtiMC wrote:
Sat Nov 23, 2019 10:37 pm
Apparently the commands are only respected when added a pause (e.g. sleep 5) before the commands.
Seems like something overrides dpms values with:

Code: Select all

DPMS (Energy Star):
  Standby: 7200    Suspend: 7200    Off: 14400
  DPMS is Disabled
Does anyone know where these defaults are being set?
There's no need to pause before calling xset, if you are needing to then you definitely have something else running that is setting its own values. Those aren't the default timeouts as if not explicitly set they are 600 (10 mins) for each.

How are you adding a sleep 5 before it? LXDE doesn't run the autostart lines through a shell, each line is a single program and its arguments (and they are spawned as separate processes) so to have xset run after a sleep you need to put them in a shell script and have autostart run that shell script.

Also, I've never understood why people make two runs of xset when all the options can be given in one invocation. I've always used

Code: Select all

xset -dpms s off
and never had any problems.
She who travels light — forgot something.

tvguy
Posts: 1
Joined: Mon May 18, 2020 9:35 pm

Re: Disabling screensaver on Buster

Mon May 18, 2020 9:39 pm

alphanumeric wrote:
Sun Aug 25, 2019 11:05 am
I'm lazy, I just install xscreensaver, then set it to disable. No screen blanking after that. ;)
I'm using Retropie 4.6 with -- I've installed xscreensaver via the command line. How the heck do I set the screensaver to disable? Is there a command line I can run using Putty? I don't want to make changes to boot options or anything like that because I don't want to mess up my emulation station setup. Plz post directions or message me. Thanks!

fruitoftheloom
Posts: 23089
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Disabling screensaver on Buster

Tue May 19, 2020 4:17 am

tvguy wrote:
Mon May 18, 2020 9:39 pm
alphanumeric wrote:
Sun Aug 25, 2019 11:05 am
I'm lazy, I just install xscreensaver, then set it to disable. No screen blanking after that. ;)
I'm using Retropie 4.6 with -- I've installed xscreensaver via the command line. How the heck do I set the screensaver to disable? Is there a command line I can run using Putty? I don't want to make changes to boot options or anything like that because I don't want to mess up my emulation station setup. Plz post directions or message me. Thanks!

xscreensaver requires you have xwindows installed, so unless you installed the Desktop Environment it is not what you want:

https://www.jwz.org/xscreensaver/man1.html

https://www.raspberrypi.org/documentati ... ensaver.md
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

Return to “Troubleshooting”