>
> Emmanuel Vadot writes:
> > On Thu, 02 Feb 2023 20:58:58 +
> > "Poul-Henning Kamp" wrote:
> >
> > >
> > > parv/FreeBSD writes:
> > >
> > > > > Does backlight(8) works for you?
> > > >
> > > > Thanks for the clue. It does! It does ...
> > > >
> > > > - I get the same number back via "backlight" without any arguments as
> > > > what I gave it earlier. There was no reporting of value being
> > > > subtracted by one;
> > >
> > > Sorry for the delay in reporting back.
> > >
> > > I consistently read one less back, except for 0 and 100.
> >
> > Even 50 ?
>
> # backlight
> brightness: 0
> # backlight 50
> # backlight
> brightness: 49
> # backlight 25
> # backlight
> brightness: 24
> # backlight 75
> # backlight
> brightness: 74
>
> yes
This smells like a zero-bias byte rounding issue...
Ie, if the backlight intensity register is 8 bit,
having values 0 to 255, and we scale 50% to
256 * 50% == 128 or do we scale to 255 * 50% == 127,
and then reverse it as 127/255 == 49.
>
> > So if you have, let's say brightness at 50%, and you plug an external
> > monitor, brightness goes up to 100% ?
>
> No, plugging and unplugging does not change the backlight.
>
> But when the screen saver has kicked in, and I wake it up again, it comes
> back at 100, (and reads back as 100)
>
> --
> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
> p...@freebsd.org | TCP/IP since RFC 956
> FreeBSD committer | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
>
>
--
Rod Grimes rgri...@freebsd.org