Entering
echo 1 > /sys/class/backlight/rpi_backlight/bl_power
manually works, but is there a screen blanker or energy option to turn off backlight after n minutes and switch it on as soon as any UI interaction occurs?
Entering
echo 1 > /sys/class/backlight/rpi_backlight/bl_power
manually works, but is there a screen blanker or energy option to turn off backlight after n minutes and switch it on as soon as any UI interaction occurs?
No – but I think that’s a different question altogether. This post was concerning control of backlight via sysfs. You may be able to write a script to do this however.
Just to wrap up: everything is there and working fine:
Thanks to all of you for this great work, have a very nice and successful new year!
Glad it’s working for you. If @sam_nazarko wants to put it into the distribution, I’ve no problem with that. (I can relicense the GitHub project with whatever’s compatible with osmc if necessary)
PitsOf works fine for me. Thankyou for that.
Is it possible to add fadein fadeout ?
for fading you could try to add a loop to de-/increase the brightness value, if supported.
but i mean there are two version of display. 1st can’t fade, 2nd can.
what’s the command for a half bright display?
the other thing, what can be a problem, that bash and hardware is not fast enough for the code.
edit:
I know this is old but i just tried it on the most recent version of osmc/kodi. Great Work!! I’ve been trying to get this working for several days and this works PERFECT. For anyone reading keep in mind its working on the official 7" pi touchscreen. Being that the only control I have on this pi (besides web gui and ssh) is touch so i don’t want to shut the touch screen off I just want it to go black and not wear out the back light while leaving the screen responsive to touch still. Great Work!
If anyone is trying to use this with the newer OSMC releases, I’ve created a new version of the screensaver for Kodi Matrix (on the GitHub releases page).
To get the touchscreen working I had to ssh in to the insalled OSMC, and modify /boot/config.txt to use vc4-fkms-v3d instead of vc4-kms-v3d and then add lines to /boot/config-user.txt to:
hdmi_ignore_cec=1
lcd_rotate=2
dtoverlay=pisound
dtparam=audio=on
(I can’t guarantee this won’t break the video playback or anything, because I only use this pi for audio)
Hi,
Great addon here for this backlight control.
I upgraded to Osmc on Kodi 19.4 and can’t install pitsoff screensaver on this release.
Looks like it deals with Python version.
Best regards and thank you for your work.
Edit: I just saw that your precedent post onboard this version of python upgrade
![]()
To get PiTsOff or rpi-backligt-disabler working with Kodi 21 (Omega) you need to change a couple of files:
For PiTsOff:
addon.xml, update the import lines to the current version.
<import addon="xbmc.python" version="3.0.1"/>
<import addon="xbmc.addon" version="21.1.0"/>
screensaver.py, update the power command line.
powerCommand = 'echo %d > /sys/class/backlight/rpi_backlight/bl_power'
For rpi-backlight-disabler:
addon.xml, update the import lines to the current version.
<import addon="xbmc.python" version="3.0.1"/>
<import addon="xbmc.addon" version="21.1.0"/>
screensaver.py, change to allow root to issue the blank/unblank commands
shellCommand = 'echo 1 | sudo tee /sys/class/backlight/rpi_backlight/bl_power'
shellCommand = 'echo 0 | sudo tee /sys/class/backlight/rpi_backlight/bl_power'
I also changed both xml form definitions to the PiTsOff version, but I am unsure if this is needed.
in the last lines of resources/skins/default/720p/screensaver(yours).xml
<window type="window">
<controls/>
apologies for deleting the previous posts, there was some conflicting information and the message was unclear. I really don’t like doing that but I thought it was for the best.