Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Admin message
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
AMD Ryzen 4800H Renior iGPU backlight brightness control not working (Hybrid Graphics) (Lenovo Legion 5 15ARH05)
Brightness control does not work with AMD Ryzen 4800H Renior iGPU when using switchable graphics (aka. Hybrid graphics). The value of /sys/class/backlight/amdgpu_bl0/actual_brightness is stuck at 311. Brightness control only works with discrete graphics card. Brightness control somewhat worked with Fedora Workstation 32 with Linux Kernel 5.6.6 but now with 5.10.4 brightness control does not work.
Enable Switchable Graphics from BIOS and restart. Now you should have AMD iGPU and NVIDIA dGPU enabled. By default the panel uses iGPU for everything and offloads large graphical apps to dGPU.
Now try to change the brightness with software, Fn keys and changing /sys/class/backlight/amdgpu_bl0/brightness and the brightness will not change, i.e The brightness control will not respond and the brightness will always be at max.
It is worthy to note that the value of /sys/class/backlight/amdgpu_bl0/actual_brightness is stuck at 311 and does not change at all.
When using only the discrete graphics card the brightness control works perfectly.
Edited
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
And there we found out that the aux backlight doesn't work for this machine at all.
So, your patches will fix the sysfs value read problem, but the actual backlight control will be still broken.
That said, either something is missing in the aux backlight control code, or it was wrongly detected as if the aux backlight works, I suppose.
@agd5f Sorry for the late reply. As @tiwai said the brightness control now works with a hack which completely forces to disable aux support. So the driver wrongly detects that aux is supported but it's not, so when backlight is adjusted it uses aux but aux is not supported so the brightness is never actually changes.
Forcing caps->aux_support = false; will fix this issue. Currently the code simply declares the device has aux support simply if it has oled, this makes no sense in my opinion (But I might be wrong, the amd guys might know better than me.)
I can confirm that forcing caps->aux_support = false allows adjusting the backlight on a Lenovo Ideapad Gaming 3 15ARH05 with Ryzen 4600H after removing that assignment in kernel 5.11.2. I am not sure how this relates to OLEDs, given that none are involved?
Is there anything to do that I could help with to get this fixed in mainline?
What exactly did you change? Did you just remove the caps->ext_caps->bits.oled == 1 check or did you just force caps->aux_support = false? Do the attached patches fix it?
For completeness: On my machine, just removing the OLED part doesn't help, I had to remove the whole if-statement from amdgpu_dm.c (not sure which of the other flags was active); but the amdgpu.backlight=0 will handle that. What's the ETA, kernel 5.12 or later?
@agd5f I simply implied that the check for aux support is not fool proof. The check needs to be more robust and reliable. At least have an option to force disable aux support in mainline linux. Maybe a kernel option like how @tiwai implemented in his fix?
Your display indicates that it uses aux backlight control. Presumably the OEM chose not to use the aux control for some reason and never updated the DPCD info.
Your display indicates that it uses aux backlight control. Presumably the OEM chose not to use the aux control for some reason and never updated the DPCD info.
@agd5f All Lenovo Legion 5 AMD version(I think intel versions are affected too, I can't confirm without testing) and Lenovo Ideapad Gaming AMD version has this issue. Can we make any workaround which can be accepted into the mainline kernel??? Or our only chance is to use patched linux kernels forever? Can we sort of make a test if the backlight control actually worked when using aux control and if not fallback to not using aux?
EDIT: Most likely the driver is reading the DPCD info wrongly.
I think in eDP displays we have to check if it supports both aux and PWM pin, if it does then we have to prefer PWM pin over the aux. A kernel param to force use PWM pin would be nice. It is worthy to note that even in ASUS TUF(AMD Version) laptops, this issue also exists.
@agd5f Thanks for the quick fix. I really hope to speak to the folks at Lenovo or ASUS to talk about this issue but it seems they don't care about linux or open source which is sad. I've tested the latest changes and everything seems to work just fine.
This problem seems to happen on various laptops with ADM/NVIDIA switchable graphics, but not on laptops with just AMD GPU. I have not seen anyone report it on laptop without NVIDIA GPU, and it works correctly on my laptop with just AMD iGPU. Is there any laptop with switchable graphics where this issue doesn't occur? If no, the workaround could be applied to all systems with NVIDIA GPU.
@agd5f It is true that this issue happens in a lot of laptop with switchable graphics as said by @filip-hejsek
Is there any progress in finding the root of this bug??. This specific bug occurs only with switchable graphics which uses a mux. But I'm really glad that we got a workaround in the mainline kernel.
Hi. I'm use Lenovo ideapad gaming 3 (ryzen 7 4800h & gtx1650ti). I guess you found a temporary solution, but I don't understand how you did it. I've been dealing with this issue for days, how can I solve this issue? I would be glad if you help.
You should probably upgrade to a kernel version of 5.11.7 or higher (if you don't want to patch your kernel). How exactly depends on your distribution or how you build your own kernel.
It's probably using systemd-boot. I don't have experience with that, but you probably need to adjust some .conf file in /boot/loader/entries and add the missing kernel option like:
I was able to get brightness control by adding "RegistryDwords" "EnableBrightnessControl=1" to the nvidia xorg.conf file but I also had to set dedicated graphics in the bios which has not been great for battery life. https://wiki.archlinux.org/title/NVIDIA#Enabling_brightness_control
Probably it would be better to edit the grub file. I removed the systemd-boot package and installed grub, then edited the /etc/default/grub file and fixed the problem. But overall I found that Pop!_OS consumes more battery than Windows.
@agd5f In Linux version 5.14.14, I can get brightness control in hybrid mode without the use of the kernel parameter amdgpu.backlight = 0. I don't know which version of linux fixed it exactly. But it seems to be fixed.