3

I have a Lenovo Legion 5 pro (2021), I tried installing ubuntu 20.04.

The problem is that I can't seem to change the brightness at all, it is at max.

Laptop Spec

**Processor** 
    AMD Ryzen™ 7 5800H Processor (8 Cores / 16 Threads, 3.20 GHz, up to 4.40 GHz with Max Boost, 4 MB Cache L2 / 16 MB Cache L3)
**Display Type**
    40.64cms (16.0) WQXGA (2560x1600) IPS 500nits Anti-glare 165Hz 100% sRGB Dolby Vision HDR 400 Free-Sync G-Sync DC Dimmer
***Memory*** 
    16 GB SO-DIMM DDR4 3200MHz
**Graphics** 
    NVIDIA® GeForce RTX™ 3060 6GB GDDR6
**Wireless**
    Wi-Fi 6, 802.11ax 2x2 Wi-Fi + Bluetooth® 5.1, M.2 Card

Just scroll down and you will see the details of the laptop, mine is with RTX 3060.

Any kind of help is appreciated, I have also heard that upgrading to ubuntu 21.04 helps?

Edit There is a hack that works xrandr --output DP-4 --brightness 0.5 but again this is a temporary solution and the controller still does not work.

I also tried to change xorg.conf file, i simply added.

Option "RegistryDwords" "EnableBrightnessControl=1"

It did not work. :,)

Edit More weirdness, now the xrandr hack gets disabled automatically and I have to run it again and again.

On top of the if the session gets suspended, the screen does not come back, like it stays blank and sometimes it comes back but it is very very dim. Not sure what's happening there.

Edit (5/12/21) I have started to use the AMD GPU to save power while using the laptop but the issue is not fixed.

4 Answers4

5
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
  • It did not work, see the problem is that GPU is dynamic and switches between the NVidia and AMD one I think? Not 100% sure. But for now, the AMD one is active. – Van Wilder Dec 05 '21 at 09:22
  • @VanWilder Have you tried GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash amdgpu.backlight=0” – Pierre Dec 07 '21 at 00:23
  • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor" I was using this so I assumed that it will handle it? – Van Wilder Dec 07 '21 at 06:38
  • I also tried putting amdgpu.backlight=0 but it didn't work- – Van Wilder Dec 07 '21 at 06:46
  • @VanWilder . I found a solution that works when in hybrid mode. check my updated answer! – Pierre Dec 09 '21 at 18:24
  • This is officially working!! Thank you! – Van Wilder Dec 10 '21 at 07:35
  • you should check out the other issues I am facing on the same laptop. It is a storm of problems in running Linux on this laptop. – Van Wilder Dec 10 '21 at 07:38
  • This worked for me, i have the bios set to discrete mode as i use an external display. Damn i wish Lenovo would let you order this laptop without discrete NVIDIA graphics. Amd graphics would be so much more stable. – dan carter Dec 20 '21 at 22:23
  • @Pierre For some reason my monitor was not working with this, so I installed 22.04 which practically solved all the issues but gave rise to another issue. https://askubuntu.com/questions/1408276/monitor-scaling-issue-on-ubuntu22-04. – Van Wilder May 13 '22 at 05:22
1

I had the same issue on my L5P 16ACH6H even after editing both grub and xorg.conf like the other answers here mentioned.

What finally solved it for me was to install an OEM kernel. I believe either 20.04c (5.13) or 20.04d (5.14) is required since the Mediatek wireless card drivers requires at least 5.12 to work. In my case I installed 20.04d using

sudo apt install linux-oem-20.04d

and now brightness control works together with WiFi+BT.

d3cbl
  • 26
  • Will it give me unsigned errors or something similar, when I was trying to install the HWE version kernel, it was creating issues. – Van Wilder Dec 27 '21 at 10:26
  • I'm not sure about that sorry. If it helps I'm using the discrete GPU mode with nvidia-driver-495 and I didn't encounter any errors. The WiFi is a bit iffy sometimes (I can't detect 5GHz connections sometimes but turning WiFi off and on fixes it) but I think that's just due to the subpar Mediatek card. – d3cbl Dec 27 '21 at 16:45
  • It is working though, I will be testing it out as much as I can. – Van Wilder Dec 29 '21 at 14:02
  • Finally, something works! – Arnas Ivanavičius Apr 05 '22 at 20:31
  • It only works with dynamic graphic mode through. :) – Van Wilder May 14 '22 at 14:16
0

Sometimes the ACPI is implemented improperly on the motherboard. One solution is to add the parameters acpi_osi=linux and acpi_backlight=video to your kernel command lines in Grub.

Open the file /etc/default/grub using gedit or any other text editor. Look for this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and change it to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

This would load device specific drivers before default drivers in Linux.

Save and close text editor.

Now update your grub:

sudo update-grub

And reboot and see what happens.

0

This issue is fully fixed (no config/hacks needed) in Linux kernel 5.16.0 (tested in Ubuntu 21.10 with liquorix kernel).

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