niallmca
Posts: 1
Joined: Sat Jul 02, 2016 6:04 pm

Re: Configure, disable screensaver, blankscreen, and lockscr

Sat Jul 02, 2016 6:08 pm

I'm using kweb (kiosk mode) on RPI3 and 7" touchscreen.
Been trying for weeks to stop the screen blanking every 10 minutes.
I had almost given up - because I tried a lot of things and none of them worked.
Until I saw this post. Now it's fixed, and no more blanking!!!

Many thanks :)

Best regards,
Niall.

marmachine
Posts: 16
Joined: Wed Oct 12, 2016 6:58 pm

Re: Configure, disable screensaver, blankscreen, and lockscr

Sun Apr 16, 2017 7:38 pm

dasmanul wrote:This looks like you're logged in remotely to your Pi. Try issuing

Code: Select all

export DISPLAY=:0
first and then repeat the commands.
Why is this giving me the following error when i add this to a Python script?

export DISPLAY=:0
^
SyntaxError: invalid syntax

rndmusr
Posts: 1
Joined: Fri Sep 01, 2017 1:56 pm

Re: Configure, disable screensaver, blankscreen, and lockscr

Fri Sep 01, 2017 4:10 pm

Hello, I've followed instructions quoted under my post succesfully on raspbian jessie. Now I've installed stretch (not upgrade, installed image, then update) screen is locking via shortcut c+a+l, but when my monitor is turned off (power saving mode after 600) when I return to rpi and move cursor or press key, screen isn't locked. How can I make it to autolock after monitor is turned off?

my output for xset q is:

Code: Select all

Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000002
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    on     02: Scroll Lock: off
    03: Compose:     off    04: Kana:        off    05: Sleep:       off
    06: Suspend:     off    07: Mute:        off    08: Misc:        off
    09: Mail:        off    10: Charging:    off    11: Shift Lock:  off
    12: Group 2:     off    13: Mouse Keys:  off
  auto repeat delay:  500    repeat rate:  30
  auto repeating keys:  00ffffffdffffbbf
                        fadfffefffedffff
                        9fffffffffffffff
                        fff7ffffffffffff
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  20/10    threshold:  10
Screen Saver:
  prefer blanking:  no    allow exposures:  no
  timeout:  0    cycle:  0
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,built-ins
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 600
  DPMS is Enabled
  Monitor is On
~/.config/lxsession/LXDE-pi/autostart contains:

Code: Select all

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@point-rpi
@xscreensaver -no-splash
@xset s 0 0
@xset s noblank
@xset s noexpose
@xset dpms 0 0 600
Can someone help me figure it out please? I dont want to use xscreensaver (I've uninstalled it, maybe it's also important). Appreciate any advice!
Rive wrote:
Sat May 07, 2016 2:12 pm
Configure the built in lxde screensaver, lock screen, and monitor (actually turn offs, not screen blanking) power save features via lightlocker which uses the Jessie login screen. This also allows you to use the keyboard shortcut to screenlock:

Instructional youtube video:
https://youtu.be/aTrp83lgq_s

Code: Select all

xset q
note- "xset q" is useful for checking screen and dpms settings, and changing them for testing (e.g., Monitor "off" is set for 1200 sec, or 20 min, and you want to test it, so you set dpms to 10 sec (xset dpms 0 0 10)). Changes here are temporary, and will not survive a reboot.

Run:

Code: Select all

sudo apt-get install light-locker
Open:

Code: Select all

sudo nano /boot/config.txt
Add:

Code: Select all

# uncomment to put the monitor into power saving mode (DPMS)
hdmi_blanking=1
Open:

Code: Select all

sudo nano ~/.config/lxsession/LXDE-pi/autostart
Add:

Code: Select all

@xset s 0 0
@xset s noblank
@xset s noexpose
@xset dpms 0 0 1200
Save with 'Ctrl + x', then 'y', then 'enter'

open:
(note- if you do an "apt-get dist-upgrade" instead of an "apt-get upgrade", you will need to re-add this keybind)

Code: Select all

nano ~/.config/openbox/lxde-pi-rc.xml
find:

Code: Select all

 <!--keybindings for LXPanel →
add:

Code: Select all

      <keybind key="C-A-L">
    <action name="Execute"><command>lxlock</command></action>
  </keybind>
The above dpms '1200', means turn off monitor after 20min, and lock screen with light-locker (lxlock). Change to whatever time you want (in seconds).

R4SPY
Posts: 1
Joined: Sun Jul 22, 2018 8:04 am

Re: Configure, disable screensaver, blankscreen, and lockscreen

Sun Jul 22, 2018 8:08 am

I am on stretch and screen locking would never happen. Eventually I succeeded by changing exec line in /etc/xdg/autostart/light-locker.desktop to look like:

Code: Select all

Exec=light-locker --lock-on-suspend --late-locking --lock-after-screensaver=1

Return to “Beginners”