Solved question about fixing my screen backlight value when system boot in freebsd15.0 ?

Dear all:
every time , my freebsd15.0 start. the screen backlight was 100 .............i want to fix it to 70 when system boot. how to do that ? thanks.
sysctl -a |grep backlight
hw.i915kms.enable_dpcd_backlight: -1
compat.linuxkpi.i915_enable_dpcd_backlight: -1

sysctl -a |grep brightness
hw.i915kms.invert_brightness: 0
compat.linuxkpi.i915_invert_brightness: 0
 
I got annoyed from a 100% screen brightness every time the system boots as well. For this reason, years ago, I wrote a rc(8) script, which configures the brightness level using the backlight(8) utility (the utility can only be used when a backlight device node is created while a DRM driver is loaded (amdgpu, i915, radeon):

Code:
% ls -l /dev/backlight 
total 0
lrwxr-xr-x  1 root wheel    23 Dec 12 13:03 amdgpu_bl00 -> ../backlight/backlight0
crw-rw----  1 root video 0x19f Dec 12 13:03 backlight0


/usr/local/etc/rc.d/backlight
sh:
#!/bin/sh

# PROVIDE: backlight
# REQUIRE: DAEMON
# BEFORE:  LOGIN

. /etc/rc.subr

name=backlight
descr="Reduce screen brightness to 50% when in multi-user mode."
rcvar=backlight_enable

: ${backlight_enable="NO"}

command="/usr/bin/backlight"
backlight_flags="50"


load_rc_config $name
run_rc_command "$1"

The same configuration can be achieved via a crontab(1) entry (see also crontab(5)).
Code:
@reboot        backlight 70


acpi_video(4) doesn't work on my system. I can use the brightness function keys to manipulate the screen brightness with the acpi_ibm(4) loaded on a ThinkPad E15, though.
 
Dear T-Daemon :
thanks for your help . yes, you solution was good , but i think that is not better . the system control the backlight value, we just need to modify this value,,,so ,where is this value was my looking for . thanks.
 
Dear all:
when i kldload acpi_video , that will cause my laptop backlight to 100 with ac-adapter .. we can change this from BIOS... thanks. question was solved.
 
Back
Top