Date: Fri, 16 Aug 2024 19:30:21 -0400 From: LuMiWa <lumiwa@dismail.de> To: freebsd-acpi@freebsd.org Subject: Re: acpi_ibm brightness man page example not working + fix Message-ID: <20240816193021.57d16978@dismail.de> In-Reply-To: <D3HPEMO28LSQ.3B2FYGFSMSFDB@mccd.space> References: <D3HPEMO28LSQ.3B2FYGFSMSFDB@mccd.space>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 16 Aug 2024 17:53:38 -0500 "Marc Coquand" <marc@mccd.space> wrote: > Hi! >=20 > Apologize in advance if I'm reporting this wrong, this is my first > post to the mailing list and my first time contributing to Freebsd. :) >=20 > I noticed that the example in the manpage for acpi_ibm, specifically > for setting up brightness was not working for me. The specific part > that did not work for me is: >=20 > + 0x10|0x11) > + LEVEL=3D`sysctl -n dev.acpi_${OEM}.0.lcd_brightness` > + PERCENT=3D`${ECHO} "${BC_PRECOMMANDS} ; \ > + ${LEVEL} / ${MAX_LCD_BRIGHTNESS} * 100" |\ > + ${CALC} | ${CUT} -d . -f 1` > + MESSAGE=3D"brightness level ${PERCENT}%" > + ;; > + >=20 > This was tested on my Thinkpad T480s. It makes sense that it would not > work, because manually changing the brightness with `sysctl > dev.acpi_ibm.0.lcd_brightness=3DXXX` did not do anything either on my > laptop. >=20 > Since FreeBSD 13.0, there is a new backlight utility, and with that I > was able to fix backlight on my computer by simply creating the > following devd config: >=20 > /etc/devd/acpi_ibm_brightness.conf > + notify 20 { > + match "system" "ACPI"; > + match "subsystem" "IBM"; > + match "notify" "0x10"; > + action "/usr/bin/backlight incr 10"; > + }; > + > + notify 20 { > + match "system" "ACPI"; > + match "subsystem" "IBM"; > + match "notify" "0x11"; > + action "/usr/bin/backlight decr 10"; > + }; >=20 > Maybe the examples in acpi_ibm manpages should use backlight utility > instead? >=20 > Alternatively, maybe the devd rules above could be added by default so > that backlight works out of the box if you load acpi_ibm? It'd be easy > to also add support for volume control with mixer. I am happy to make > a patch if this is of interest. >=20 > Sincerely, > Marc >=20 The same problem is on Thinkpad T495.=20 I am using script from: https://forums.freebsd.org/threads/backlight.94548/ --=20 =E2=80=9CI hate books; they only teach us to talk about things we know noth= ing about.=E2=80=9D =E2=80=95 Jean-Jacques Rousseau=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240816193021.57d16978>