https://bugs.kde.org/show_bug.cgi?id=525043
Bug ID: 525043
Summary: HDR: leftover maxAverageBrightnessOverride from the
removed full-frame calibration page is still applied
and can no longer be corrected
Classification: Applications
Product: systemsettings
Version First unspecified
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: kcm_kscreen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
SUMMARY
=======
On a display whose EDID carries no HDR luminance data, an old
`maxAverageBrightnessOverride` in ~/.config/kwinoutputconfig.json is still read
and
applied by KWin, but is no longer reachable by any user-facing component. It
caps
tone mapping permanently and there is no supported way to correct or clear it.
On this system the stored value is 130 nits while `maxPeakBrightnessOverride`
is
330 nits - so max average sits far below peak, and even below the SDR reference
luminance of 200 nits. HDR output is therefore tone-mapped down against a limit
the display does not actually have.
BACKGROUND
==========
Bug 506626 added and then deliberately removed a full-frame average luminance
calibration page ("on most common HDR displays, it doesn't work as expected,
and
just results in the peak luminance"); the replacement recommends values from
the
max average luminance reported in the EDID. Bug 516338 shows that the page
produced wrong values while it existed.
Neither bug covers what happens to values that page already wrote. As of 6.7.4:
* hdrcalibrator writes only `Reference` and `MaxLuminance` to kwinrc
[Windows_HDR]. It references KScreen::Output::maxAverageBrightness()
(getter
only) and never sets the override.
* kcm_kscreen calls KScreen::Output::setMaxPeakBrightnessOverride() but never
setMaxAverageBrightnessOverride(), even though libKScreen exports the
latter.
* There is no corresponding request in the kde-output-device/-configuration
protocols.
* kwin still reads and applies `maxAverageBrightnessOverride`.
The value is effectively write-once-forever.
The EDID-based replacement path has no data to work with on this display
either.
Its HDR Static Metadata Data Block advertises PQ but declares no luminance:
HDR Static Metadata Data Block:
Electro optical transfer functions:
Traditional gamma - SDR luminance range
SMPTE ST2084
Supported static metadata descriptors:
Static metadata type 1
Maximum luminance: 0 (50.000 cd/m^2)
Minimum luminance: 0
so kwin reports both peak and max average as "unknown" and depends entirely on
the overrides.
STEPS TO REPRODUCE
==================
1. Use a display whose EDID contains no HDR luminance values.
2. Have a `maxAverageBrightnessOverride` in kwinoutputconfig.json left over
from
an earlier Plasma version (or add one by hand while the session is stopped).
3. System Settings -> Display & Monitor -> run the HDR calibration and complete
both steps.
4. Run `kscreen-doctor -o`.
OBSERVED RESULT
===============
`maxPeakBrightnessOverride` and the reference luminance are updated by the
wizard, `maxAverageBrightnessOverride` keeps its old value:
HDR: enabled
SDR brightness: 200 nits
Peak brightness: unknown, overridden with: 330 nits
Max average brightness: unknown, overridden with: 130 nits
Editing kwinoutputconfig.json during a running session does not help - kwin
rewrites the file from its in-memory state, so the edit is lost at logout.
EXPECTED RESULT
===============
Any one of:
* the calibration wizard clears or updates `maxAverageBrightnessOverride`
when
it writes a new peak value,
* kcm_kscreen offers a "reset HDR calibration" action per output,
* kwin ignores or clamps an override that is lower than
`maxPeakBrightnessOverride`.
WORKAROUND
==========
Patch kwinoutputconfig.json before kwin_wayland starts, e.g. an ExecStartPre
drop-in on plasma-kwin_wayland.service. Any change made during the session is
overwritten.
SOFTWARE/OS VERSIONS
====================
Plasma: 6.7.4
KWin: 6.7.4
kscreen: 6.7.4
Qt: 6.11.1
Session: Wayland
OS: Bazzite (Fedora Kinoite 44), kernel 7.2.0-ogc6.1.fc44.x86_64
GPU: AMD Radeon RX 9070 (Navi 48, 1002:7550), amdgpu
Display: Samsung LC27G5xT, 2560x1440@144, HDMI
--
You are receiving this mail because:
You are watching all bug changes.