# Can't adjust brightness on laptop with Intel HD Graphics 400 on FreeBSD 12.1-RELEASE



## jailed (Apr 11, 2020)

Hello all,

I have an HP laptop with Intel(R) Celeron(R) CPU  N3060 and Intel HD Graphics 400.

I bought this laptop in 2017 and installed FreeBSD 11 on it. I was able to adjust brightness then on this version. The problem was, I was unable to use the onboard WIFI (I solved this problem with using a USB WIFI dongle), and share display with an external device (projector, or monitor). Since I need to make presentations then, I had to remove FreeBSD 11 and used the laptop with Windows 10 until now and continue using FreeBSD on my desktop computer.

I no longer need to make presentations on this laptop. So I decided to install FreeBSD's latest version onto laptop. The main difference on FreeBSD 12.1 is, it now supports onboard WIFI (but bandwidth is very slow). But now, I cannot adjust brightness anymore. I see that a few things changed about driver support.

Here's some output of my system.

```
% pciconf -lv
hostb0@pci0:0:0:0:      class=0x060000 card=0x8320103c chip=0x22808086 rev=0x35 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register'
class = bridge
subclass = HOST-PCI
vgapci0@pci0:0:2:0: class=0x030000 card=0x8320103c chip=0x22b18086 rev=0x35 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller'
class = display
subclass = VGA
none0@pci0:0:11:0: class=0x118000 card=0x8320103c chip=0x22dc8086 rev=0x35 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller'
class = dasp
ahci0@pci0:0:19:0: class=0x010601 card=0x8320103c chip=0x22a38086 rev=0x35 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SATA Controller'
class = mass storage
subclass = SATA
xhci0@pci0:0:20:0: class=0x0c0330 card=0x8320103c chip=0x22b58086 rev=0x35 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller'
class = serial bus
subclass = USB
none1@pci0:0:26:0: class=0x108000 card=0x8320103c chip=0x22988086 rev=0x35 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine'
class = encrypt/decrypt
hdac0@pci0:0:27:0: class=0x040300 card=0x8320103c chip=0x22848086 rev=0x35 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller'
class = multimedia
subclass = HDA
pcib1@pci0:0:28:0: class=0x060400 card=0x8320103c chip=0x22c88086 rev=0x35 hdr=0x01
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port'
class = bridge
subclass = PCI-PCI
pcib2@pci0:0:28:3: class=0x060400 card=0x8320103c chip=0x22ce8086 rev=0x35 hdr=0x01
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port'
class = bridge
subclass = PCI-PCI
isab0@pci0:0:31:0: class=0x060100 card=0x8320103c chip=0x229c8086 rev=0x35 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU'
class = bridge
subclass = PCI-ISA
none2@pci0:0:31:3: class=0x0c0500 card=0x8320103c chip=0x22928086 rev=0x35 hdr=0x00
vendor = 'Intel Corporation'
device = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx SMBus Controller'
```

/etc/rc.conf includes:

```
dbus_enable="YES"
kld_list="/boot/modules/i915kms.ko"
```

When I `kldload acpi_video`, I can see:

```
# 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 68 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: 50
hw.acpi.video.lcd0.fullpower: 80
hw.acpi.video.lcd0.brightness: 80
hw.acpi.video.lcd0.active: 0
```

As you can see, lcd0 is inactive.

I updated the laptop's BIOS but no luck. I installed graphics/intel-backlight but it does not work too. FN keys not working but it's not important for me, I can adjust the brightness from console, if may work. I will be very happy, if someone may help me.

Thanks in advance.

Sincerely.


----------



## aragats (Apr 12, 2020)

Try this:
	
	



```
% sysctl sys.class.backlight.intel_backlight.bl_device.actual_brightness
### and the max brightness should be:
% sysctl sys.class.backlight.intel_backlight.bl_device.max_brightness
```


----------



## jailed (Apr 12, 2020)

Hello,

Thank you for your reply. Unfortunately, these 2 sysctl oids do not exist in my system. There is no sys.class.backlight.


