Backlight: In Hybrid mode on a Laptop (AMD/NVIDIA) I can't adjust brightness, amdgpu isn't used just nvidia.
Affected version
Gnome 43.2
Mutter 43.2
OS: Fedora 37 Silverblue using Wayland
Kernel 6.1.8-200.fc37
Laptop: Lenovo Legion 5 15ARH05H (Ryzen 7 4800H/NVIDIA RTX2060M)
Graphics:
Device-1: NVIDIA TU106M [GeForce RTX 2060 Mobile] driver: nvidia
v: 525.85.05
Device-2: AMD Renoir driver: amdgpu v: kernel
Device-3: Chicony Integrated Camera type: USB driver: uvcvideo
Display: wayland server: X.Org v: 22.1.7 compositor: gnome-shell driver:
gpu: amdgpu resolution: 1920x1080~144Hz
Message: No known Wayland EGL/GBM data sources. API: EGL/GBM
❯ rpm-ostree status
State: idle
Deployments:
● fedora:fedora/37/x86_64/silverblue
Version: 37.20230201.0 (2023-02-01T02:01:44Z)
BaseCommit: 8c16620566268918906174992bfacfe41e9f47dd433393fa95e3439736961791
GPGSignature: Valid signature by ACB5EE4E831C74BB7C168D27F55AD3FB5323552A
RemovedBasePackages: firefox firefox-langpacks 109.0-4.fc37 gnome-software gnome-software-rpm-ostree 43.3-1.fc37
LayeredPackages: akmod-nvidia android-tools gnome-tweaks inotify-tools printer-driver-brlaser rpmfusion-free-release rpmfusion-nonfree-release starship steam-devices terminator xboxdrv xorg-x11-drv-nvidia
LocalPackages: akmod-openrazer-3.3.0-1.fc37.1.x86_64 kmod-openrazer-3.3.0-1.fc37.1.x86_64 openrazer-daemon-3.3.0-1.fc37.noarch openrazer-kmod-common-3.3.0-1.fc37.1.x86_64 openrazer-meta-3.3.0-1.fc37.noarch
python3-openrazer-3.3.0-1.fc37.noarch
fedora:fedora/37/x86_64/silverblue
Version: 37.20230201.0 (2023-02-01T02:01:44Z)
BaseCommit: 8c16620566268918906174992bfacfe41e9f47dd433393fa95e3439736961791
GPGSignature: Valid signature by ACB5EE4E831C74BB7C168D27F55AD3FB5323552A
RemovedBasePackages: firefox firefox-langpacks 109.0-4.fc37 gnome-software gnome-software-rpm-ostree 43.3-1.fc37
LayeredPackages: akmod-nvidia android-tools gnome-tweaks inotify-tools printer-driver-brlaser rpmfusion-free-release rpmfusion-nonfree-release starship steam-devices terminator xboxdrv xorg-x11-drv-nvidia
LocalPackages: akmod-openrazer-3.3.0-1.fc37.1.x86_64 kmod-openrazer-3.3.0-1.fc37.1.x86_64 openrazer-daemon-3.3.0-1.fc37.noarch openrazer-kmod-common-3.3.0-1.fc37.1.x86_64 openrazer-meta-3.3.0-1.fc37.noarch
python3-openrazer-3.3.0-1.fc37.noarch
Bug summary
NVIDIA Optimus laptop, Lenovo 15ARH05. It has two GPUs: AMD and NVIDIA, both of them provide their backlight device, both backlight devices are raw type and enabled(in case prime is used). The backlight helper selects NVIDIA device for backlight, but on this laptop brightness is controlled by AMD gpu in hyrbid mode, so user can't control brightness.
The only workaround is to add a kernel parameter (amdgpu.backlight=0) and then change the number manually using the terminal:
$ echo <number between 0 and max_brightness> | sudo tee /sys/class/backlight/amdgpu_bl0/brightness
$ echo 120 | sudo tee /sys/class/backlight/amdgpu_bl0/brightness
Steps to reproduce
- Load the system in hybrid mode
- Move the brightness slider or use
Fn+<BrightnessUP>
/Fn+<BrightnessDown>
buttons
What happened
Nothing happened, the brightness didn't change when the user moved the slider. But the nvidia device brightness number did change, not the amdgpu device number.
What did you expect to happen
I expected to change the backlight to increase or decrease the brightness
Relevant logs, screenshots, screencasts etc.
❯ ll /sys/class/backlight/
total 0
lrwxrwxrwx. 1 root root 0 feb 2 18:27 amdgpu_bl0 -> ../../devices/pci0000:00/0000:00:08.1/0000:06:00.0/backlight/amdgpu_bl0
lrwxrwxrwx. 1 root root 0 feb 2 18:27 nvidia_0 -> ../../devices/pci0000:00/0000:00:01.1/0000:01:00.0/backlight/nvidia_0
Found that other people had the same issue and even in KDE they are working on a patch or they already have it implemented (Don't know because I don't use KDE)
https://invent.kde.org/plasma/powerdevil/-/commit/761fc8a4bf4bd70bcd9aca63fc67382c94ecf884 https://bbs.archlinux.org/viewtopic.php?id=273800 https://forums.developer.nvidia.com/t/duplicate-backlight-adjustment-entry-on-lenovo-legion-r7000p-2020h-in-hybrid-graphics-mode/205282