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
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.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
Moderator Team
Moderator Team
Posts: 5667
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.

Chillkroete
White ninja
White ninja
Posts: 12
Joined: 09 Jul 2023, 06:30
Distribution: Porteus Kiosk 5.5

Change screen brightness by hour

Post#18 by Chillkroete » 19 Jul 2023, 20:12

I am operating Porteus Kiosk on a Intel NUC combined with an HDMI connected monitor instead of a laptop. Am I able to control the brightness, though?

My "/sys/class/backlight" folder is empty. Should I create a folder with my device name and also create the "brightness" file? If so? how do I figure out my device name?

Thanks!

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Change screen brightness by hour

Post#19 by fanthom » 20 Jul 2023, 07:26

Brightness can be controlled only on laptops (maybe also on 'all-in-one' PCs).
Please add [Solved] to your thread title if the solution was found.

Locked