Date: Thu, 4 Jul 2024 16:02:34 -0700 From: Kevin Oberman <rkoberman@gmail.com> To: Anton Shepelev <anton.txt@gmail.com> Cc: freebsd-stable@freebsd.org Subject: Re: Need help controlling laptom display brightness via sysctl Message-ID: <CAN6yY1uo%2Be6pY1H7JSyHKjjbB8O6a_UAoW=NoagzXSCc%2BHzaHQ@mail.gmail.com> In-Reply-To: <20240705005834.4c7983ea29da3af8f8e36718@gmail.com> References: <20240704010029.75608a4e49205eb38a6034be@gmail.com> <20240705005834.4c7983ea29da3af8f8e36718@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000003e0549061c73f235 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jul 4, 2024 at 2:59=E2=80=AFPM Anton Shepelev <anton.txt@gmail.com>= wrote: > I wrote: > > > I need your help in setting up the brightness control on > > HP 15-b0xx laptop via sysctl. > > I was infored that this ability has been discountinued in > favour of the backlight utility, so I gave up and wrote the > following devd rule: > > notify 10 > { match "system" "ACPI" ; > match "subsystem" "Video" ; > match "type" "brightness" ; > action "/usr/bin/backlight $notify"; }; > > This changes brightness by tiny 1/100 steps, but this is > by desing of the HP engineers... > > References: > 1. https://man.freebsd.org/cgi/man.cgi?query=3Ddevd.conf > 2. > https://www.davidschlachter.com/misc/freebsd-acpi_video-thinkpad-display-= brightness > > This is what I used. I have it in /etc/devd/thinkpad.conf. You might use HP.conf: notify 100 { match "system" "ACPI"; match "subsystem" "ACAD"; match "notify" "0x00"; action "/usr/bin/backlight 40; service power_profile $notify"; }; notify 100 { match "system" "ACPI"; match "subsystem" "ACAD"; match "notify" "0x01"; action "/usr/bin/backlight 100; service power_profile $notify"; }; 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. --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --0000000000003e0549061c73f235 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:tahoma,sans-serif;font-size:small">On Thu, Jul 4, 2024 at 2:59=E2= =80=AFPM Anton Shepelev <<a href=3D"mailto:anton.txt@gmail.com">anton.tx= t@gmail.com</a>> wrote:</div></div><div class=3D"gmail_quote"><blockquot= e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s= olid rgb(204,204,204);padding-left:1ex">I wrote:<br> <br> > I need your help in setting up the brightness control on<br> > HP 15-b0xx laptop via sysctl.<br> <br> I was infored that this ability has been discountinued in<br> favour of the backlight utility, so I gave up and wrote the<br> following devd rule:<br> <br> notify 10<br> {=C2=A0 =C2=A0 =C2=A0 =C2=A0match=C2=A0 "system"=C2=A0 =C2=A0 &qu= ot;ACPI"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 match=C2=A0 "subsystem" "Video&q= uot;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 match=C2=A0 "type"=C2=A0 =C2=A0 =C2= =A0 "brightness"=C2=A0 =C2=A0 ;<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 action "/usr/bin/backlight $notify";= =C2=A0 };<br> <br> This changes brightness by tiny 1/100 steps, but this is<br> by desing of the HP engineers...<br> <br> References:<br> 1. <a href=3D"https://man.freebsd.org/cgi/man.cgi?query=3Ddevd.conf" rel=3D= "noreferrer" target=3D"_blank">https://man.freebsd.org/cgi/man.cgi?query=3D= devd.conf</a><br> 2. <a href=3D"https://www.davidschlachter.com/misc/freebsd-acpi_video-think= pad-display-brightness" rel=3D"noreferrer" target=3D"_blank">https://www.da= vidschlachter.com/misc/freebsd-acpi_video-thinkpad-display-brightness</a><b= r> <br></blockquote><div><span class=3D"gmail_default" style=3D"font-family:ta= homa,sans-serif;font-size:small">This is what I used. I have it in /etc/dev= d/thinkpad.conf. You might use HP.conf:<br></span></div><div>notify 100 {<b= r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "system" =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"ACPI";<br>=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0match "subsystem" =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "ACAD";<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0match "notify" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0"0x00";<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0action "/usr/bin/backlight 40; service power_profile $notify&qu= ot;;<br>=C2=A0};<br><br>notify 100 {<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0m= atch "system" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0"ACPI";<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match &= quot;subsystem" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "= ;ACAD";<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "notify" = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"0x01&qu= ot;;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0action "/usr/bin/backlight 1= 00; service power_profile $notify";<br>};<br><br>notify 100 {<br>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "system" =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"ACPI";<br>=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0match "subsystem" =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 "IBM";<br>=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0match "notify" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0"0x10";<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0action "/usr/bin/backlight +";<br>};<br><br>notify 100 {<br= >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "system" =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"ACPI";<br>=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0match "subsystem" =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "IBM";<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0match "notify" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0"0x11";<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0action "/usr/bin/backlight -";<br>};<br></div><div><br></d= iv><div><div style=3D"font-family:tahoma,sans-serif;font-size:small" class= =3D"gmail_default">10% changes are more reasonable than 1%. The top two &qu= ot;notify"s set the screen at 100% on AC and 40% on battery.<br></div>= </div></div><span class=3D"gmail_signature_prefix">-- </span><br><div dir= =3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><= div><div dir=3D"ltr"><div><div dir=3D"ltr">Kevin Oberman, Part time kid her= der and retired Network Engineer<br>E-mail: <a href=3D"mailto:rkoberman@gma= il.com" target=3D"_blank">rkoberman@gmail.com</a><br></div><div>PGP Fingerp= rint: D03FB98AFA78E3B78C1694B318AB39EF1B055683</div></div></div></div></div= ></div></div></div></div> --0000000000003e0549061c73f235--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1uo%2Be6pY1H7JSyHKjjbB8O6a_UAoW=NoagzXSCc%2BHzaHQ>