Change screen brightness by hour

'User made' tutorials related to Porteus Kiosk edition.
Official kiosk documentation can be find here: http://porteus-kiosk.org/documentation.html
ION_Vince
Ronin
Ronin
Posts: 1
Joined: 27 Mar 2021, 19:59
Distribution: kiosk

Change screen brightness by hour

Post#16 by ION_Vince » 27 Mar 2021, 20:06

Are these instruction still relevant for version 5+ ?

I have been trying to get this to work using xrandr and ssl, and now the brightness as mentioned in this post
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight#

xrandr works if I login via ssh and run, but sending the command via ssh does not work ( think xorg not started in that mechanism )

I am using teguar tp2945 displays, perhaps not compatible with the instructions ?

Code: Select all

root@kiosk:/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight# ls -l
total 0
-rwxrwxrwx    1 root     root          4096 Mar 27 15:53 actual_brightness
-rw-r--r--    1 root     root          4096 Mar 26 11:22 bl_power
-rw-r--r--    1 root     root          4096 Mar 27 15:54 brightness
lrwxrwxrwx    1 root     root             0 Mar 26 23:40 device -> ../../card0-eDP-1
-r--r--r--    1 root     root          4096 Mar 26 11:22 max_brightness
drwxr-xr-x    2 root     root             0 Mar 26 23:40 power
-r--r--r--    1 root     root          4096 Mar 26 23:40 scale
lrwxrwxrwx    1 root     root             0 Mar 26 23:40 subsystem -> ../../../../../../../class/backlight
-r--r--r--    1 root     root          4096 Mar 26 11:22 type
-rw-r--r--    1 root     root          4096 Mar 26 11:22 uevent
brightness was initially 52,000 +-, I tried setting to 50 and 100 without visible results. The actual_brightness file changed to match by itself.

User avatar
fanthom
Site Admin
Site Admin
Posts: 5413
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Change screen brightness by hour

Post#17 by fanthom » 28 Mar 2021, 08:33

Hello ION_Vince,

Please run this command over SSH to change the brightness to 33%:

Code: Select all

for x in `ls -1 /sys/class/backlight`; do echo $((`cat /sys/class/backlight/$x/max_brightness`*33/100)) > /sys/class/backlight/$x/brightness; done
Replace number '33' with any percent in range 0-100.

Thanks
Please add [Solved] to your thread title if the solution was found.

Post Reply