Turning off lcd backlight after inactivity time (linux)

I’d like to configure my system so when the screen has no activity during a given time (x min) it switch off backlight.

I’m using the image Colibri-T30_LXDE-Image_2.7b4-20171005 from Index of /toradex-bsp-platform.git/refs/tags

Searching for an answer I’ve seen this page: https://developer.toradex.com/knowledge-base/backlight-(linux)

It is very helpful to know how to switch off/on backlight, but it didn’t explain how I can set up a timer.

Please, any help would be welcome.

Thanks, Thierry.

HI @Thierry

Welcome to the Toradex Community!!!

For the timer, you can use the sleep command, as follows:

sleep x && (turn off backlight command) (where x is in seconds).

Best regards, Jaski

Hi @jaski.tx
thanks for your answer. But It’s not what I’m trying to do.
Maybe I explained it badly, I’ll try to do better:

I have an application running on my device where users can press buttons on screen an do other stuff. If the screen isn’t touch by anyone for x sec (or minute) I’d like it to turn off backlight.

Previously I used another linux image with Xfbdev, to do it I had this command lunch at startup Xfbdev $DISPLAY -mouse tslib,,device=/dev/input/event0 -screen 800x480x16 -s 10
The last parameter -s X set a “screen sleep mode” after X sec.

Now, with the toradex image I’m a little bit lost.

Hi @Thierry
Thanks for your explanation and sorry for the misunderstanding. Which display are you using? How is connected to Iris Board?

Hi @jaski.tx ,

I use a Toradex’display: EDT 7’’ (https://developer.toradex.com/products/edt-display) and it is connected to the Iris board with its FFC cable.

I have found a solution, don’t know if it is the best way but it did the job.
I’ve found this documentation : https://www.x.org/archive//X11R7.0/doc/html/xset.1.html
So my solution is to use this command line xset s {n sec} to set the screen saver parameters. And to make it permanent I’ve added it to the file .profile of the user, this file is here ‘/home/{user}/.profile’ .

Thanks for the information. Did the solution work?

Yeah, you can set a value of standby and suspend time also in /etc/X11/xorg.conf.
We set this value to 0 since in general our demo images are used in exhibition where setting display to standby or suspend mode is disabled.

Best regards, Jaski