Brightness not working Ubuntu 20.04 Lenovo Legion 5 (15IMH05)

Hi everyone! I have a problem that is driving me crazy these days.
I have a Legion 5 (15IMH05) with:

  • GeForce GTX 1650 Ti
  • Nvidia driver 460
  • Ubuntu 20.04 installed
  • kernel 5.11.0
  • latest bios updated (EFCN50WW)

With F5/F6 buttons I can change the brightness bar, but brightness is not actually changing (also battery is running low very fast). I have a dual boot with Windows and there everything works fine.
I’ve tried many soultions found on this forum, on, and so on… to name a few:

  • I added acpi_backlight=video/none/… acpi_osi=linux to /etc/default/grub
  • I added “RegistryDwords” “EnableBrightnessControl=1” to /usr/share/X11/xorg.conf.d/10-nvidia.conf
  • I tried older kernels and drivers
  • Saved an xorg.conf file and modified it
  • Tried dynamical mode but screen froze after login

I don’t really know what to do know and I cannot find any other solution on the web, I hope if someone of you can help me fixing this problem. If needed, I can attach a nvidia-bug-report.log.
If you have the same problem of mine hit like so developers may see this is a shared problem. Thank to everyone who will spend their time on this!


@generix I tag you because I saw on other posts you worked on similar problems and have the knowledge to solve this, please, help!


I’m bumping this post since I have the same issue.
I fixed this issue once with things OP mentioned, but the week after Nvidia had a minor update for 460 drivers, and the problem, is back.

nvidia-bug-report.log.gz (293.0 KB)

sudo nano /usr/share/X11/xorg.conf.d/10-nvidia-conf
add this
Option "RegistryDwords" "EnableBrightnessControl=1"

sudo nano /etc/initramfs-tools/modules
add this

sudo update-initramfs -u

You might have to update the grub.

sudo update-grub

reboot the device.

I hope this helps.

for me, no, it doesn’t help.
But thanks for the reply anyway.

I also have the same laptop.
Here is the few thing i noticed.

Before fixing the issue, I was able to change the brightness with the command line.
xrandr --output DP-2 --brightness 0.3
If you are not able to change the brightness through the command line, then you might have to reinstall the Ubuntu.

I also tried changing the grub file, but it did not help.

I noticed in the /sys/class/backlight directory acpi_video0 directory was there.
I believe this is dynamically generated directory because by using acpi_backlight=vendor, it creates the
nvidia_0 (that’s the directory, that control the brightness when using nvidia driver).
Now see if by changing the brightness through Fn key or brightness toggle the actual brightness value is changing or not
inside the cat /sys/class/backlight/nvidia_0/actual_brightness, it will change the value but not the brightness at screen level.
Also I noticed there is no /etc/X11/xorg.conf file. So i generated using nvidia-settings → X Server Display Configuration → Save to X Configuration File.
sudo nano /etc/X11/xorg.conf go to the Device section and add the Option

It did helps to change the brightness regardless of adding Option in /usr/share/X11/xorg.conf.d/10-nvidia-conf when using with this statement.

I later find just having Option in /usr/share/X11/xorg.conf.d/10-nvidia-conf it preserve the changes, so i deleted the /etc/X11/xorg.conf, but keep in mind it did helped in brightness control.

Last thing we only need nvidia_0 directory in /sys/class/backlight so in grub i did not use acpi_backlight option. Without using this acpi_backlight=vendor/video option, it dynamically generated the nvidia_0 directory.

Thanks for the reply.

I tried everything you mentioned but it’s still not working.
I’m using kernel 5.11 and 465 nvidia drivers if it matters.

1 Like

There must be something broken, it requires extensive debugging.
The only straight forward solution is to Create a Systemd unit file and put the below command which runs every time when system boots up (How to use systemd to keep programs running - YouTube).

I had firmware issue with new installed Ubuntu. Whenever i closed the lid or after 5min of sleep, the X server get crashed or not able to reload itself. It was really a weird issue. After doing some research i found this (Linux: ACPI: Fix problems with Suspend, Resume, and Missing devices using acpi_osi=) blog which solved my problem. I’m sure controlling the brightness is the driver issue not the firmware, but its good to know how to enable some of the hardware functionality in Linux.

Here my grub configs:
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX=" acpi_osi=! \“acpi_osi=Windows 2015\”"

xrandr is for changing brightness with software. That works for me but it just changes the gamma value and it doesn’t actually change the brightness, it just darkens the image.
The GPU still uses full brightness which drains the battery in 2-3 hours while it should run for 8 hours.

1 Like

Still have this issue on nvidia 470

1 Like

