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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Thu, Jul 4, 2024 at 2:59 PM 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=devd.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.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">On Thu, Jul 4, 2024 at 2:59 PM Anton Shepelev <<a href="mailto:anton.txt@gmail.com">anton.txt@gmail.com</a>> wrote:</div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid 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>
{ match "system" "ACPI" ;<br>
match "subsystem" "Video" ;<br>
match "type" "brightness" ;<br>
action "/usr/bin/backlight $notify"; };<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="https://man.freebsd.org/cgi/man.cgi?query=devd.conf" rel="noreferrer" target="_blank">https://man.freebsd.org/cgi/man.cgi?query=devd.conf</a><br>
2. <a href="https://www.davidschlachter.com/misc/freebsd-acpi_video-thinkpad-display-brightness" rel="noreferrer" target="_blank">https://www.davidschlachter.com/misc/freebsd-acpi_video-thinkpad-display-brightness</a><br>
<br></blockquote><div><span class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">This is what I used. I have it in /etc/devd/thinkpad.conf. You might use HP.conf:<br></span></div><div>notify 100 {<br> match "system" "ACPI";<br> match "subsystem" "ACAD";<br> match "notify" "0x00";<br> action "/usr/bin/backlight 40; service power_profile $notify";<br> };<br><br>notify 100 {<br> match "system" "ACPI";<br> match "subsystem" "ACAD";<br> match "notify" "0x01";<br> action "/usr/bin/backlight 100; service power_profile $notify";<br>};<br><br>notify 100 {<br> match "system" "ACPI";<br> match "subsystem" "IBM";<br> match "notify" "0x10";<br> action "/usr/bin/backlight +";<br>};<br><br>notify 100 {<br> match "system" "ACPI";<br> match "subsystem" "IBM";<br> match "notify" "0x11";<br> action "/usr/bin/backlight -";<br>};<br></div><div><br></div><div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">10% changes are more reasonable than 1%. The top two "notify"s set the screen at 100% on AC and 40% on battery.<br></div> </div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Kevin Oberman, Part time kid herder and retired Network Engineer<br>E-mail: <a href="mailto:rkoberman@gmail.com" target="_blank">rkoberman@gmail.com</a><br></div><div>PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683</div></div></div></div></div></div></div></div></div>
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1uo%2Be6pY1H7JSyHKjjbB8O6a_UAoW=NoagzXSCc%2BHzaHQ>
