You are not logged in.

#1 2023-09-18 16:34:23

DeusDeceptor
Member
Registered: 2023-09-14
Posts: 4

AMDGPU Backlight issues

Hi everyone,

some kind of kernel driver regression appears to have happened somewhen between 6.2 and now/6.5 regarding AMDGPU's backlight implementation.

With some cards, it was necessary to boot with acpi_backlight=native in order to have the GPU class profile available to even enable backlight manually (else the screen would stay black).

This has worked fine for a while with a systemd unit boot script, but now, any backlight brightness changes are no longer accepted by the system, meaning while using the native ACPI mode, there are just two states: off (0% brightness) and on (1-100% brightness), even when echoing the values directly to the /sys/class/ file.

The Arch Wiki has a section on a similar issue: https://wiki.archlinux.org/title/Backli … gpu_driver However, this problem is older and from my understanding, the values are actually correct, but the driver just doesn't accept the changes.

I'm not sure how to analyze this further, but could there possibly be any workaround?

From what I can tell:
acpi_backlight=none has backlight only with amdgpu.dc=1, but DisplayCore does not respect xrandr settings and introduces scaling issues.
acpi_backlight=native creates /sys/class/backlight/amdgpu_bl1/brightness to initialize the screen backlight, but doesn't accept brightness changes anymore.
acpi_backlight=vendor creates no amdgpu_bl* file, so no way to enable backlight to begin with?
acpi_backlight=video same as vendor.

Are there any other ACPI configurations I don't know of or could it be possible to set the backlight on vendor/video as well at another place?

Currently, I'm actually using an xrandr launcher to set the brightness to lower values, but xrandr can't change the display backlight, so the contrast gets worse. It's probably also much less effective regarding power management.

Last edited by DeusDeceptor (2023-09-18 16:36:55)

Offline

#2 2023-09-19 01:53:18

Skidout
Member
Registered: 2023-05-26
Posts: 37

Re: AMDGPU Backlight issues

Try installing linux-lts and using that to see if it works.

Offline

#3 2023-09-19 19:57:54

DeusDeceptor
Member
Registered: 2023-09-14
Posts: 4

Re: AMDGPU Backlight issues

Unfortunately, I can't even get backlight to work on the LTS kernel for some weird reason. The driver seems to be active, but there's no brightness class file. That's weird, because I was able to boot this setup with the generic kernel somewhere around 6.2, so it should work. I'll have to see what's wrong, it should still boot the kernel parameters and systemd unit files?

Update/Update: Okay, sooo... The GPU class changed from amdgpu_bl0 to amdgpu_bl1 at some point between LTS and the most recent kernel version, so the number in the unit file had to be changed to 0 as well to get output on the LTS kernel and yes, backlight control actually does work there.

Here's the thing, somewhere between LTS and now:

/sys/class/brightness/amdgpu_bl0 has changed to amdgpu_bl1.
/sys/class/brightness/gmux_backlight went away completely.

As far as I can tell, values in /sys/class/brightness/amdgpu_bl1 can still be changed, but accept only booleans to entirely enable/disable backlight.
/sys/class/brightness/gmux_backlight in LTS controls backlight intensity and can freely be written to, but since the class is gone now, there's only control for on/off left.

I don't know how to bring gmux_backlight back or why it has been (re)moved in the first place. I also don't know what happens when the brightness media keys are pressed, maybe there would be some way to reroute that, but that's way above my league atm.

I could use LTS for now, but I guess at some point the LTS kernel will be updated as well anyway?

Any other way to work around this? Or maybe somewhere to post a bug report so that it may be considered at some point?

Last edited by DeusDeceptor (2023-09-21 21:13:39)

Offline

#4 2023-10-10 15:40:18

blurpex
Member
Registered: 2023-10-10
Posts: 1

Re: AMDGPU Backlight issues

DeusDeceptor wrote:

Unfortunately, I can't even get backlight to work on the LTS kernel for some weird reason. The driver seems to be active, but there's no brightness class file. That's weird, because I was able to boot this setup with the generic kernel somewhere around 6.2, so it should work. I'll have to see what's wrong, it should still boot the kernel parameters and systemd unit files?

Update/Update: Okay, sooo... The GPU class changed from amdgpu_bl0 to amdgpu_bl1 at some point between LTS and the most recent kernel version, so the number in the unit file had to be changed to 0 as well to get output on the LTS kernel and yes, backlight control actually does work there.

Here's the thing, somewhere between LTS and now:

/sys/class/brightness/amdgpu_bl0 has changed to amdgpu_bl1.
/sys/class/brightness/gmux_backlight went away completely.

As far as I can tell, values in /sys/class/brightness/amdgpu_bl1 can still be changed, but accept only booleans to entirely enable/disable backlight.
/sys/class/brightness/gmux_backlight in LTS controls backlight intensity and can freely be written to, but since the class is gone now, there's only control for on/off left.

I don't know how to bring gmux_backlight back or why it has been (re)moved in the first place. I also don't know what happens when the brightness media keys are pressed, maybe there would be some way to reroute that, but that's way above my league atm.

I could use LTS for now, but I guess at some point the LTS kernel will be updated as well anyway?

Any other way to work around this? Or maybe somewhere to post a bug report so that it may be considered at some point?

Hello,

I have the exact same problem, my backlight does not work at all even though the values are changing in GPU class files.

After switching to the LTS kernel, the class files changed to amdgpu_bl0 from amdgpu_bl1, but my backlight still does not change, what exactly did you do after installing LTS kernel to make it work?

Offline

#5 2023-10-14 14:43:39

jbmt
Member
Registered: 2023-09-16
Posts: 5

Re: AMDGPU Backlight issues

DeusDeceptor wrote:

acpi_backlight=native creates /sys/class/backlight/amdgpu_bl1/brightness to initialize the screen backlight, but doesn't accept brightness changes anymore.

This is exactly the problem I've encounter with. After some searching, I guess I have to install lts kernel and pray future kernel solve this for now.

Offline

Board footer

Powered by FluxBB