Bug 207833 - Brightness control not working on ASUS TUF FA506IU (AMD Ryzen 7 4800H / Nvidia GTX 1660 Ti)
Summary: Brightness control not working on ASUS TUF FA506IU (AMD Ryzen 7 4800H / Nvidi...
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: drivers_video-dri
Depends on:
Reported: 2020-05-21 17:46 UTC by julen.pardo
Modified: 2021-05-06 15:10 UTC (History)
4 users (show)

See Also:
Kernel Version: 5.6.12-1
Regression: No
Bisected commit-id:


Description julen.pardo 2020-05-21 17:46:38 UTC

I've just bought an ASUS TUF FA506IU with and AMD Ryzen 7 4800H / Nvidia GTX 1660 Ti setup. Even if this is quite new hardware, I'd say that the only thing that is not working at all is the brightness control. It's not working with the function keys, nor from the energy settings, nor with xbacklight.

Actually, it's working a little; I can find a subtle difference between the max value and the last 5 values, but that's it. Setting it to the minimum still makes it way too bright.

I've noticed that this could be a range mismatch between "brightness" and "max_brightness", and "actual_brightness". First are in 8 bit ranges, whereas the actual brightness is in 16 bit range. I've tried some luck patching the kernel to return an 8-bit value (https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c#L299), but doing just that doesn't work (even if the "actual_brightness" was showing an 8 bit value). In my case, the full path is "/sys/class/backlight/amdgpu_bl1/".

I've also tried different acpi_backlight parameters with no luck.

I leave the output of lsmod | grep asus:

asus_wmi               40960  0
sparse_keymap          16384  1 asus_wmi
rfkill                 28672  9 asus_wmi,bluetooth,cfg80211
battery                24576  1 asus_wmi
wmi                    36864  2 asus_wmi,wmi_bmof
asus_wireless          20480  0

inxi -F:

System:    Host: TUF-FA506IU Kernel: 5.6.12-1-MANJARO x86_64 bits: 64 Desktop: KDE Plasma 5.18.5 Distro: Manjaro Linux 
Machine:   Type: Laptop System: ASUSTeK product: TUF Gaming FA506IU_FA506IU v: 1.0 serial: <root required> 
           Mobo: ASUSTeK model: FA506IU v: 1.0 serial: <root required> UEFI: American Megatrends v: FA506IU.302 
           date: 03/04/2020 
Battery:   ID-1: BAT1 charge: 47.9 Wh condition: 47.9/48.1 Wh (100%) 
CPU:       Topology: 8-Core model: AMD Ryzen 7 4800H with Radeon Graphics bits: 64 type: MT MCP L2 cache: 4096 KiB 
           Speed: 2405 MHz min/max: 1400/2900 MHz Core speeds (MHz): 1: 1875 2: 2497 3: 1397 4: 1397 5: 1397 6: 1397 7: 1397 
           8: 1397 9: 1397 10: 1396 11: 2963 12: 1673 13: 1800 14: 1548 15: 1397 16: 1396 
Graphics:  Device-1: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] driver: nvidia v: 440.82 
           Device-2: Advanced Micro Devices [AMD/ATI] Renoir driver: amdgpu v: kernel 
           Display: x11 server: X.Org 1.20.8 driver: amdgpu,nvidia resolution: 1920x1080~144Hz, 2560x1440~60Hz 
           OpenGL: renderer: AMD RENOIR (DRM 3.36.0 5.6.12-1-MANJARO LLVM 10.0.0) v: 4.6 Mesa 20.0.6 
Audio:     Device-1: NVIDIA TU116 High Definition Audio driver: snd_hda_intel 
           Device-2: Advanced Micro Devices [AMD/ATI] driver: snd_hda_intel 
           Device-3: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor driver: N/A 
           Device-4: Advanced Micro Devices [AMD] Family 17h HD Audio driver: snd_hda_intel 
           Sound Server: ALSA v: k5.6.12-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
           IF: enp2s0 state: down mac: a8:5e:45:36:94:32 
           Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter driver: rtw_pci 
           IF: wlp3s0 state: up mac: 70:66:55:09:8c:e3 
Drives:    Local Storage: total: 476.94 GiB used: 32.41 GiB (6.8%) 
           ID-1: /dev/nvme0n1 vendor: Kingston model: OM8PCP3512F-AB size: 476.94 GiB 
Partition: ID-1: / size: 48.97 GiB used: 25.95 GiB (53.0%) fs: ext4 dev: /dev/nvme0n1p5 
           ID-2: /home size: 108.67 GiB used: 6.46 GiB (5.9%) fs: ext4 dev: /dev/nvme0n1p7 
           ID-3: swap-1 size: 3.03 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p8 
Sensors:   Message: No sensors data was found. Is sensors configured? 
Info:      Processes: 349 Uptime: 27m Memory: 7.20 GiB used: 3.04 GiB (42.2%) Shell: zsh inxi: 3.0.37
Comment 1 Mateusz 2020-05-29 07:35:26 UTC
Does it work better after closing lid and reopen it? (the system goes suspend)
I have an ASUS Zephyrus G14 with similar specs and this is the case, after closing lid and suspending when I wake up the system brightness control works good.
Comment 2 julen.pardo 2020-05-29 07:44:14 UTC
(In reply to Mateusz from comment #1)
> Does it work better after closing lid and reopen it? (the system goes
> suspend)
> I have an ASUS Zephyrus G14 with similar specs and this is the case, after
> closing lid and suspending when I wake up the system brightness control
> works good.

Not really, it's the same. Actually I just get a blackscreen and I need to shut it down :) 

But I've discovered something interesting. If I first boot into the Windows partition and then reboot into the Linux one, the brightness control works fine.
Comment 3 Alex Deucher 2020-05-29 13:10:38 UTC
Fixed with this patch:
Comment 4 Antony J.R 2021-02-02 14:21:13 UTC
(In reply to Alex Deucher from comment #3)
> Fixed with this patch:
> https://patchwork.freedesktop.org/patch/367486/

Does not work now in Linux kernel version 5.11-rc6(which is the latest mainline kernel at the time of writing).

I got similar spec laptop(Lenovo Legion 5) with AMD Ryzen 7 4800H with Radeon Grpahics and NVIDIA GTX 1650 Ti dGPU.

When using amdgpu kernel driver, the backlight is registered at /sys/class/backlight/amdgpu_bl0

Now the problem is /sys/class/backlight/amdgpu_bl0/actual_brightness is stuck at 311 and brightness control does not work at all.

I've tried a lot of workaround and even booted with the mainline kernel but brightness control does not work. 

Only Fedora Workstation 32 with Linux kernel 5.6.6 has brightness control working for AMD Ryzen 7 4800H APU which has the Renoir Graphics.

I have no idea why amd guys would break a already fixed issue in kernel 5.6.6, I've tried all versions of the kernel but none works other than Fedora Workstation 32 with Linux Kernel 5.6.6
Comment 5 Filip Hejsek 2021-05-06 14:03:44 UTC
This seems like a duplicate of https://bugzilla.kernel.org/show_bug.cgi?id=203905 (with more info at https://bugzilla.opensuse.org/show_bug.cgi?id=1180749). Could you try with the latest kernel and amdgpu.aux_backlight=0? If that fixes the problem and there are no other problems, this bug can probably be closed in favor of the other bug.
Comment 6 Filip Hejsek 2021-05-06 15:10:44 UTC
Sorry, the correct option is amdgpu.backlight=0, not amdgpu.aux_backlight=0 (it was changed)

Note You need to log in before you can comment on or make changes to this bug.