How to disable screen blanking ?
Hi,
The screen goes dark after a period of inactivity ... How to stop this ?
The screen goes dark after a period of inactivity ... How to stop this ?
Re: How to disable screen blanking ?
edit /boot/cmdline.txt *
and add
consoleblank=0
right after the rootwait
then reboot
*
if using NOOBS
then
Use the NOOBS recovery system [spam the [SHIFT] key during boot to activate it] and edit that /boot/cmdline.txt
and add
consoleblank=0
right after the rootwait
then reboot
*
if using NOOBS
then
Use the NOOBS recovery system [spam the [SHIFT] key during boot to activate it] and edit that /boot/cmdline.txt
Last edited by RaTTuS on Fri Apr 27, 2018 9:03 am, edited 1 time in total.
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
Re: How to disable screen blanking ?
Yes I am using Noobs.
What exactly should I add to that /boot/config.txt?
What exactly should I add to that /boot/config.txt?
Re: How to disable screen blanking ?
Exactly nothing.What exactly should I add to that /boot/config.txt?
I think there was a minor typing error - maybe due to autocorrect - in the second part of the advice above.
It is cmdline.txt that you need to modify with the Configuration Editor on the NOOBS Recovery Console.
Re: How to disable screen blanking ?
If I create a script with "xset s off" and run it will it work ?
Re: How to disable screen blanking ?
You can install an application:
sudo apt-get install xscreensaver
After installation. Go to Menu => Preferences => Screensaver, then just disable it there
sudo apt-get install xscreensaver
After installation. Go to Menu => Preferences => Screensaver, then just disable it there