Please list the contents of /sys/class/backlight via
ls /sys/class/backlight

Also please boot the system without parameter without nvidia-drm.modeset=1 and share test results.

For me, I only have acpi_video0 in /sys/class/backlight. The content of the brightness file changes when I try to change the brightness using the fn keys or through the UI, but the actual screen brightness stays the same.
I removed all additional parameters from GRUB.

Is there anything else on this subject? @amrits . I removed that param from startup before to make it even start at all. Before that it was a black screen.

The drivers are installed and working, just nu screen brightness control available.

I have tried everything mentioned in this post, nothing helped. This is a real problem for me because this screen is way to bright to have it running on 100% capacity all of the time. Hopefully this can be solved.

For @amrits as well

I have a Lenovo Legion Y540 which is a precursor to the Legion 5. It’s model 15IRH, has only RTX 2060 Ti graphics (no hybrid in BIOS possible). Couple things I’ve found while troubleshooting.

  • The Legion series was spec’d for primarily Windows gaming and so most likely will not receive any Linux support from Lenovo.
  • The Legion Y540 was an up-spec’d Ideapad; I found this after booting GRUB with the acpi_video=vendor option, which resulted in /sys/class/backlight/ideapad. Using acpi_video=ideapad in GRUB resulted in a hang at boot time; no further troubleshooting was possible.
  • The F5/F6 keys worked in Linux Mint using EnableBrightnessControl=1 but getting there was a struggle, having to boot into compatibility mode first with the Nouveau drivers, then installing NVIDIA, then rebooting, then messing with the 10-nvidia.conf file. I eventually switched to Arch Linux (EndeavourOS) as I could get better troubleshooting info.

After hours of systematic trial-and-error, and hours of frustration, I was able to make the following work. Using kernel 5.10 and NVIDIA 465. All this is done using sudo or other account with root privileges.

Edit etc/default/grub:
Add kernel parameter acpi_video=native
This allows the system to generate the nvidia_0 backlight class.
Run update-grub for Debian systems, grub-mkconfig -o /boot/grub/grub.cfg for Arch systems

Edit /etc/mkinitcpio.conf:
MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm"

Notice that @shashank_96 's edit is missing the nvidia_uvm module.

On Debian, run updateinitramfs -u.

On Arch-based, you need to add hooks for when you rebuild the kernel.
Edit /etc/pacman.d/hooks/nvidia.hook:


Description=Update Nvidia module in initcpio
Exec=/bin/sh -c ‘while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P’

Then run mkinitcpio -P

Third and last:

To enable kbd brightness, edit /usr/share/X11/xorg.conf.d/10-nvidia.conf:

Section “OutputClass”
Identifier “nvidia”
MatchDriver “nvidia-drm”
Driver “nvidia”
Option “AllowEmptyInitialConfiguration”
Option “RegistryDwords” “EnableBrightnessControl=1;”
ModulePath “/usr/lib/x86_64-linux-gnu/nvidia/xorg”

So this is a lot of hoops to jump through but I was able to get my F5/F6 keys working. Troubleshooting this is a bear because the issues almost always seem to arise at the GRUB/ kernel module level.

One other resource that may help, but I haven’t investigated yet, is in the Manjaro article ACPI Kernel Parameters and how to choose them. If you know which version of Windows your Legion 5 was built for, you may be able to get further along the troubleshooting path than I did using trial-and-error.

thanks for the detailed answer, but at least for me, it’s not working.
I still have acpi_video0 instead of nvidia_0 class in /sys/class/backlight.
Still, I can change the brightness file content but the actual brightness is the same.

1 Like

Well then, here’s my “Troubleshooting Grid.” Maybe there’s a single setting or combination that works on your Legion 5. Also, on some systems it seems the F5/F6 keys aren’t sending the “correct” keycode that the driver is listening for. You then need to remap they keys so they send the correct code.

Some day, all this will be fixed (fingers crossed) For now it’s a royal pain in the you-know-where.

acpi_backlight=osi (may need to play with the ACPI settings from the Manjaro article)


1 Like


What works for me is this flag in /etc/default/grub:

This is my grub file content:

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1"

Then of course run: sudo update-grub


My eyes are saved :)


Hi @amrits,
ls /sys/class/backlight gives acpi_video0
inside of it there are:
actual_brightness brightness max_brightness scale type
bl_power device power subsystem uevent

And looking at /sys/class/backlight/nvidia_0/brightness
and /sys/class/backlight/nvidia_0/actual_brightness
both have the correct brightness (and change value when I press F5/F6). But still screen brightness in 100%


Thank you for this solution found in the deepest forum