3

I've observed the same behavior on 4 different Linux distributions (mint, manjaro, debian, ubuntu), they show ACPI errors on boot (link of a picture: https://imgur.com/a/7rLTsyr edit: this seems to be an unrelated and harmless bug reported and marked as won't fix on https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1864895 ) and then the systems works fine, but I can't control the screen brightness that is stuck at 100%. This is a huge issue since I work at night and the 300 nits of the screen are burning my eyes, making the laptop unusable while also draining the battery. Looking online, this is a common issue:

Brightness control keys don't work on Lenovo Y540 but xrandr does
https://www.reddit.com/r/Ubuntu/comments/cxygkp/brightness_not_working_on_ubuntu18_nvidia_rtx/
Brightness adjustment not working on Lenovo Y540 https://www.reddit.com/r/pop_os/comments/ckkqod/cannot_change_screen_brightness_lenovo_legion_y540/

but everyone seem to have "fixed" their issue the same way: by changing the bios settings from discrete graphics to switchable graphics. Sadly, my processor is the i7-9750HF variant, which does not include an integrated GPU (that's the meaning of the F part). This means that I only have my RTX 2060 discrete GPU and I'm not able to chose switchable graphics since there is nothing else to switch into.

Here is a list of some of the things I tried and didn't work:

  • linux kernels tested: 5.4, 5.3, 5.0, 4.15

  • Nvidia drivers tested: nouveau, 430, 435, 440

  • BIOS version: BHCN36WW, BHCN35WW

  • Tried updating /etc/default/grub acpi_backlight=<all different options>, no luck.

  • xbacklight does nothing.

  • ls /sys/class/backlight shows only acpi_video0

  • sudo tee /sys/class/backlight/acpi_video0/brightness <<< 5 has no effect

  • the only thing that works is xrandr --output DP-2 --brightness 1 but that is not a solution since the backlight brightness isn't actually being changed, it just ramps the gamma. This is a software workaround that doesn't actually control the hardware. It also wouldn't help with battery life.

I have tried every solution that I could find or think, but nothing worked. It sounds like something that could be fixed with a BIOS update, since it seems BIOS and ACPI related, but I don't know when or if ever a BIOS update will ever come, is there something on the OS side that could fix this issue?

Please let me know if there is any extra information I should provide and thank you in advance for your help and patience!

system info dump:

  • CPU: i7-9750HF
  • GPU: Nvidia RTX 2060
  • Screen: 1920x1080, 300 nits, 144 Hz
  • Laptop: Lenovo Legion Y540 - 15IRH
  • Model name: 81SX
  • BIOS version: BHCN36WW

PS: Switching secure boot back on makes the brightness control issue go away. But sadly other problems show up, apparently because it loads the nouveau driver and doesn't tell you that it did (the gui will say you are using the proprietary drive but inxi -Gx will tell you the truth that you are using the nouveau one). I was going to try to blacklist it but turns out it was already blacklisted and loaded it anyway.

5 Answers 5

2

I noticed that you haven't tried to enable the backlight in xorg.conf. See the 'enable brightness control' tip in the archwiki.

I have switchable graphics but I set the bios to discrete graphics because of my windows dual boot. So I too had to find another solution.

$ uname -a
Linux fifi 5.3.0-42-generic #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


$ less /etc/X11/xorg.conf
Section "Device"
        Identifier "Nvidia Card"
        Driver "nvidia"
        VendorName "NVIDIA Corporation"
        BoardName "GeForce GTX 1650"
    Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

$ ls /sys/class/backlight/nvidia_0/
power/  actual_brightness  bl_power  brightness  device@  max_brightness  subsystem@  type  uevent
9
  • You just solved my 4 weeks old problem! Just a few things for anybody else with the same issue: The file xorg.conf didn't exist for me. Following the link @cccplex suggested and also this one I was able to create it but I'm not sure how because of the many errors I got, I think it was using sudo nvidia-xconfig (nvidia Gui also crashed). Also, I discovered that you can enable secure boot and the screen brightness will work again! But you will be stuck with the nouveau driver for some reason, blacklisting it doesn't work.
    – barzilay
    Mar 24, 2020 at 1:30
  • Yes you have to create /etc/X11/xorg.conf Do you still have errors? I think it is best to only put the minimal needed configuration there because xorg will automatically configure the rest. The minimal config you can see in my answer. You will have to change the boardname to your own.
    – cccplex
    Mar 25, 2020 at 9:53
  • There is a lot of configurations on my file since I used nvidia-xconfig to generate it automatically, should I have just created one from scratch and pasted yours? I could delete mine now and use yours (with a change to the boardname). The screen brightness problem is gone! Thank you so much!
    – barzilay
    Mar 25, 2020 at 17:51
  • But I still have another problem, I think it was already here before the changes. On system suspension I get stuck on a black screen for a really long time, while it shows an error message, one error for each time I suspend the system by closing the lid or pressing the power button. With 4 suspensions: imgur.com/ea2jhD0 . Did you get the same problem? It seems to be wifi related but my connection works fine and I couldnt find a similar problem online. Yesterday I saw a different error message for some reason, an ACPI error saying that suspension was not implemented or something.
    – barzilay
    Mar 25, 2020 at 18:06
  • Yes, I did have suspend problems on my y540. But on the latest ubuntu with nvidia 435 they are gone. Hopefully it stays gone because it is prone to regression.
    – cccplex
    Mar 27, 2020 at 17:46
2

I also have same laptop Lenovo Legion Y540. This is now fixed in new update but you have to switch the BIOS option for graphics from Discrete Graphics to Switchable Graphics.

Also you have to update grub configuration (i.e. edit the file /etc/default/grub and then run sudo update-grub) as follows:

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=linux acpi_backlight=intel"

Confirm that the acpi_backlight=intel it should not be set to vendor. Setting it to vendor stops the working of function-keys.

2
  • This doesn't solve the issue for me, from BIOS options keeping it to Discrete Graphics works for me.
    – ritesh
    Feb 26, 2021 at 15:13
  • Can confirm this solves the issue also for Legion 5 with AMD Ryzen 7 4800H and NVIDIA GeForce GTX 1660 Ti Mobile. It should still be labeled 'intel' because this what the NVIDIA driver uses.
    – MrD
    Apr 3, 2021 at 18:44
1

I've tried all the stuff written here with no luck. However I've written a small Python GUI script to change brightness through a GUI.

Please check https://github.com/momen84/brightness_controller

3
  • enabling backlight in xorg.conf didn't work? What's your model exactly? Do you have an integrated GPU? are you using ubuntu?
    – barzilay
    Jul 12, 2020 at 18:30
  • If you want to ignore security vulnerabilities then get the kernel 4.18. everything will get solved
    – sam
    Jul 16, 2020 at 11:09
  • I have Legion Y540 and running Dual Boot Ubuntu 20.04 and Windows 10. I installed both using the Discrete GPU option from the BIOS, however when I tried the Switchable option , xorg fails !!. So I wrote that small script as a work around, however when I deleted the xorg.conf file, everything worked just fine !!! All options now are working just perfect . I don't know why exactly but that's what happened.
    – Momen84
    Jul 18, 2020 at 16:34
0

if you were using Lenovo legion Y540 or any other model, make sure that when you dual boot the system disable secure boot option . and also graphic to switchable mode. this will solve your problem . if you were facing issue with brightness not working you should check that if those upper mention things has been set up properly.

1
  • No, that doesn't solve the problem, as mentioned on the question. CPUs with no iGPU do not have the switchable mode
    – barzilay
    Nov 12, 2020 at 19:02
0

This issue is fixed (no 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.