https://bugs.kde.org/show_bug.cgi?id=527867

            Bug ID: 527867
           Summary: kscreenctl set-max-average-brightness-override unable
                    to set valid nits values
    Classification: Plasma
           Product: KScreen
      Version First 6.8.1
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: common
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

DESCRIPTION
"kscreenctl set-max-average-brightness-override" won't accept valid nits values

STEPS TO REPRODUCE

Run a command with my specific display name:
$ kscreenctl eDP-1 set-max-average-brightness-override 500

OBSERVED RESULT

Error message: "Failed to apply output configuration: Invalid max average
brightness override requested"

EXPECTED RESULT

Non-error result. 

The command:
$ kscreenctl eDP-1

confirms the value was not set. 

If instead I do it the old way with kscreen-doctor: 
$ kscreen-doctor output.eDP-1.maxAverageBrightnessOverride.500

then the command works and kscreenctl confirms the value has been set. 

The command:
$ kscreenctl eDP-1 set-max-average-brightness-override none

Works and is confirmed by "kscreenctl eDP-1". 

Values <0 and >10000 are correctly caught as out of range with a separate
error:
$ kscreenctl eDP-1 set-max-average-brightness-override 10001
Allowed range for priority is 0 to 10000

If this is the most current code base: 
https://invent.kde.org/plasma/kscreen/-/blob/master/kscreenctl/command/output/set-max-average-brightness-override.cpp
 
It seems that the input value is /10000.0 before being passed along to
libkscreen, and the error is coming from there? 


SOFTWARE/OS VERSIONS
$ kinfo
Operating System: Arch Linux
KDE Plasma Version: 6.8.1
KDE Frameworks Version: 6.31.0
Qt Version: 6.12.0
Kernel Version: 7.2.11-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ Ultra 7 258V
Memory: 32 GiB of RAM (30.8 GiB usable)
Graphics Processor: Intel® Graphics

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to