Re: Best way to run command on system start

From: Christoph Brinkhaus <c.brinkhaus_at_t-online.de>
Date: Sat, 04 May 2024 14:24:15 UTC
Hello Polarian,

Am Sat, May 04, 2024 at 03:08:14PM +0100 schrieb Polarian:
> Hello,
> 
> So I have been having issues with setting the brightness on my E6430.
> 
> xbacklight seems to do nothing, and setting brightness via xrandr seems
> to just shift the colour of the pixels to a darker colour... instead of
> decreasing the physical brightness.
> 
> backlight(8) does work, and it works very well... but there does not
> appear to be any config or way to get it to persist across boots.
> 
> I have read the forums and seen suggestions of using a rc service to
> set the backlight on boot, however there must be a better way to do
> this.
> 
> Any suggestions?

You can use crontab(1) to run backlight at reboot. This is what I have:
~> crontab -l
@reboot /usr/bin/backlight 50

A second option could be to load the acpi_video module.
In /etc/sysctl.conf you can define settings as
hw.acpi.video.lcd0.fullpower=70
hw.acpi.video.lcd0.economy=60
For testing you can load the module by kldload und use sysctl to try if
the settings are working with your hardware.

Kind regards,
Christoph
-- 
Ist die Katze gesund
schmeckt sie dem Hund.