← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2110585] Re: Stop using 'actual_brightness' in systemd

 

Sure, here's a rough test plan for the SRU.

0. Use a laptop with an eDP panel.
1. Look at value of brightness for device in /sys/class/backlight. Note it down.
2. Shutdown system. Turn on system.
3. Look at value again, ensure it's the same.

This should be done on the following configurations:
1. Intel laptop from recent generation 
2. AMD laptop that supports custom brightness curve (look in kernel log)
3. AMD laptop that either doesn't support custom brightness curve or it has been turned off with the debug mask.

I can handle doing AMD testing with a mainline kernel build from the
Canonical PPA before the kernel is ready to backport from questing.

Note: I worked on the changes upstream both in amdgpu and in systemd.
I'm very familiar with all of this.

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2110585

Title:
  Stop using 'actual_brightness' in systemd

Status in systemd package in Ubuntu:
  Triaged
Status in systemd source package in Noble:
  New
Status in systemd source package in Questing:
  Triaged

Bug description:
  At shutdown time systemd will record the most recently used brightness
  value and then attempt to restore it the next boot.

  In order to do this; it currently will read the 'actual_brightness'
  value and use that to save.

  This normally works fine; but GPU drivers don't always show the same
  value in 'brightness' and 'actual_brightness' meaning that the wrong
  value may be restored the next boot.

  This problem is very prominently found on AMD APUs starting with
  kernel 6.15 due to a new feature called "custom brightness curves".
  Custom brightness curves are brightness values programmed by an OEM in
  the firmware to make the panel behave optimally.  The
  'actual_brightness' of some 'brightness' values will be lower.

  For example if the brightness a user requested was 150, the
  actual_brightness might be 130. So the next boot the brightness will
  be "set" to 130, but the actual brightness might be 115. If the user
  reboots again it will be set to 115 for the next boot but the actual
  brightness might be 100. That is this gets worse and worse each reboot
  cycle until the system eventually boots up at minimum brightness.

  This has been fixed in upstream systemd in this commit:
  https://github.com/systemd/systemd/commit/9a224c307b36610e3675390eb2620e74d0f4efb0

  This should be backported to any Ubuntu release that adopts kernel
  6.15 or later.  That means that this should be fixed in Questing,
  followed by backported to Noble because Noble will get OEM and HWE
  kernels that are newer.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2110585/+subscriptions



References