The analysis below is for 47~rc1, 47.1 fixes the issue by not doing the broken 
code path on Linux systems.


I believe this is related to the mutter displayconfig:

We receive this property change:

signal time=1727173020.361584 sender=:1.34 -> destination=(null destination) 
serial=11943 path=/org/gnome/Mutter/DisplayConfig; 
interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "org.gnome.Mutter.DisplayConfig"
   array [
      dict entry(
         string "Backlight"
         variant             struct {
               uint32 7
               array [
                  array [
                     dict entry(
                        string "connector"
                        variant                            string "eDP-1"
                     )
                     dict entry(
                        string "active"
                        variant                            boolean true
                     )
                  ]
               ]
            }
      )
   ]
   array [
   ]


This is missing value/min/max, hence the update_mutter_backlight() code does 
not enter:

                if (g_variant_lookup (monitor, "value", "i", 
&backlight->brightness_val)) {
                        g_variant_lookup (monitor, "min", "i", 
&backlight->brightness_min);
                        g_variant_lookup (monitor, "max", "i", 
&backlight->brightness_max);
                        have_backlight = TRUE;
                }


So we set those values to -1:

        if (!have_backlight) {
                backlight->brightness_val = -1;
                backlight->brightness_min = -1;
                backlight->brightness_max = -1;
        }



** Changed in: gnome-settings-daemon (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-settings-daemon in Ubuntu.
https://bugs.launchpad.net/bugs/2081294

Title:
  gsd_power_backlight_abs_to_percentage: assertion 'max > min' failed

Status in GNOME Settings Daemon:
  New
Status in gnome-settings-daemon package in Ubuntu:
  Fix Released

Bug description:
  The key shortcuts as well as slider controls in GNOME for setting the
  brightness of the screen on a amdgpu_bl1 laptop stops working after a
  sleep/resume cycle. The GNOME logs are the following after pressing
  the brightness increase and decrease Fn keys on the keyboard:

  12:46:37 (sd-bright): amdgpu_bl1: Failed to write brightness to device: 
Invalid argument
  12:46:37 gsd-power: gsd_power_backlight_abs_to_percentage: assertion 'max > 
min' failed
  12:46:36 (sd-bright): amdgpu_bl1: Failed to write brightness to device: 
Invalid argument
  12:46:36 gsd-power: gsd_power_backlight_abs_to_percentage: assertion 'max > 
min' failed
  12:46:36 (sd-bright): amdgpu_bl1: Failed to write brightness to device: 
Invalid argument
  12:46:36 gsd-power: gsd_power_backlight_abs_to_percentage: assertion 'max > 
min' failed
  12:46:35 (sd-bright): amdgpu_bl1: Failed to write brightness to device: 
Invalid argument
  12:46:35 gsd-power: gsd_power_backlight_abs_to_percentage: assertion 'max > 
min' failed
  12:46:34 (sd-bright): amdgpu_bl1: Failed to write brightness to device: 
Invalid argument
  12:46:34 gsd-power: gsd_power_backlight_abs_to_percentage: assertion 'max > 
min' failed

  Setting the backlight manually using the sysfs interface or the gsd-
  backlight-helper program still works:

  $ sudo strace /usr/libexec/gsd-backlight-helper 
/sys/class/backlight/amdgpu_bl1 15
  ...
  openat(AT_FDCWD, "/sys/class/backlight/amdgpu_bl1/brightness", O_WRONLY) = 4
  write(4, "15", 2)                       = 2
  close(4)                                = 0

  This is why I am filing this bug against gnome-settings-daemon and not
  the kernel.

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-settings-daemon/+bug/2081294/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to