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.

2
  • Facing similar issues. Brightness not working and flickering/horizontal lines in screen. Has anyone found the solution to it?
    – sam
    Dec 9, 2020 at 16:19
  • "I found an intel_backlight folder in /sys/class/backlight" well and then what? Have you tried modifying the brightness file in that folder? What have you verified? You claim an app solved you problem, but it is not the perfect solution. What is the perfect solution?
    – Quasímodo
    Dec 17, 2020 at 11:38

7 Answers 7

23
+50

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.

2
  • 1
    This actually helped to mitigate the issue (the screen being to bright to work with), however, as per xrandr docs: Multiply the gamma values on the crtc currently attached to the output to specified floating value. Useful for overly bright or overly dim outputs. However, this is a software only modification, if your hardware has support to actually change the brightness, you will probably prefer to use xbacklight. see also askubuntu.com/questions/62249/…
    – ashkanb0
    Dec 24, 2020 at 5:21
  • This also works for my case! You saved my eyes!
    – HKTonyLee
    Mar 21, 2023 at 17:15
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

5
  • 1
    Excellent. Worked with Legion 5i (nVidia RTX 2060) and Kubuntu 20.04 LTS - proprietary nVidia driver version 460.91.03 from official repositories.
    – adamitj
    Aug 25, 2021 at 15:15
  • Not working for me :/ (Manjaro, Nvidia 470.63.01 and Linux 5.14)
    – Bensuperpc
    Sep 13, 2021 at 15:16
  • The adaptation in /etc/X11/xorg.conf no longer worked when setting kernel parameter nvidia-drm.modeset=1, preparation for Wayland in Ubuntu 21.10, but still using X11. But I found a solution and described it here: askubuntu.com/questions/1369250/… Oct 18, 2021 at 19:17
  • Awsome! Thanks for this. My brightness works again. although I have fist fixed the issue that my device were not recognizing my NVIDIA graphic card. I followed this instruction and it fixed it. askubuntu.com/a/1278178/1106093
    – Met Kiani
    Oct 25, 2021 at 10:20
  • This worked for me however I had to install the NVIDIA proprietary drivers first. After installing the drivers I was able to control brightness with xrandr --output DP-2 --brightness 0.7 then following your steps and a reboot the controls now work. Thanks!
    – Kyle Coots
    Dec 25, 2021 at 12:27
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
6
  • 1
    works on thinkpad e14 also.
    – Dhruv garg
    Mar 5, 2021 at 4:59
  • Hi, I was able to boot only when I fix nouveau.modeset=0, keep it like that can I still do this change?
    – fahd
    Aug 18, 2021 at 13:10
  • it works!!!! but will I get ACPI error again?? I have been using nouveau.modeset=0 or nomodeset to overcome those issues, pls comment
    – fahd
    Aug 18, 2021 at 13:26
  • Not working for me but my external screen works now ^^ (Manjaro, Nvidia 470.63.01 and Linux 5.14)
    – Bensuperpc
    Sep 13, 2021 at 15:18
  • @fahd you should install last bios, and set do discrete mode always. I never use with hybrid mode, intel graphics is bad
    – sharkguto
    Nov 4, 2021 at 21:53
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)

2
  • Use sudo mkinitcpio -P for ArchLinux.
    – insign
    Jan 24, 2022 at 16:11
  • The discrete mode steps worked for me, even using dynamic mode.
    – insign
    Jan 24, 2022 at 16:12
1

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

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

1
  • I can confirm updating the kernel version to 5.16.14 fixed my issues with the brightness on Manjaro KDE, even on Hybrid mode. Apr 1, 2022 at 16:00
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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .