# freaking brightness and freebsd man panges.. not working....



## userxbw (Jan 10, 2020)

I still have not fond a solution on how to control the irghtness on my laptop with freeBSD as it is right now my screen is way too dim, and laptop is plugged in to power and FBSD  still dimmed my screen.  I have not found anything workable on the internet concerning this issue.



			TuningPowerConsumption - FreeBSD Wiki
		


```
[userx@FreeBSD ~]$ su
Password:
[root@FreeBSD /home/userx]#  hw.acpi.video.lcd0.brightness
su: hw.acpi.video.lcd0.brightness: command not found
[root@FreeBSD /home/userx]# hw.acpi.video.lcd.levels
su: hw.acpi.video.lcd.levels: command not found
[root@FreeBSD /home/userx]# sysctls hw.acpi.video.lcd.levels
su: sysctls: command not found
[root@FreeBSD /home/userx]# sysctl hw.acpi.video.lcd.levels
sysctl: unknown oid 'hw.acpi.video.lcd.levels'
[root@FreeBSD /home/userx]# sysctl hw.acpi.video.ctr.levels
sysctl: unknown oid 'hw.acpi.video.ctr.levels'
[root@FreeBSD /home/userx]# sysctl hw.acpi.video.*.levels
sysctl: unknown oid 'hw.acpi.video.*.levels'
[root@FreeBSD /home/userx]# hw.acpi.video.lcd.brightness
su: hw.acpi.video.lcd.brightness: command not found
[root@FreeBSD /home/userx]# sysctl hw.acpi.video.lcd.brightness
sysctl: unknown oid 'hw.acpi.video.lcd.brightness'
[root@FreeBSD /home/userx]# sysctl hw.acpi.video.ctr.brightness
sysctl: unknown oid 'hw.acpi.video.ctr.brightness'
```






						acpi_video(4)
					






					www.freebsd.org
				




if this thing can control it on its own then there has to be a way to access it. all I've seen are people asking and getting to real solutions on the net.

--------- xbrightness ---- does not really work ----

it changed brightness sure,, then I unplugged laptop. screen went dim then I plugged it back in it did not get any brighter due to  power souce and xbrightness did not reset it screen brightness. fail....


----------



## patovm04 (Jan 10, 2020)

First of all make sure you have loaded acpi_video: `sudo kldload acpi_video`
In my case, the sysctl variables that control brightness level when plugged or unplugged are called *hw.acpi.video.lcd0.economy* and *hw.acpi.video.lcd0.fullpower*
So you can try something like this:
`sudo sysctl hw.acpi.video.lcd0.economy=100`
and see if that works. If so, add the line:

```
hw.acpi.video.lcd0.economy=100
```
to your /etc/sysctl.conf to make it permanent.


----------



## userxbw (Jan 10, 2020)

patovm04 said:


> First of all make sure you have loaded acpi_video: `sudo kldload acpi_video`
> In my case, the sysctl variables that control brightness level when plugged or unplugged are called *hw.acpi.video.lcd0.economy* and *hw.acpi.video.lcd0.fullpower*
> So you can try something like this:
> `sudo sysctl hw.acpi.video.lcd0.economy=100`
> ...


got this

```
[userx@FreeBSD ~]$ sudo kldload acpi_video
[userx@FreeBSD ~]$ sudo sysctl hw.acpi.video.lcd0.economy=100
hw.acpi.video.lcd0.economy: 50 -> 100
```

loder.conf

```
security.bsd.allow_destructive_dtrace=0
hw.sdhci.enable_msi=0
fuse_load="YES"
autoboot_delay="5"
snd_hda_load="YES"
acpi_video_load="YES"
```
sysctl.conf

```
# $FreeBSD: releng/12.1/sbin/sysctl/sysctl.conf 337624 2018-08-11 13:28:03Z brd $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0
kern.randompid=1
kern.vt.enable_bell=0
vfs.usermount=1
hw.acpi.video.lcd0.economy=100
```

I googled that line and got this








						Adjusting Intel Graphics Brightness in FreeBSD
					

There are various ways of adjusting the brightness on laptop panels. If you are running the correct Intel driver, it should be a matter of poking around the sysctl’s. ~% sysctl -a | grep lcd …




					sinetek.io
				




which shows this on my system

```
[userx@FreeBSD ~]$ sysctl -a | grep lcd
hw.acpi.video.lcd0.levels: 80 50 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 69 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
hw.acpi.video.lcd0.economy: 100
hw.acpi.video.lcd0.fullpower: 80
hw.acpi.video.lcd0.brightness: 80
hw.acpi.video.lcd0.active: 1
```

some mod or maintainer of FreeBSD handbook should/needs to add what that web page says on how to deal with backlight and laptops.


----------



## SirDice (Jan 10, 2020)

userxbw said:


> some mod or maintainer of FreeBSD handbook should/needs {...]





> To help with the documentation project (and we fervently hope you do), just subscribe to the mailing list and participate. As soon as you have done that, you're a member of the project.











						FreeBSD Documentation Project: Who are we, how to join?
					

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms.




					www.freebsd.org


----------



## Lars Skogstad (Jan 10, 2020)

*usebxbw: *

Whats the output from :  sysctl hw.acpi    

I've struggled with several laptops but always made it work in the end. 

What kind of laptop are you using? Are you using Intel HD graphics?

Have you tried FN buttons at BIOS load before booting?


----------



## userxbw (Jan 10, 2020)

HP 840 g3

CPU. Intel Core i7-6600U
GPU. Intel HD Graphics 520 209.
Display. 14.0”, Full HD (1920 x 1080), TN.
HDD/SSD. 500GB SSD.
M.2 Slot. 1x 2280 (M key)
1TB nvme
the only thing I got for FN buttons in BIOS is to switch them from the F keys. Meaning that I will not have to use the Fn button to access them off the F keys. I use my F keys for ttys.


```
[userx@FreeBSD ~]$  sysctl hw.acpi
hw.acpi.thermal.tz7._TSP: -1
hw.acpi.thermal.tz7._TC2: -1
hw.acpi.thermal.tz7._TC1: -1
hw.acpi.thermal.tz7._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz7._CRT: 128.1C
hw.acpi.thermal.tz7._HOT: -1
hw.acpi.thermal.tz7._PSV: -1
hw.acpi.thermal.tz7.thermal_flags: 0
hw.acpi.thermal.tz7.passive_cooling: 0
hw.acpi.thermal.tz7.active: -1
hw.acpi.thermal.tz7.temperature: 0.1C
hw.acpi.thermal.tz6._TSP: -1
hw.acpi.thermal.tz6._TC2: -1
hw.acpi.thermal.tz6._TC1: -1
hw.acpi.thermal.tz6._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz6._CRT: 128.1C
hw.acpi.thermal.tz6._HOT: -1
hw.acpi.thermal.tz6._PSV: -1
hw.acpi.thermal.tz6.thermal_flags: 0
hw.acpi.thermal.tz6.passive_cooling: 0
hw.acpi.thermal.tz6.active: -1
hw.acpi.thermal.tz6.temperature: 0.1C
hw.acpi.thermal.tz5._TSP: -1
hw.acpi.thermal.tz5._TC2: -1
hw.acpi.thermal.tz5._TC1: -1
hw.acpi.thermal.tz5._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz5._CRT: 128.1C
hw.acpi.thermal.tz5._HOT: -1
hw.acpi.thermal.tz5._PSV: -1
hw.acpi.thermal.tz5.thermal_flags: 0
hw.acpi.thermal.tz5.passive_cooling: 0
hw.acpi.thermal.tz5.active: -1
hw.acpi.thermal.tz5.temperature: 0.1C
hw.acpi.thermal.tz4._TSP: -1
hw.acpi.thermal.tz4._TC2: -1
hw.acpi.thermal.tz4._TC1: -1
hw.acpi.thermal.tz4._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz4._CRT: 128.1C
hw.acpi.thermal.tz4._HOT: -1
hw.acpi.thermal.tz4._PSV: -1
hw.acpi.thermal.tz4.thermal_flags: 0
hw.acpi.thermal.tz4.passive_cooling: 0
hw.acpi.thermal.tz4.active: -1
hw.acpi.thermal.tz4.temperature: 25.1C
hw.acpi.thermal.tz3._TSP: -1
hw.acpi.thermal.tz3._TC2: -1
hw.acpi.thermal.tz3._TC1: -1
hw.acpi.thermal.tz3._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz3._CRT: 128.1C
hw.acpi.thermal.tz3._HOT: -1
hw.acpi.thermal.tz3._PSV: -1
hw.acpi.thermal.tz3.thermal_flags: 0
hw.acpi.thermal.tz3.passive_cooling: 0
hw.acpi.thermal.tz3.active: -1
hw.acpi.thermal.tz3.temperature: 25.1C
hw.acpi.thermal.tz2._TSP: -1
hw.acpi.thermal.tz2._TC2: -1
hw.acpi.thermal.tz2._TC1: -1
hw.acpi.thermal.tz2._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz2._CRT: 128.1C
hw.acpi.thermal.tz2._HOT: -1
hw.acpi.thermal.tz2._PSV: -1
hw.acpi.thermal.tz2.thermal_flags: 0
hw.acpi.thermal.tz2.passive_cooling: 0
hw.acpi.thermal.tz2.active: -1
hw.acpi.thermal.tz2.temperature: 31.1C
hw.acpi.thermal.tz1._TSP: -1
hw.acpi.thermal.tz1._TC2: -1
hw.acpi.thermal.tz1._TC1: -1
hw.acpi.thermal.tz1._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz1._CRT: 128.1C
hw.acpi.thermal.tz1._HOT: -1
hw.acpi.thermal.tz1._PSV: -1
hw.acpi.thermal.tz1.thermal_flags: 0
hw.acpi.thermal.tz1.passive_cooling: 0
hw.acpi.thermal.tz1.active: -1
hw.acpi.thermal.tz1.temperature: 0.1C
hw.acpi.thermal.tz0._TSP: -1
hw.acpi.thermal.tz0._TC2: -1
hw.acpi.thermal.tz0._TC1: -1
hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz0._CRT: 128.1C
hw.acpi.thermal.tz0._HOT: 100.1C
hw.acpi.thermal.tz0._PSV: -1
hw.acpi.thermal.tz0.thermal_flags: 0
hw.acpi.thermal.tz0.passive_cooling: 0
hw.acpi.thermal.tz0.active: -1
hw.acpi.thermal.tz0.temperature: 40.1C
hw.acpi.thermal.user_override: 0
hw.acpi.thermal.polling_rate: 10
hw.acpi.thermal.min_runtime: 0
hw.acpi.acline: 1
hw.acpi.battery.info_expire: 5
hw.acpi.battery.units: 1
hw.acpi.battery.state: 0
hw.acpi.battery.rate: 0
hw.acpi.battery.time: -1
hw.acpi.battery.life: 75
hw.acpi.video.lcd0.levels: 80 50 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 69 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
hw.acpi.video.lcd0.economy: 90
hw.acpi.video.lcd0.fullpower: 90
hw.acpi.video.lcd0.brightness: 75
hw.acpi.video.lcd0.active: 1
hw.acpi.cpu.cx_lowest: C1
hw.acpi.reset_video: 0
hw.acpi.handle_reboot: 1
hw.acpi.disable_on_reboot: 0
hw.acpi.verbose: 0
hw.acpi.s4bios: 0
hw.acpi.sleep_delay: 1
hw.acpi.suspend_state: S3
hw.acpi.standby_state: NONE
hw.acpi.lid_switch_state: NONE
hw.acpi.sleep_button_state: S3
hw.acpi.power_button_state: S5
hw.acpi.supported_sleep_state: S3 S4 S5
```


----------



## Minbari (Jan 10, 2020)

I'm using graphics/intel-backlight to control the brightness on my Thinkpad.

eg>

```
intel_backlight                                                                                                                                                 
Current backlight value: 70% (3106/4437
```


----------



## Lars Skogstad (Jan 10, 2020)

Could be an idea to try xbacklight :  https://www.freebsd.org/cgi/man.cgi?query=xbacklight&sektion=1&manpath=freebsd-release-ports

Are you using freebsd 12.X ? With drm-fbsd12.0-kmod ?


----------



## userxbw (Jan 10, 2020)

yeah i915 compiled from source.


----------



## Lars Skogstad (Jan 10, 2020)

Okay, would try intel_backlight first : https://www.freshports.org/graphics/intel-backlight  or xbacklight as mentioned above.


----------



## userxbw (Jan 10, 2020)

xbacklight no worky, tried it, it is mentioned at the bottom of my first post.


```
[userx@FreeBSD ~]$ intel_backlight
Current backlight value: 100% (937/937)
```

this OS is silly. It only goes dim whenever it wants to. not every time I plug in or unplug the power cord.
When it does n unplugging it. it will not go back to brightness when I plug it back in. which too is wonky.

but it changes it like xblackling. but I cannot check it because unpluging it does not always make it go dimmer. 

```
[userx@FreeBSD ~]$ intel_backlight --help
Current backlight value: 100% (937/937)
Usage: intel_backlight [incr|decr|n] where n is brightness in percent
[userx@FreeBSD ~]$ intel_backlight 50    
Current backlight value: 100% (937/937)
set backlight to 50% (469/937)
[userx@FreeBSD ~]$ intel_backlight 100
Current backlight value: 50% (469/937)
set backlight to 100% (937/937)
[userx@FreeBSD ~]$ intel_backlight 95 
Current backlight value: 100% (937/937)
set backlight to 95% (890/937)
```


----------



## Lars Skogstad (Jan 11, 2020)

Hehe, I would recommend getting a thinkpad of some sort if you plan on using FreeBSD on a laptop. 
It makes things a bit easier usually


----------

