# How can I adjust my screen brightness on my laptop?



## ikevin8me (Jun 9, 2022)

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!


----------



## SirDice (Jun 9, 2022)

ikevin8me said:


> 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. 


```
% 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
```


----------



## T-Daemon (Jun 9, 2022)

Also check if by any chance backlight(8) devices are created, look for /dev/backlight/backlight* . The driver is build in the GENERIC kernel.


----------



## ikevin8me (Jun 9, 2022)

I’m using a a Japanese NEC N1575/B. 

So, am I in luck?


----------



## SirDice (Jun 9, 2022)

ikevin8me said:


> So, am I in luck?


Maybe, maybe not. Try loading acpi_video(4) first.


----------



## Vull (Jun 9, 2022)

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

```
hw.acpi.video.lcd0.brightness=50
```

As the desktop user:
	
	



```
$ 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.


----------



## ikevin8me (Jun 11, 2022)

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"?


----------



## George (Jun 11, 2022)

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.


----------



## Vull (Jun 11, 2022)

ikevin8me said:


> 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
> ...



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

```
kld_list="acpi_video"
```

/etc/sysctl.conf

```
hw.acpi.video.lcd0.brightness=50
```

With these two changes alone, I see screen brightness dimming before the first login prompt is displayed.


----------



## ikevin8me (Jun 11, 2022)

I did those and it says "unknown oid 'hw.acpi.video.lcd0.brightness' at line 19.

I'm using FreeBSD 13.1


----------



## Vull (Jun 11, 2022)

ikevin8me said:


> 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?


----------



## Vull (Jun 11, 2022)

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.


----------



## ProphetOfDoom (Jun 11, 2022)

Have you tried just the command
`xbacklight -set percentage`
?


----------



## grahamperrin@ (Jun 11, 2022)

Brightness: lxqt-config-brightness and Gammy
					

From a private conversation:   … for example Fn+F8 and Fn+F9 are supposed to be the brightness control, …   For cases where it seems that brightness is difficult or impossible to control, I can recommend:  Gammy – accessibility/gammy the brightness feature of sysutils/lxqt-config.  Use one or...




					forums.freebsd.org


----------



## Vull (Jun 12, 2022)

Just FYI, on my kludgy Intel graphics 13.0 system, xrandr works but xbacklight and acpi_video do not.


----------



## oldmanshouse (Jul 21, 2022)

On KDE it is under Settings-Hardware-Powermanagement


----------

