Re: Need help controlling laptom display brightness via sysctl
- In reply to: Kevin Oberman : "Re: Need help controlling laptom display brightness via sysctl"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 04 Jul 2024 23:18:10 UTC
Kevin Oberman:
> This is what I used. I have it in /etc/devd/thinkpad.conf.
>
> notify 100 {
> match "system" "ACPI";
> match "subsystem" "IBM";
> match "notify" "0x10";
> action "/usr/bin/backlight +";
> };
>
> notify 100 {
> match "system" "ACPI";
> match "subsystem" "IBM";
> match "notify" "0x11";
> action "/usr/bin/backlight -";
> };
>
> 10% changes are more reasonable than 1%. The top two
> "notify"s set the screen at 100% on AC and 40% on battery.
I fear you missed my point that HP seems to have a different
approach to these ACPI events. In ThinkPad, the up- and
down-brighness events have fixed notify codes: 0x10 and
0x11. In HP, on the other hand, the notify codes represent
the target brightness level on a 0..100 scale, so that
consequtive presses of Fn+F3 yield an arithmetical
progression of notify codes, e.g. 51,52,53 &c, which is why
the simplest solution is to subsitute the notify value into
the invocation of `backlight'.
Translating those codes into exponential changes would
require first of all to recall the previous value in order
to determine whether the current event is an increase or a
decrease. See what I mean?