backmailingbox
Posts: 48
Joined: Tue Jan 19, 2016 2:30 pm

disable screensaver

Thu Jan 21, 2016 7:58 pm

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?

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: disable screensaver

Fri Jan 22, 2016 1:37 pm

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
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

jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Re: disable screensaver

Sun Feb 21, 2016 6:44 am

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?

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

Re: disable screensaver

Sun Feb 21, 2016 9:30 am

jwatte 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?
xscreensaver which has various options is in the repository ;)

https://www.jwz.org/xscreensaver
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: disable screensaver

Sun Feb 21, 2016 10:29 am

sudo nano /etc/kbd/config
BLANK_TIME=0 (Was 30)
POWERDOWN_TIME=0 (I think it was 15)
That method only works for the console, it won't stop desktop blanking
sudo nano /etc/xdg/lxsession/LXDE/autostart
@xset s noblank
@xset s off
@xset -dpms
That method is outdated, it hasn't used the /LXDE/ directory in quite a while.
sudo nano /etc/xdg/lxsession/LXDE-pi/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/lightdm/lightdm.conf
xserver-command=X -s 0 -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.
Is this really so complicated to do such stupid thing
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.

The last method works, and you hit the target, but didn't quite hit the bullseye. :D

jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Re: disable screensaver

Mon Feb 22, 2016 6:38 am

"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.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: disable screensaver

Mon Feb 22, 2016 3:49 pm

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).

Code: Select all

uname -a
Linux rpi3 4.1.17+ #838 Tue Feb 9 12:57:10 GMT 2016 armv6l GNU/Linux
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.

deanbayley
Posts: 3
Joined: Sat Mar 05, 2016 11:27 pm

Re: disable screensaver

Sat Mar 05, 2016 11:34 pm

I have followed these steps and the screen blanks exactly 10 mins after startup.

I am loading a java application using

/etc/rc.local

Code: Select all

su -s /bin/bash -c startx pi&
/home/pi/.xinitrc

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.

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: disable screensaver

Sat Mar 05, 2016 11:59 pm

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
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

deanbayley
Posts: 3
Joined: Sat Mar 05, 2016 11:27 pm

Re: disable screensaver

Sun Mar 06, 2016 12:07 am

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

Code: Select all

sudo /usr/bin/xset s off
sudo /usr/bin/xset -dpms
sudo /usr/bin/xset s noblank

and the display has been on ever since!!

Going to power down and back on and leave overnight..

deanbayley
Posts: 3
Joined: Sat Mar 05, 2016 11:27 pm

Re: disable screensaver

Sun Mar 06, 2016 10:38 am

Woke up this morning and its still on!

Return to “Official Foundation Display”