AMD (amdgpu_bl0) backlight not restored

In Fedora 32 Silverblue on IdeaPad 5 15ARE05 the backlight does not seem to be correctly handled/restored.

Problems:

  • it is very bright (though I’m not sure whether this is intended)
  • it often/always(?) does not restore the backlight at boot (it juses uses the highest brightness instead)
  • I can basically adjust it and see a difference, but the +/- slider is not “smooth” and it only seem to have 19 steps or so.

CPU: AMD Ryzen 7 4800U
GPU: AMD Renoir

$ systemctl status systemd-backlight@backlight
● systemd-backlight@backlight.service - Load/Save Screen Backlight Brightness of backlight
    Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static; vendor preset: disabled)
    Active: inactive (dead)
    Docs: man:systemd-backlight@.service(8)

Also here some interesting logs:

Jun 04 23:58:40 systemd-backlight[1118]: amdgpu_bl0: Saved brightness 2 too low; increasing to 12.
Jun 04 23:58:40 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-backlight@backlight:amdgpu_bl0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[…]
Jun 04 13:37:53 systemd[1]: Created slice system-systemd\x2dbacklight.slice.
Jun 04 13:37:54 systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0...
Jun 04 13:37:54 systemd[1127]: systemd-backlight@backlight:amdgpu_bl0.service: Failed to set up special execution directory in /var/lib: Read-only file system
Jun 04 13:37:54 systemd[1127]: systemd-backlight@backlight:amdgpu_bl0.service: Failed at step STATE_DIRECTORY spawning /usr/lib/systemd/systemd-backlight: Read-only file system
Jun 04 13:37:54 systemd[1]: systemd-backlight@backlight:amdgpu_bl0.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
Jun 04 13:37:54 systemd[1]: systemd-backlight@backlight:amdgpu_bl0.service: Failed with result 'exit-code'.
Jun 04 13:37:54 systemd[1]: Failed to start Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0.
Jun 04 13:37:54 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-backlight@backlight:amdgpu_bl0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

What’s also very strange:
I can cat /var/lib/systemd/backlight/pci-0000\:03\:00.0\:backlight\:amdgpu_bl0 and always get 12.
No matter, what brightness level the screen currently has.

$ ls /sys/class/backlight/amdgpu_bl0/*
/sys/class/backlight/amdgpu_bl0/actual_brightness
/sys/class/backlight/amdgpu_bl0/bl_power
/sys/class/backlight/amdgpu_bl0/brightness
/sys/class/backlight/amdgpu_bl0/max_brightness
/sys/class/backlight/amdgpu_bl0/scale
/sys/class/backlight/amdgpu_bl0/type
/sys/class/backlight/amdgpu_bl0/uevent

/sys/class/backlight/amdgpu_bl0/device:
ari_enabled               modalias
backlight                 msi_bus
boot_vga                  msi_irqs
broken_parity_status      numa_node
class                     pcie_replay_count
config                    power
consistent_dma_mask_bits  power_dpm_force_performance_level
current_link_speed        power_dpm_state
current_link_width        pp_cur_state
d3cold_allowed            pp_dpm_dcefclk
device                    pp_dpm_fclk
dma_mask_bits             pp_dpm_mclk
driver                    pp_dpm_pcie
driver_override           pp_dpm_sclk
drm                       pp_dpm_socclk
enable                    pp_force_state
firmware_node             pp_mclk_od
fw_version                pp_num_states
gpu_busy_percent          pp_power_profile_mode
graphics                  pp_sclk_od
hwmon                     pp_table
i2c-2                     remove
i2c-4                     rescan
i2c-5                     reset
iommu                     resource
iommu_group               resource0
irq                       resource0_wc
link                      resource2
local_cpulist             resource2_wc
local_cpus                resource4
max_link_speed            resource5
max_link_width            revision
mem_info_gtt_total        subsystem
mem_info_gtt_used         subsystem_device
mem_info_vis_vram_total   subsystem_vendor
mem_info_vis_vram_used    uevent
mem_info_vram_total       vbios_version
mem_info_vram_used        vendor
mem_info_vram_vendor

/sys/class/backlight/amdgpu_bl0/power:
autosuspend_delay_ms  runtime_active_time  runtime_suspended_time
control               runtime_status

/sys/class/backlight/amdgpu_bl0/subsystem:
amdgpu_bl0
$ grep ^ /dev/null *
actual_brightness:22102
bl_power:0
brightness:86
grep: device: Ist ein Verzeichnis
max_brightness:255
grep: power: Ist ein Verzeichnis
scale:unknown
grep: subsystem: Ist ein Verzeichnis
type:raw
$ cd /sys/class/backlight/amdgpu_bl0/power
$ grep ^ /dev/null *
grep: autosuspend_delay_ms: Eingabe-/Ausgabefehler
control:auto
runtime_active_time:0
runtime_status:unsupported
runtime_suspended_time:0

Interestingly the things in /sys/class/backlight/amdgpu_bl0 seem to “work”.

This is the data reported at lowest brightness:

$ grep ^ /dev/null *
actual_brightness:514
bl_power:0
brightness:2
grep: device: Ist ein Verzeichnis
max_brightness:255
grep: power: Ist ein Verzeichnis
scale:unknown
grep: subsystem: Ist ein Verzeichnis
type:raw

And this at highest brightness:

$ grep ^ /dev/null *
actual_brightness:65535
bl_power:0
brightness:255
grep: device: Ist ein Verzeichnis
max_brightness:255
grep: power: Ist ein Verzeichnis
scale:unknown
grep: subsystem: Ist ein Verzeichnis
type:raw

system information/logs


Where can I report this?
Or is there a workaround?
I’ve seen similar issues

Is this a systemd error? Or does systemd-backlight only save/store the current value?


overview: other issues of this device

Looks like your issue has the same cause as this bug in the amdgpu driver, which is currently in discussion.
https://bugzilla.kernel.org/show_bug.cgi?id=203905

1 Like

I’ve BTW reported a possibly related issue where the screen goes just black when you press the “decrease screen backlight” key on your keyboard:

https://bugzilla.redhat.com/show_bug.cgi?id=1971779