Bug 481518

Summary: Can't disable HDR if graphic driver don't support anymore
Product: [Plasma] kwin Reporter: Piotr <kde.1mwd4>
Component: platform-drmAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, xaver.hugl
Priority: NOR Keywords: qt6
Version First Reported In: master   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Piotr 2024-02-18 17:27:52 UTC
Summary:
Disabling HDR isn't possible if the graphics driver no longer supports it.

Steps to Reproduce:

1. Enable HDR on a supported display with a graphics driver that supports HDR (e.g., Nvidia open driver).
2. Switch to a driver that doesn't support HDR (e.g., nouveau) and connect it to the display from step 1.

Observed Result:
The image appears dark, HDR-related options are available but ineffective. There's no option to enable/disable HDR.

Expected Result:
HDR should be disabled for that display. Options related to HDR should not be available.

Software/OS Versions:

    Linux, NixOS. https://github.com/NixOS/nixpkgs/pull/286522

I hope this issue isn't somehow tied to the distribution.
Comment 1 Bug Janitor Service 2024-02-21 22:36:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5267
Comment 2 Zamundaaa 2024-02-22 13:07:53 UTC
Git commit d33ab542db89818cbefa47fea59bff11584b4508 by Xaver Hugl.
Committed on 22/02/2024 at 13:01.
Pushed by zamundaaa into branch 'master'.

backends/drm: only enable HDR if both display and driver are capable of it

The config may have HDR or WCG enabled, and the driver or display settings changed
since then to make it impossible to actually enable either.
The config values stay unchanged when this happens, so reconnecting the display with
HDR support will automatically turn it on again.

M  +3    -1    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/d33ab542db89818cbefa47fea59bff11584b4508
Comment 3 Zamundaaa 2024-02-22 13:17:24 UTC
Git commit 80e30821af7b1675f76dbcccf74eac4b61ff58d0 by Xaver Hugl.
Committed on 22/02/2024 at 13:08.
Pushed by zamundaaa into branch 'Plasma/6.0'.

backends/drm: only enable HDR if both display and driver are capable of it

The config may have HDR or WCG enabled, and the driver or display settings changed
since then to make it impossible to actually enable either.
The config values stay unchanged when this happens, so reconnecting the display with
HDR support will automatically turn it on again.


(cherry picked from commit d33ab542db89818cbefa47fea59bff11584b4508)

M  +3    -1    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/80e30821af7b1675f76dbcccf74eac4b61ff58d0