How can I adjust my screen brightness on my laptop?

How do I control my screen brightness on my laptop installed with FreeBSD 13.1 and KDE5?
I did a "pkg info" and "plasma5-powerdevel-5.24.5" is indeed already installed along with the standard KDE5. And, "dbus" is already enabled.
I could not find any screen brightness controls in the Settings anywhere.

Or, can screen brightness be controlled using the command line?

Please advise. Thanks!
 
my laptop
What brand and model? Because these things are controlled very differently by each brand and even between different models of the same brand, there's no standard way of implementing this.

Some brands control this through acpi(4), but not all do.

Code:
% ll /boot/kernel/acpi_*
-r-xr-xr-x  1 root  wheel  43752 Jun  4 22:35 /boot/kernel/acpi_asus.ko
-r-xr-xr-x  1 root  wheel  29968 Jun  4 22:35 /boot/kernel/acpi_asus_wmi.ko
-r-xr-xr-x  1 root  wheel  26112 Jun  4 22:35 /boot/kernel/acpi_dock.ko
-r-xr-xr-x  1 root  wheel  24968 Jun  4 22:35 /boot/kernel/acpi_fujitsu.ko
-r-xr-xr-x  1 root  wheel  39480 Jun  4 22:35 /boot/kernel/acpi_hp.ko
-r-xr-xr-x  1 root  wheel  40080 Jun  4 22:35 /boot/kernel/acpi_ibm.ko
-r-xr-xr-x  1 root  wheel  24576 Jun  4 22:35 /boot/kernel/acpi_panasonic.ko
-r-xr-xr-x  1 root  wheel  17792 Jun  4 22:35 /boot/kernel/acpi_sony.ko
-r-xr-xr-x  1 root  wheel  25464 Jun  4 22:35 /boot/kernel/acpi_toshiba.ko
-r-xr-xr-x  1 root  wheel  44824 Jun  4 22:35 /boot/kernel/acpi_video.ko
-r-xr-xr-x  1 root  wheel  41824 Jun  4 22:35 /boot/kernel/acpi_wmi.ko
 
As root, I use: sysctl hw.acpi.video.lcd0.brightness=50
... where 50 is a percentage, or, to change brightness at boot up:
/etc/sysctl.conf
Code:
hw.acpi.video.lcd0.brightness=50

As the desktop user:
Code:
$ xrandr -q --verbose |grep "connected"
eDP-1 connected primary 1366x768+0+0 (0x45) normal (normal left inverted right x axis y axis) 344mm x 194mm
HDMI-1 disconnected (normal left inverted right x axis y axis)
VGA-1 disconnected (normal left inverted right x axis y axis)
$ xrandr -q --verbose |grep "Brightness"
    Brightness: 1.0
$ xrandr --output eDP-1 --brightness 0.5
$ xrandr --output eDP-1 --brightness 1.0
$
... where 0.5 is a proportion.

Using xrandr to dim the brightness seems to give a more bluish tint to my screen, I'm not sure why.
 
I executed "kldload acpi_video" and confirmed that "acpi_video.ko" indeed up with "kldstat".

Then, I did:
"sysctl hw.acpi.video.lcd.active" and
"sysctl hw.acpi.video.lcd0.active".. and both said "unknown oid ..."

So, how can I load "acpi_video"?
 
Then start with sysctl hw.acpi.video .

Please share the output of dmesg via pastebin or use the package sysutils/hw-probe to share the specs. It may be a japanese laptop, but I think it's still just an intel graphics chip with lcd screen.
 
I executed "kldload acpi_video" and confirmed that "acpi_video.ko" indeed up with "kldstat".

Then, I did:
"sysctl hw.acpi.video.lcd.active" and
"sysctl hw.acpi.video.lcd0.active".. and both said "unknown oid ..."

So, how can I load "acpi_video"?

I think we might need to load acpi_video earlier in the boot up sequence. Please try:
/etc/rc.conf
Code:
kld_list="acpi_video"

/etc/sysctl.conf
Code:
hw.acpi.video.lcd0.brightness=50

With these two changes alone, I see screen brightness dimming before the first login prompt is displayed.
 
I did those and it says "unknown oid 'hw.acpi.video.lcd0.brightness' at line 19.

I'm using FreeBSD 13.1
I'm using 13.0 with an "AMD A6-6310 APU with AMD Radeon R4 Graphics" board. Haven't tried upgrading to 13.1 as of yet.

Can't recall if this works on my other 13.0 system using Intel graphics and I have no systems using Nvidea graphics processors.

Have you tried using the xrandr approach yet?
 
Actually I have kld_list="radeonkms acpi_video" instead of just kld_list="acpi_video" -- it may or may not be the case that the kernel mode setting video driver needs to be loaded before the acpi_video module.

Testing with kldload and kldstat it all seems to work okay when loading these modules dynamically without rebooting.
 
Back
Top