Display goes blank after some time
#1
Hi,

I'm setting up a new install comprising a Raspberry Pi 3 B+, an "official 7" touchscreen", and Kodi Leia 18.4.

I have disabled the screensaver in Kodi, and also disabled it in /home/pi/.config/lxsession/LXDE-pi/autostart which contains:


@xset s off
@xset -dpms
@xset s noblank
@kodi


Still, after a few minutes, the display turns blank, and only rebooting the Pi brings it back to life.

Any clue?

Thanks in advance for your help.
Reply
#2
(2019-09-22, 20:01)sba923 Wrote: Hi,

I'm setting up a new install comprising a Raspberry Pi 3 B+, an "official 7" touchscreen", and Kodi Leia 18.4.

I have disabled the screensaver in Kodi, and also disabled it in /home/pi/.config/lxsession/LXDE-pi/autostart which contains:


@xset s off
@xset -dpms
@xset s noblank
@kodi


Still, after a few minutes, the display turns blank, and only rebooting the Pi brings it back to life.

Any clue?

Thanks in advance for your help.

It seems Kodi turns DPMS back on, even if the screensaver is off.

For now, I have to rely on the following ugly stuff:

/home/pi/.config/lxsession/LXDE-pi/autostart

@/bin/bash -c /home/pi/bin/kodi.sh


/home/pi/bin/kodi.sh

#!/bin/bash
 
while :
do
        kodi &
        kodi_pid=$!
        sleep 10
        while ps -ef | awk "\$2 == $kodi_pid { print }" | fgrep -qs 'kodi'
        do
                xset s off
                xset -dpms
                xset s noblank
                sleep 30
        done
done
Reply
#3
The changes that you did, only disables screen blanking on X11 (on the Desktop Environment). Kodi does not turn the display on or off, the thing is, Kodi on the Raspberry Pi does not use X11, so when you start Kodi, the system does not count it as it is being active. That is why that happens.
What you can do, is something like RetroPie does, that should work: https://github.com/RetroPie/RetroPie-Set...ols.sh#L40
Reply
#4
(2019-09-24, 17:03)rascas Wrote: The changes that you did, only disables screen blanking on X11 (on the Desktop Environment). Kodi does not turn the display on or off, the thing is, Kodi on the Raspberry Pi does not use X11, so when you start Kodi, the system does not count it as it is being active. That is why that happens.
What you can do, is something like RetroPie does, that should work: https://github.com/RetroPie/RetroPie-Set...ols.sh#L40

Thanks for the hint, but as you can read in this thread, there is no /etc/kbd/config file anymore in recent Raspbian distros, so that code can't work anymore...

Maybe I'll try the xscreensaver route.
Reply
#5
Hmm didn't know that... Then take a look at this, I never tried and didn't saw the code thought: https://github.com/linusg/rpi-backlight

PS: Ahhh, I just remembered, this is what I use: https://www.raspberrypi.org/documentatio...ensaver.md
Reply
#6
(2019-09-24, 18:17)rascas Wrote: Hmm didn't know that... Then take a look at this, I never tried and didn't saw the code thought: https://github.com/linusg/rpi-backlight

PS: Ahhh, I just remembered, this is what I use: https://www.raspberrypi.org/documentatio...ensaver.md

Thanks for the links!

The backlight thing is something else, I know about it since I used it in another project (that runs its UI within Firefox, so a X11 app, with the screensaver disabled via xset) to turn the display on/off and set its brightness depending on various parameters (night vs. day, ambient lighting, presence detection).

The screensaver.md document on the other hand seems to confirm my hunch: there is some kernel-based screensaver mechanism on the Pi that apparently can only be controlled via xscreensaver these days (I might first try disabling it completely via /boot/cmdline.txt).
Reply
#7
(2019-09-24, 21:08)sba923 Wrote:
(2019-09-24, 18:17)rascas Wrote: Hmm didn't know that... Then take a look at this, I never tried and didn't saw the code thought: https://github.com/linusg/rpi-backlight

PS: Ahhh, I just remembered, this is what I use: https://www.raspberrypi.org/documentatio...ensaver.md

Thanks for the links!

The backlight thing is something else, I know about it since I used it in another project (that runs its UI within Firefox, so a X11 app, with the screensaver disabled via xset) to turn the display on/off and set its brightness depending on various parameters (night vs. day, ambient lighting, presence detection).

The screensaver.md document on the other hand seems to confirm my hunch: there is some kernel-based screensaver mechanism on the Pi that apparently can only be controlled via xscreensaver these days (I might first try disabling it completely via /boot/cmdline.txt).   

I know that the backlight setting wasn't what you wanted, but that also has more settings like turn the screen on and off and probably also maybe to disable blanking, I don't know, I never used it, I don't have a touchscreen.

About the raspberry pi link that I posted above, I use both the xscreensaver (disable it) and the consoleblank=0 in /boot/cmdline.txt, and the later is what is going to solve your problem hopefully.
Reply
#8
(2019-09-24, 21:16)rascas Wrote:
(2019-09-24, 21:08)sba923 Wrote:
(2019-09-24, 18:17)rascas Wrote: Hmm didn't know that... Then take a look at this, I never tried and didn't saw the code thought: https://github.com/linusg/rpi-backlight

PS: Ahhh, I just remembered, this is what I use: https://www.raspberrypi.org/documentatio...ensaver.md

Thanks for the links!

The backlight thing is something else, I know about it since I used it in another project (that runs its UI within Firefox, so a X11 app, with the screensaver disabled via xset) to turn the display on/off and set its brightness depending on various parameters (night vs. day, ambient lighting, presence detection).

The screensaver.md document on the other hand seems to confirm my hunch: there is some kernel-based screensaver mechanism on the Pi that apparently can only be controlled via xscreensaver these days (I might first try disabling it completely via /boot/cmdline.txt).    

I know that the backlight setting wasn't what you wanted, but that also has more settings like turn the screen on and off and probably also maybe to disable blanking, I don't know, I never used it, I don't have a touchscreen.

About the raspberry pi link that I posted above, I use both the xscreensaver (disable it) and the consoleblank=0 in /boot/cmdline.txt, and the later is what is going to solve your problem hopefully. 

consoleblank=0 in /boot/cmdline.txt doesn't work, unfortunately.

FWIW, xset dpms force on does turn the display back on once it's been turned off.
Reply
#9
Well, I am out of ideas then. On Raspbian Stretch, when I had a 7'' inch Oficial Touchscreen for testing, I remember having the same problem and one of those fixes that I mentioned above fixed it.
Kodi 18.4 on Raspbian Buster (from the PiPplware repo) works without the need of any of those fixes if you are using a "normal" TV/monitor. Never tested one touchscreen on Raspbian Buster. At least you already found a workaround Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Display goes blank after some time0