14

I have a Lenovo Legion 5 15IMH05H with a NVIDIA GeForce RTX 2060 6GB GDDR6/Intel Corporation UHD Graphics (rev 05) and an Intel Processor.

After dual booting windows and Ubuntu 20.04, I encountered a few issues with changing the display brightness. The brightness keys or slider don't work on Ubuntu, but they have no problem on windows. I managed to change the brightness by installing the brightness controller app but it is not a perfect solution.

I found an intel_backlight folder in /sys/class/backlight and I tried changing the GRUB several times adding acpi_backlight = vendor, none or video after quick splash.

I also tried editing files in /usr/share/X11/xorg.conf.d, like for example the 10-nvidia.conf and I tried creating a 20/80-intel.conf file, but nothing has worked so far.

It is perhaps worth noting that with intel.conf solutions, sometimes vertical green lines appear on the background and the fonts become all blurry or missing. I had to use Timeshift to return it to normal.

Here are some of the tutorials I have followed, with none working:

If anyone has found another fix for the Legion 5 or faced a similar issues, please advise.

8 Answers8

23

One method to control screen brightness that was not covered in the articles you linked to is through xrandr. Give this a try.

  1. Open Terminal
  2. Find the name of your display with: `xrandr | grep " connected" | cut -f1 -d " "
  3. Now set the brightness like this: xrandr --output {display} --brightness 0.7

On my Lenovo ThinkPad, this is what I get:

$ xrandr | grep " connected" | cut -f1 -d " "
eDP-1

Then to set the brightness to 70%:

$ xrandr --output eDP-1 --brightness 0.7

Hope this helps.

9

I managed to solve this issue by following a few steps:

  • It turned out that when using switchable graphics,the ubuntu drivers are unable to detect the laptop screen. To fix that, when booting, enter the UEFI Firmware settings and change the graphics from switchable to discrete. This should fix the problem for the nouveau driver but not the proprietary one.

  • Access the nvidia-settings from the terminal. You should see in the X server Display Configuration tab that your laptop screen has been detected as underlined in the image below (Without step 1 it will show that PRIME is selected). Once you see that your screen has been detected you can now generate an xorg configuration file. Press the corresponding button (circled in the image below) in the same tab and take note of where the xorg.conf file was generated. In my case the xorg.conf file was generated in etc/X11/xorg.conf.enter image description here

  • Finally, navigate to that directory and edit the xorg configuration file by doing for example:

sudo nano /etc/X11/xorg.conf

or

sudo gedit /etc/X11/xorg.conf

Scroll through the file until you find the line: Section "Device"
then add:

Option "RegistryDwords" "EnableBrightnessControl=1"

as illustrated here:
enter image description here

This fixed the brightness keys on my Legion 5. Hopefully it will fix it for yours

2

I did Option "RegistryDwords" "EnableBrightnessControl=1" without success, however after I change some grub configuration start working.

my notebook is

sudo dmidecode | egrep -i "15IMH05H"
...
Version: Lenovo Legion 5 15IMH05H
Family: Legion 5 15IMH05H
Version: Lenovo Legion 5 15IMH05H

edit grub file as following image

sudo vim /etc/default/grub

enter image description here

now update grub

sudo update-grub

works!

another way is to binding a shortcut in gnome, to run the following command

#!/bin/bash

printf '%.2f' $(echo cat /sys/class/backlight/acpi_video0/brightness/100 | bc -l) | xargs xrandr --output $(xrandr | grep " connected" | cut -f1 -d " ") --brightness

2

I would like to add to the accepted answer a solution that works when in dynamic / hybrid mode, and a simpler solution for discrete mode.

If your BIOS is set to dynamic / hybrid mode

Edit grub’s config:

sudo vim /etc/default/grub

Change the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

To:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video.use_native_backlight=1"

Then run:

sudo update-grub

And restart the laptop.
(source: VV0JC13CH)

NB On 22.04 it is not necessary and appears to break night light on wayland.

If your BIOS is set to discrete mode (with nvidia driver)

Edit grub’s config:

sudo vim /etc/default/grub

Change the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

To:

GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1 acpi_backlight=native nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1"

Then run:

sudo update-grub

And restart the laptop.
(source: BertRAMAerts here)

Pierre
  • 204
1

This issue is FIXED with Linux kernel 5.16.0 (tested with liquorix kernel).

Details: https://gitlab.freedesktop.org/drm/amd/-/issues/1671

0

I also own the Lenovo Legion 5 15IMH05H with NVIDIA GeForce RTX 2060 and 144Hz display. I can only get the brighntess controls working when I change the graphics mode in BIOS to discrete graphics. Then it works - with the propriteary nvidia drivers and also with nouveau in Ubuntu 20.10, all current updates installed, BIOS alos update to current efcn46ww version.

Hope that helps you.

0

This got fixed only after adding the following kernel parameter

nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1

For my distro (pop os) I had to execute the following:

kernelstub -a "nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1"

Check how to add kernel parameters for your system

Rinor
  • 109
0

I fixed it by changing bios setting - need to change option "Graphic Device" from "Discrete graphics" to "Switchable graphics". After this brightness control works fine