----------



## SirDice (Apr 17, 2020)

Not sure if it will work for your laptop but have you tried acpi_hp(4)?


----------



## jailed (Apr 18, 2020)

SirDice said:


> Not sure if it will work for your laptop but have you tried acpi_hp(4)?



Yes, I've already tried that but it didn't help.

I also dumped the ACPI code with `acpidump`, but I don't know how to make calls with `acpicall`, and if it's safe. Is there a safe method to locate the ACPI memory addresses etc., by reading the ACPI code? If it's possible and safe, I can try to debug it by myself.


----------



## jailed (Apr 19, 2020)

After I read the dumped ACPI code very carefully, I found the address of the backlight section. It's \_SB_.PCI0.GFX0.DD1F._BCM. I tried to adjust brightness with `acpi_call`, but it didn't work.

`# acpi_call -v -p "\_SB_.PCI0.GFX0.DD1F._BCM" -i 10
Path: \_SB_.PCI0.GFX0.DD1F._BCM
Number of arguments: 1
Argument 1 type: Integer
Argument 1 value: 10
Status: 0
Result: 10

# acpi_call -v -p "\_SB_.PCI0.GFX0.DD1F._BQC"
Path: \_SB_.PCI0.GFX0.DD1F._BQC
Number of arguments: 0
Status: 0
Result: 10`

I tried all the values between 0 and 100 but there's no luck. Nothing changes.


----------



## kpedersen (Apr 19, 2020)

Just to confirm; you don't have the "hw.acpi.video.lcd0.brightness" sysctl?

i.e (after a `# kldload acpi_video`)


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


----------



## jailed (Apr 19, 2020)

kpedersen said:


> Just to confirm; you don't have the "hw.acpi.video.lcd0.brightness" sysctl?
> 
> i.e (after a `# kldload acpi_video`)
> 
> ...



Hello,

As I showed in my first post in the thread, I have hw.acpi.video.lcd0.brightness, but it does not affect. Also, acpi_video and acpi_hp does nothing different.


----------



## kpedersen (Apr 19, 2020)

Hi Jailed,

Ah OK, sorry for the noise 
Just the following you said made me think you might be overlooking the writable sysctl appearing.



jailed said:


> When I `kldload acpi_video`, I can see:
> 
> ```
> # sysctl -a | grep lcd
> ...


----------



## diego (Jun 27, 2020)

I have same problem with a TOSHIBA SATELLITE L50-C laptop, with the same *chip=0x22808086*".

```
hostb0@pci0:0:0:0:      class=0x060000 card=0xf8401179 chip=0x22808086 rev=0x21 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register'
    class      = bridge
    subclass   = HOST-PCI
```
We are working in a solution in other forum, please go here:








						freeBSD noob, fighting!!! brightness, touchpad, intel driver
					

Hi guys, I'm happy to join this community, sorry form my english.  Maybe this post is not helpful, but here I'm, maybe someone that search on google it's interested.  I have still some doubt about many things, but in the meantime I was waiting to be accepted here, I have fixed the basic problem...




					forums.freebsd.org


----------



## RodrigoC (Apr 10, 2021)

jailed said:


> After I read the dumped ACPI code very carefully, I found the address of the backlight section. It's \_SB_.PCI0.GFX0.DD1F._BCM. I tried to adjust brightness with `acpi_call`, but it didn't work.
> 
> `# acpi_call -v -p "\_SB_.PCI0.GFX0.DD1F._BCM" -i 10
> Path: \_SB_.PCI0.GFX0.DD1F._BCM
> ...



It worked for me on a Lenovo L590 where hotkeys, sysctl and intel_backlight methods didn't work.

With loaded modules acpi_video, acpi_ibm, acpi_call, i915kms.

Thanks,


----------



## RodrigoC (Apr 10, 2021)

Also

```
#sysctl hw.acpi.video.lcd0.brightness=50
```
works.


----------



## RodrigoC (Apr 14, 2021)

Even better, on 13.0
`#backlight 50`
is working for my Lenovo L590


----------

