Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: 9.1.5 & Pi Touch 1: Wrong (max) brightness when waking from screen blanking
#7
(12-15-2024, 01:25 PM)jenzd Wrote: I think I have a rough idea what the issue might be:
When I look into "/sys/class/backlight", there are acutally two subdirectories/configurations here:

The first one is "rpi_backlight/" where "brightness" is set to 63.
The second one is "10-0045/" where "brightness" is set to 255.

Interestingly the "echo xx > brightness" command works in both subdirectories and changes screen brightness to the respective value.

The setting in "10-0045/" is the one the screen returns to after screen blank.

Thats interesting.

Here's the function that handles screen brightness. When I last tested, the Touch1 needed rpi_backlight/brightness and the Touch2 needed *-0045/brightness which I assumed were exclusive to each.

Code:
function updDSIScnBrightness($screenType, $brightnessValue) {
    if ($screenType == '1') {
        sysCmd('/bin/su -c "echo '. $brightnessValue . ' > /sys/class/backlight/rpi_backlight/brightness"');
    } else {
        sysCmd('/bin/su -c "echo '. $brightnessValue . ' > /sys/class/backlight/*-0045/brightness"');
    }
}

I'll test updating both for the Touch1 and if that works I'll include it in upcoming 920 and the in-place update.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
RE: 9.1.5 & Pi Touch 1: Wrong (max) brightness when waking from screen blanking - by Tim Curtis - 12-15-2024, 02:51 PM

Forum Jump: