Can't adjust screen backlight on Legion Slim 7 / Legion 5 (2021) AMD

Bug #1944094 reported by Rocko
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Arch Linux)
New
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The screen brightness controls don't work on the Legion Slim 7 (AMD) laptop running in hybrid/dynamic mode.

The backlight control files appear in /sys/class/backlight/amdgpu_bl0, and writing to /sys/class/backlight/amdgpu_bl0/brightness changes the value in /sys/class/backlight/amdgpu_bl0/actual_brightness, but the screen brightness always remains at 100%.

I have tried kernel boot parameters:

acpi_backlight=vendor

amdgpu.backlight=0

but neither makes any difference.

I have read that users with the Legion 7 AMD and Legion 5 Pro AMD can get the backlight working with the amdgpu.backlight=0 kernel boot parameter. One difference between them and this laptop is that it has advanced optimus, meaning that it can switch the laptop display between the amdgpu and nvidia card without rebooting, if that is at all relevant.

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: linux-image-5.13.0-16-generic 5.13.0-16.16
ProcVersionSignature: Ubuntu 5.13.0-16.16-generic 5.13.13
Uname: Linux 5.13.0-16-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu69
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: rocko 1978 F.... pulseaudio
 /dev/snd/controlC1: rocko 1978 F.... pulseaudio
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Mon Sep 20 09:20:33 2021
InstallationDate: Installed on 2021-09-15 (5 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Alpha amd64 (20210910)
MachineType: LENOVO 82K8
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-5.13.0-16-generic root=UUID=99f436de-d37c-4b3e-adb2-612443efc197 ro rootflags=subvol=@ quiet splash amdgpu.backlight=0 vt.handoff=7
PulseList:
 Error: command ['pacmd', 'list'] failed with exit code 1: XDG_RUNTIME_DIR (/run/user/1001) is not owned by us (uid 0), but by uid 1001! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
 No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-5.13.0-16-generic N/A
 linux-backports-modules-5.13.0-16-generic N/A
 linux-firmware 1.200
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/02/2021
dmi.bios.release: 1.27
dmi.bios.vendor: LENOVO
dmi.bios.version: HACN27WW
dmi.board.asset.tag: No Asset Tag
dmi.board.name: LNVNB161216
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40697WIN
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Legion S7 15ACH6
dmi.ec.firmware.release: 1.27
dmi.modalias: dmi:bvnLENOVO:bvrHACN27WW:bd08/02/2021:br1.27:efr1.27:svnLENOVO:pn82K8:pvrLegionS715ACH6:skuLENOVO_MT_82K8_BU_idea_FM_LegionS715ACH6:rvnLENOVO:rnLNVNB161216:rvrSDK0J40697WIN:cvnLENOVO:ct10:cvrLegionS715ACH6:
dmi.product.family: Legion S7 15ACH6
dmi.product.name: 82K8
dmi.product.sku: LENOVO_MT_82K8_BU_idea_FM_Legion S7 15ACH6
dmi.product.version: Legion S7 15ACH6
dmi.sys.vendor: LENOVO

Revision history for this message
Rocko (rockorequin) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Shaun (drymarchon) wrote : Re: Can't adjust screen backlight on Legion Slim 7 AMD

This seems to also effect the Legion 5 15ach6 (AMD) There are two versions of the legion 5, the 2020 version and the 2021 version. It seems that this issue is fixed on the 2020 version by adding the kernel parameter amdgpu.backlight=0 but I can confirm that this does not fix the issue on the 2021 version, so its likely that the 2021 laptop is suffering from whatever this issue is. I'm guessing that the MUX switch is involved in one way or another, as it means that the NVIDIA dGPU does not have to pass frames through the AMD iGPU, it connects to the display separately, and I'm not sure which GPU actually has control over the brightness control. I wonder if the brightness isn't tied to either GPU, maybe its a separate system entirely?

summary: - Can't adjust screen backlight on Legion Slim 7 AMD
+ Can't adjust screen backlight on Legion Slim 7 / Legion 5 (2021) AMD
Revision history for this message
Shaun (drymarchon) wrote (last edit ):

Update to my previous comment - I've extensively tested different configurations (mostly kernel parameters) on my Legion 5 15ach6. I did manage to get the brightness to change when using just the dedicated GPU (selected as such within the BIOS,) using the parameter --

nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1

This causes the nvidia gpu to show up in /sys/class/backlight/ and writing to the control files works as intended. However, in hybrid mode the dGPU is alongside the iGPU, but modifying either of the /sys/class/backlight/*/brightness files does nothing.

In integrated only mode (using optimus-manager to disable the dGPU, I think its still technically still hybrid mode, but xorg doesn't know the dGPU exists.)

acpi_backlight=video/vendor/native/none

all do nothing, i tested each individually with

amdgpu.backlight=1 and amdgpu.backlight=0,

and did not get any hint of a way to control backlight, only the AMD iGPU showed up in /sys/class/backlight/, (because it was integrated only) and changing the brightness value did nothing.

Something else of note was that I noticed that when using just the dedicated NVIDIA card, xrandr showed DP-1 as the active montior, while when I was using the AMD iGPU, it was showing as eDP. Does anyone know if the MUX switch needs something from the kernel or nvidia driver to work properly? Is there any way for us to be able to check the position of the switch?

Revision history for this message
Shaun (drymarchon) wrote :

Hey, look what I found! https://gitlab.freedesktop.org/drm/amd/-/issues/1671 there is also https://gitlab.freedesktop.org/drm/amd/-/issues/1438 which is the bug report for the previous legion laptops, that one seems to center around the 4000 series APUs, whereas this time it's centered around the 5000 series.

Revision history for this message
Piotr Henryk Dabrowski (phd) wrote :

This issue is FIXED with Linux kernel 5.16.0 (tested with liquorix kernel).

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

tags: added: lunar
removed: impish
Revision history for this message
Sapsan (sergiy-bagnak) wrote :

I trying different fresh live USB: 20.04, 22.04, 22.10 and 23.04-beta
Only 23.04-beta can't adjust brightness level of display backlight on my laptop (lenovo legion 5 17ach6h).
Processor: AMD Ryzen™ 7 5800H with Radeon™ Graphics × 16
Graphics: AMD Radeon™ Graphics / AMD Radeon™ Graphics

So I posted the same bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2015255

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.