How to disable screensaver on official 7'' display and standard raspbian?
I am totally crazy about it
I did:
sudo nano /etc/kbd/config
BLANK_TIME=0 (Was 30)
POWERDOWN_TIME=0 (I think it was 15)
sudo nano /etc/xdg/lxsession/LXDE/autostart
@xset s noblank
@xset s off
@xset -dpms
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
@xset s noblank
@xset s off
@xset -dpms
sudo nano /etc/lightdm/lightdm.conf
xserver-command=X -s 0 -dpms
But no result. Is this really so complicated to do such stupid thing
like disable screen saver?
-
- Posts: 76
- Joined: Tue Jan 19, 2016 2:30 pm
Re: disable screensaver
Try adding the following to the /boot/cmdline.txt file :
consoleblank=0
(make sure it is added to the existing line of text - do not add a new line)
Texy
consoleblank=0
(make sure it is added to the existing line of text - do not add a new line)
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555
Re: disable screensaver
I applied this change and rebooted, but the display backlight still turns off after a few minutes.
(I'm booting into a logged-in X session.)
For what it's worth, when the display has gone to sleep, putting 0 or 1 into the bl_power control file does NOT turn it on.
I have to physically touch it to get backlight on again.
How can I control this auto-sleep behavior, and either turn it off entirely, or make it take a lot longer before it kicks in?
(I'm booting into a logged-in X session.)
For what it's worth, when the display has gone to sleep, putting 0 or 1 into the bl_power control file does NOT turn it on.
I have to physically touch it to get backlight on again.
How can I control this auto-sleep behavior, and either turn it off entirely, or make it take a lot longer before it kicks in?
-
- Posts: 27225
- Joined: Tue Mar 25, 2014 12:40 pm
Re: disable screensaver
xscreensaver which has various options is in the repositoryjwatte wrote:I applied this change and rebooted, but the display backlight still turns off after a few minutes.
(I'm booting into a logged-in X session.)
For what it's worth, when the display has gone to sleep, putting 0 or 1 into the bl_power control file does NOT turn it on.
I have to physically touch it to get backlight on again.
How can I control this auto-sleep behavior, and either turn it off entirely, or make it take a lot longer before it kicks in?

https://www.jwz.org/xscreensaver
Take what I advise as advice not the utopian holy grail, and it is gratis !!
Re: disable screensaver
That method only works for the console, it won't stop desktop blankingsudo nano /etc/kbd/config
BLANK_TIME=0 (Was 30)
POWERDOWN_TIME=0 (I think it was 15)
That method is outdated, it hasn't used the /LXDE/ directory in quite a while.sudo nano /etc/xdg/lxsession/LXDE/autostart
@xset s noblank
@xset s off
@xset -dpms
That's the global autostart, that won't work with Jessie since Jessie now provides a user autostart at "~/,config/lxsession/LXDE-pi/autostart", which takes precedence over the global autostart. So make changes in the user autostart instead.sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
@xset s noblank
@xset s off
@xset -dpms
That one works and is the method I use. But you have to add the line under the section "[SeatDefaults]" for it to work.sudo nano /etc/lightdm/lightdm.conf
xserver-command=X -s 0 -dpms
The first method is console only, the next two methods didn't work because they're outdated, but obviously still out there on the internet. When looking for info on the web, for how to do something, always check to see how current it is. If it's a year or a few old and it doesn't work then it's probably outdated info.Is this really so complicated to do such stupid thing
The last method works, and you hit the target, but didn't quite hit the bullseye.

Re: disable screensaver
"Jessie now provides a user autostart at "~/,config/lxsession/LXDE-pi/autostart", which takes precedence over the global autostart."
That's what I read in documentation, too, but I couldn't get it to work.
Editing the global file did work. (This also let me remove pcmanfm and lxpanel)
BTW, when using the /LXDE-pi/ directory, why does raspbian also ship /LXDE/? That's quite confusing.
That's what I read in documentation, too, but I couldn't get it to work.
Editing the global file did work. (This also let me remove pcmanfm and lxpanel)
BTW, when using the /LXDE-pi/ directory, why does raspbian also ship /LXDE/? That's quite confusing.
Re: disable screensaver
Probably to provide some backward compatibility if a package requires it. Looking into this version of Raspbian Jessie which was a fresh install, not an upgrade, using a Raspian image (no NOOBS).
In "/etc/xdg/lxsession" I have both "/LXDE/" and "/LXDE-pi/" directories. However, the /LXDE/ directory is dated 9-24-2015, and the autostart file inside is even older with a date of 10-25-2014. But since Jessie creates a users autostart it's not using either of those anyway, so it doesn't matter.
If you have a user autostart at "~/.config/lxsession/LXDE-pi/autostart" that should take precedence over the global. If the global you edited was using "/LXDE-pi/" that would seem to indicate there is something wrong with the user autostart, permissions, etc, and it can't use it, so it defaults back to the global configuration.
Code: Select all
uname -a
Linux rpi3 4.1.17+ #838 Tue Feb 9 12:57:10 GMT 2016 armv6l GNU/Linux
If you have a user autostart at "~/.config/lxsession/LXDE-pi/autostart" that should take precedence over the global. If the global you edited was using "/LXDE-pi/" that would seem to indicate there is something wrong with the user autostart, permissions, etc, and it can't use it, so it defaults back to the global configuration.
-
- Posts: 3
- Joined: Sat Mar 05, 2016 11:27 pm
Re: disable screensaver
I have followed these steps and the screen blanks exactly 10 mins after startup.
I am loading a java application using
/etc/rc.local
/home/pi/.xinitrc
Guessing something is overriding the default settings due to the way i'm starting it?
Spent 5-6 hours tearing my hair out over this.
Dean.
I am loading a java application using
/etc/rc.local
Code: Select all
su -s /bin/bash -c startx pi&
Code: Select all
@xset s off
@xset -dpms
@xset s noblank
python /home/pi/soft_shutdown.py
/home/pi/startts.sh
Guessing something is overriding the default settings due to the way i'm starting it?
Spent 5-6 hours tearing my hair out over this.
Dean.
Re: disable screensaver
This is the only method out of the umpty-billion listed above that has ever worked for me in Raspbian Jessie...
viewtopic.php?p=910245#p910245
viewtopic.php?p=910245#p910245
Pi4B 2GB Rev1.4 Mini-PC/Media Centre: ARM=2.25GHz @1.1v, Core=600MHz, GPU=850MHz. Raspberry Pi OS with KODI on 128GB Sandisk Extreme Pro A2 microSD card in Integral card reader in USB3.0 port (138MB/s read). Geekworm P173 case with copper shim on SOC.
-
- Posts: 3
- Joined: Sat Mar 05, 2016 11:27 pm
Re: disable screensaver
Just after posting this i tried something else as i noticed an error message saying xset couldn't be found, i changed the:
/etc/.xinitrc
and the display has been on ever since!!
Going to power down and back on and leave overnight..
/etc/.xinitrc
Code: Select all
sudo /usr/bin/xset s off
sudo /usr/bin/xset -dpms
sudo /usr/bin/xset s noblank
Going to power down and back on and leave overnight..
-
- Posts: 3
- Joined: Sat Mar 05, 2016 11:27 pm
Re: disable screensaver
Woke up this morning and its still on!