k7cwa
Posts: 1
Joined: Wed Dec 23, 2015 5:15 pm

How to change display timeout

Wed Dec 23, 2015 5:52 pm

I am running Raspbian on my Raspberry 2B unit. It works perfectly but I want to figure out how I can change the screen timeout time. I want to monitor a screen for long periods of time and I can't stop the screen from timing out and going blank. Where is this timeout period determined and set?

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

Re: How to change display timeout

Wed Dec 23, 2015 7:36 pm

k7cwa wrote:I am running Raspbian on my Raspberry 2B unit. It works perfectly but I want to figure out how I can change the screen timeout time. I want to monitor a screen for long periods of time and I can't stop the screen from timing out and going blank. Where is this timeout period determined and set?

Code: Select all

sudo apt-get update
sudo apt-get install xscreensaver
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: How to change display timeout

Sat Dec 26, 2015 1:19 pm

If you are using the GUI windowed display, open a Terminal screen and type

Code: Select all

xset s noblank
xset s off
xset -dpms
That will stop it going blank. Unfortunately, if you reboot the Pi the screen will start blanking again. Still using the Terminal, type

Code: Select all

sudo nano /etc/xdg/lxsession/LXDE/autostart
Add these lines at the bottom:

Code: Select all

@xset s noblank
@xset s off
@xset -dpms
Then hold down the Ctrl key and press O (thats 'Oh'), press Enter to access the file name (don't change that), and then hold down the Ctrl key and press X (to exit)

HOD
Posts: 12
Joined: Wed Jun 13, 2012 9:24 pm

Re: How to change display timeout

Mon Mar 18, 2019 10:21 pm

Also the default X screensaver can have it's timeout changed by setting a value in seconds with:
@xset s 120
(in this example 120s or 2 minutes).
Regards,
Ian.

Andyroo

Re: How to change display timeout

Mon Mar 18, 2019 11:08 pm

If you ever go headless (now that’s a strange thing to say) then there is an older thread where we hit our head against a problem where these do not help viewtopic.php?p=1426207

Fortunately the fix was worked out :lol: and is in the thread

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

Re: How to change display timeout

Tue Mar 19, 2019 12:02 am

Navyscourge wrote:
Sat Dec 26, 2015 1:19 pm
If you are using the GUI windowed display, open a Terminal screen and type

Code: Select all

xset s noblank
xset s off
xset -dpms
That will stop it going blank. Unfortunately, if you reboot the Pi the screen will start blanking again. Still using the Terminal, type

Code: Select all

sudo nano /etc/xdg/lxsession/LXDE/autostart
Add these lines at the bottom:

Code: Select all

@xset s noblank
@xset s off
@xset -dpms
Then hold down the Ctrl key and press O (thats 'Oh'), press Enter to access the file name (don't change that), and then hold down the Ctrl key and press X (to exit)
xset s noblank is not needed but won't hurt.

The correct path to autostart is:

Code: Select all

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Note that if you haven't updated in awhile then autostart may still be at the old location:

Code: Select all

nano /home/pi/.config/lxsession/LXDE-pi/autostart
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

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

Re: How to change display timeout

Tue Mar 19, 2019 1:02 am

HOD wrote:
Mon Mar 18, 2019 10:21 pm
Also the default X screensaver can have it's timeout changed by setting a value in seconds with:
@xset s 120
(in this example 120s or 2 minutes).
In the Raspbian desktop there are 2 screen-blankers running at the same time both with default 10 min. timeout.
So you have to either set both to the same value or turn one of them off.

Code: Select all

xset s 120
xset dpms 120 120 120
or

Code: Select all

xset s 120
xset -dpms 

To view the current settings:

Code: Select all

xset q
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

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

Re: How to change display timeout

Tue Mar 19, 2019 1:14 am

k7cwa wrote:
Wed Dec 23, 2015 5:52 pm
I am running Raspbian on my Raspberry 2B unit. It works perfectly but I want to figure out how I can change the screen timeout time. I want to monitor a screen for long periods of time and I can't stop the screen from timing out and going blank. Where is this timeout period determined and set?
You did not mention if you are booting to desktop or running CLI only.
If CLI then see this: https://www.raspberrypi.org/documentati ... ensaver.md

If desktop then either use the xset commands as mentioned or install xscreensaver then set the mode: [Disable Screen Saver]
Note xscreenaver is a 40MB install and adds a background process.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Return to “Beginners”