0

I have a Lenovo Legion 7 laptop with Nvidia RTX 2070 GPU and the brightness keys on the laptop do not change the brightness at all (it stays on max brightness it seems). I tried adding some parameters to grub settings that I found online but nothing seems to work so far.

Model: Lenovo Lenovo Legion 7 15IMH05
Memory: 32GB
Processor: Intel® Core™ i7-10750H CPU @ 2.60GHz × 12
Graphics: NVIDIA Corporation TU106BM [GeForce RTX 2070 Mobile]
Disk Capacity: 2.0 TB

OS Name: Ubuntu 22.04 LTS GNOME: 42.2 Windowing System: X11

  • Look around here: https://askubuntu.com/questions/894465/changing-the-screen-brightness-of-the-external-screen especially around the "Hardware control solution". Try to make it work from the command line first. You have more chance to debug there... – redseven Jul 12 '22 at 16:38

2 Answers2

0

I was partially able to solve this by creating a small shell script. It turns out that the the actual brightness is stored in /sys/class/backlight/acpi_video0/actual_brightness but for some reason the keys do not update the monitor brightness.

So I listen to the actual brightness using inotify and then I use xrandr to set the brightness for my laptop monitor (DP-4). You can find out what monitors you have connected using xrandr --current

You might want to tweak the math a little but other than that it seems to be working.

#!/bin/bash

while true do inotifywait -e modify /sys/class/backlight/acpi_video0/actual_brightness

read -r max < /sys/class/backlight/acpi_video0/max_brightness read -r actual < /sys/class/backlight/acpi_video0/actual_brightness

Will give .x brightness

brightness=echo &quot;scale=1; 100/$max*$actual/100&quot; | bc

xrandr --output DP-4 --brightness $brightness done

  • Note that xrandr --brightness this doesn't adjust the backlight, so wont save any power. It adjusts the intensity of the colour the display pixels produce – dan carter Sep 11 '22 at 10:38
0

Here's my solution for my Lenovo laptop with NVIDIA RTX A2000 GPU: How to find an NVIDIA driver which works with your brightness function buttons.

Basically, you just need to install the latest-possible NVIDIA driver which doesn't have brightness-button bugs/regressions. I explain the full process in great detail.