Re: How to disable screen blanking ?
I believe the edit to cmdline mentioned above is only useful if the system is set to boot to command line only.
For boot to desktop then adding the 3 lines below to autostart works for me.
Edit with nano editor:
Add these 3 lines at the end:
Save and exit CTRL x Y
xscreensaver also works but you have to install 40MB of fluf.
For boot to desktop then adding the 3 lines below to autostart works for me.
Edit with nano editor:
Code: Select all
nano /home/pi/.config/lxsession/LXDE-pi/autostart
Code: Select all
@xset s noblank
@xset s off
@xset s -dpms
xscreensaver also works but you have to install 40MB of fluf.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.
Re: How to disable screen blanking ?
@klricks
Your solution worked. Thanks a lot.
Your solution worked. Thanks a lot.
Re: How to disable screen blanking ?
I could have sworn this also worked for me when I tried it earlier this year, but on a virgin Raspbian Desktop install ( image not NOOBS, no recommended software, updated to today, boot to GUI ), creating that file ( it didn't already exist ) with those contents just leaves me with a black screen after a reboot, albeit that the mouse cursor is there. Delete the file and reboot and everything is fine again.klricks wrote: ↑Wed Apr 25, 2018 1:11 amEdit with nano editor:Add these 3 lines at the end:Code: Select all
nano /home/pi/.config/lxsession/LXDE-pi/autostart
Save and exit CTRL x YCode: Select all
@xset s noblank @xset s off @xset s -dpms
Any ideas or suggestion on how to debug, find out what's wrong, or make it work ?
Re: How to disable screen blanking ?
Due to changes to mentioned in the blog, Raspbian now uses the global autostart in this location:hippy wrote: ↑Mon Jan 14, 2019 1:58 am....
I could have sworn this also worked for me when I tried it earlier this year, but on a virgin Raspbian Desktop install ( image not NOOBS, no recommended software, updated to today, boot to GUI ), creating that file ( it didn't already exist ) with those contents just leaves me with a black screen after a reboot, albeit that the mouse cursor is there. Delete the file and reboot and everything is fine again.
Any ideas or suggestion on how to debug, find out what's wrong, or make it work ?
Code: Select all
/etc/xdg/lxsession/LXDE-pi/autostart
Code: Select all
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@point-rpi
To stop screen blanking you only need these 2 commands:
Code: Select all
@xset s off
@xset -dpms
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.
Re: How to disable screen blanking ?
Ah yes. Many thanks for that. I had completely forgotten about that change

If disabling screen blanking had been a raspi-config or clickable desktop preferences or appearance option I wouldn't have had to care about what needed altering or where settings were stored.
It would be nice if options like this could be made more easily accessible than having to manually edit configuration files but I'm not going to suggest percussive re-education of any developers.
Re: How to disable screen blanking ?
I have an LCD screen on the Pi which is set as the main display on boot and displays the desktop. I want to use it as a displaybaord/kiosk so I have set up a service which runs a script file containing:
My web page displays correctly as full screen but the screen still blanks after 5-10 minutes. If I SSH to the Pi and type "xset -display:0 -dpms", the screen unblanks again.
What am I doing wrong?
I have also tried putting the xset commands in the /etc/xdg/lxsession/LXDE-pi/autostart file but no joy.
It is very frustrating
Code: Select all
#!/bin/bash
xset -display :0 s off
xset -display :0 s noblank
xset -display :0 -dpms
unclutter -display :0 &
# Normal website that does not need any exceptions
/usr/bin/chromium-browser --enable-gpu-compositing --remote-debugging-port=9222 --incognito --start-maximized --kiosk file:/home/pi/Pi-Plex/index.html
What am I doing wrong?
I have also tried putting the xset commands in the /etc/xdg/lxsession/LXDE-pi/autostart file but no joy.
It is very frustrating

Re: How to disable screen blanking ?
Did you install xscreensaver? xset commands won't work if xscreensaver is installed.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.
Re: How to disable screen blanking ?
Or, the traditional xorg way. Edit /etc/X11/xorg.conf and in the Monitor section, add
Code: Select all
Option "DPMS" "off"
Headless PI. OMG, someone cut it's head off. Oh, hang on. it didn't have one to start with.
Re: How to disable screen blanking ?
Do you have another autostart file anywhere in /home/pi/.config/........
If so the one in /etc/xdg/........ will be ignored.
Note this will show the current settings of the xset commands:
Code: Select all
xset q
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.
Re: How to disable screen blanking ?
That seems to have done the trick. Many thanks for that tip.Roken wrote: ↑Fri May 31, 2019 10:06 pmOr, the traditional xorg way. Edit /etc/X11/xorg.conf and in the Monitor section, add
Code: Select all
Option "DPMS" "off"

-
- Posts: 156
- Joined: Thu Dec 01, 2016 11:04 am
Re: How to disable screen blanking ?
Raspbian stretch changed a lot from november 2018 are you sure that these informations are updated? Which instructions should I use to disable the blank screen with raspbian stretch of may 2019?
I am using:
Raspberry Pi 3 model B and B+ - with Raspberry OS
Raspberry pi 4 (with 2 gb of ram) - with Raspberry OS
Raspberry Pi 3 model B and B+ - with Raspberry OS
Raspberry pi 4 (with 2 gb of ram) - with Raspberry OS
Re: How to disable screen blanking ?
The "xorg.conf" file is actually in the /usr/share/X11/xorg.conf.d folder. I have a number of files in there and one of them already had a Device section so I added a Screen and Monitor section as well, with the suggested Option. However in the end that didn't fix it (it did after one reboot but not thereafter for some reason).matteoraggi wrote: ↑Sun Jun 09, 2019 5:48 pmRaspbian stretch changed a lot from november 2018 are you sure that these informations are updated? Which instructions should I use to disable the blank screen with raspbian stretch of may 2019?
So my fix was to add a file in /etc/profile.d called screen.sh (the name doesn't matter) with:
Code: Select all
xset -display :0 s off
xset -display :0 s noblank
xset -display :0 -dpms
unclutter -display :0 &

-
- Posts: 658
- Joined: Mon Jan 01, 2018 2:14 pm
Re: How to disable screen blanking ?
I'm having the same problem
I have try this 2 options:
but after a few min the screen turn to black
why ?
what is wrong?
the screen didn't turn off for 2 months , but yesterday I did update&&upgrade
and then is start to make problems
is there any connection between?
I really need your help - this is a working disaply station
I'm ruuning
I have try this 2 options:
Code: Select all
/home/pi/.config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
@xset s noblank
point-rpi
@chromium-browser --start-fullscreen --start-maximized /home/pi/angular-node/src/startPage.html
@lxterminal -e /usr/bin/python3 /home/pi/mu_code/MyProgram/Startup.py
Code: Select all
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
@xset s noblank
@xset s off
@set s 0
@xset-dpms
point-rpi
@chromium-browser --start-fullscreen --start-maximized /home/pi/angular-node/src/startPage.html
@lxterminal -e /usr/bin/python3 /home/pi/mu_code/MyProgram/Startup.py
why ?
what is wrong?
the screen didn't turn off for 2 months , but yesterday I did update&&upgrade
and then is start to make problems
is there any connection between?
I really need your help - this is a working disaply station
I'm ruuning
Code: Select all
cat /etc/debian_version
9.9
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
-
- Posts: 17
- Joined: Sat Sep 29, 2012 7:53 pm
Re: How to disable screen blanking ?
I am having the same problem: after some time the screen turns black instead of going in stand by mode. It means it's always on unless I power it off myself.
I looked at the solutions but none worked. I could not add the lines in /home/pi/.config/lxsession/LXDE-pi/autostart because this file doesn't exist on my installation. Maybe that's because I installed xfce?
I looked at the solutions but none worked. I could not add the lines in /home/pi/.config/lxsession/LXDE-pi/autostart because this file doesn't exist on my installation. Maybe that's because I installed xfce?
Re: How to disable screen blanking ?
warpdesign wrote: ↑Fri Sep 27, 2019 7:36 amI am having the same problem: after some time the screen turns black instead of going in stand by mode. It means it's always on unless I power it off myself.
I looked at the solutions but none worked. I could not add the lines in /home/pi/.config/lxsession/LXDE-pi/autostart because this file doesn't exist on my installation. Maybe that's because I installed xfce?
Rapsbian now uses a different autostart location:
Code: Select all
/etc/xdg/lxsession/LXDE-pi/autostart
By default there is no standby mode. Only screen blanking which just turns the pixels black.
If you have a RPi3 or older then adding the following to /boot/config.txt will turn off HDMI when the screen blanks:
Code: Select all
hdmi_blanking=1
The above does not work on a RPi4.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.
Re: How to disable screen blanking ?
Hey Hippy, same thing happened to me, how did you delete that file when screen is black?
hippy wrote: ↑Mon Jan 14, 2019 1:58 amI could have sworn this also worked for me when I tried it earlier this year, but on a virgin Raspbian Desktop install ( image not NOOBS, no recommended software, updated to today, boot to GUI ), creating that file ( it didn't already exist ) with those contents just leaves me with a black screen after a reboot, albeit that the mouse cursor is there. Delete the file and reboot and everything is fine again.klricks wrote: ↑Wed Apr 25, 2018 1:11 amEdit with nano editor:Add these 3 lines at the end:Code: Select all
nano /home/pi/.config/lxsession/LXDE-pi/autostart
Save and exit CTRL x YCode: Select all
@xset s noblank @xset s off @xset s -dpms
Any ideas or suggestion on how to debug, find out what's wrong, or make it work ?
Re: How to disable screen blanking ?
If you mean you are geetting the gray openbox screen on boot, then right click on the screen and choose terminal.
Note that screen blanking can now be disabled using the GUI config tool or sudo raspi-config.... No need to edit any files.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.