Bug 494157 - Switching to HDR with Kscreen-doctor does not work (regression)
Summary: Switching to HDR with Kscreen-doctor does not work (regression)
Status: RESOLVED NOT A BUG
Alias: None
Product: KScreen
Classification: Plasma
Component: kscreen-doctor (show other bugs)
Version: 6.1.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-05 07:59 UTC by bugreports61
Modified: 2024-11-13 19:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugreports61 2024-10-05 07:59:12 UTC
SUMMARY

I was using kscreen-doctor to enable and disable HDR of my monitor via a script.
If it is disabled i send:

kscreen-doctor output.1.hdr.enable

Following output is shown:

screen.doctor: setop exec returned KScreen::Config( 
KScreen::Output(1, "DP-1", connected enabled priority 1, pos: QPoint(0,0), res: QSize(3440, 1440), modeId: "1", scale: 1, clone: no, rotation: KScreen::Output::None, followPreferredMode: false) )

if it is already enabled i send:

kscreen-doctor output.1.hdr.disable

Following output is shown:

screen.doctor: setop exec returned KScreen::Config( 
KScreen::Output(1, "DP-1", connected enabled priority 1, pos: QPoint(0,0), res: QSize(3440, 1440), modeId: "1", scale: 1, clone: no, rotation: KScreen::Output::None, followPreferredMode: false) )

Monitor: Alienware 3423AWDF
I am using a plasma wayland session.

STEPS TO REPRODUCE
1.  Use kscreen doctor to enable hdr
2.  See the screen flicker shortly and change to HDR mode
3.  Check if hdr is enabled after that in systemsettings (it should not) and if it does work (it should not).
4.  Enable, disable, enable HDR again even leads to a completely washed out screen.

OBSERVED RESULT

The monitor does flicker shortly and gets set to HDR mode but it is not working correctly.
The HDR setting for the display in system settings does not change.

EXPECTED RESULT

The monitor goes black  (a modeset ?)and comes back switching to HDR ( like it happens when you change the HDR setting in the system settings) and HDR works as expected.
The HDR settings shows enabled in system settings.

Switching HDR on/off via systemsettings instead of kscreen-doctor  works absolutely flawless.
Sadly doing it via a keyboard shortcut that way is not possible.

In the past kscreen-doctor was causing the same behaviour as using the system-settings page for the display and worked fine.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Kernel Version: 6.11.1-273-tkg-eevdf (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6900 XT

ADDITIONAL INFORMATION
Comment 1 bugreports61 2024-10-05 08:13:18 UTC
Hi,

maybe also interesting, the HDR part in dmesg is showing a different amounf of lines  when using kscreen-doctor and system settgings:

kscreen-doctor
[Sa,  5. Okt 2024, 09:42:54] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 09:42:54] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00
[Sa,  5. Okt 2024, 09:42:54] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 09:42:54] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00

kscreen-doctor
[Sa,  5. Okt 2024, 09:54:34] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 09:54:34] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00
[Sa,  5. Okt 2024, 09:54:34] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 09:54:34] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00

systemsettings
[Sa,  5. Okt 2024, 10:08:28] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 10:08:28] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00
[Sa,  5. Okt 2024, 10:08:28] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 10:08:28] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00
[Sa,  5. Okt 2024, 10:08:28] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 10:08:28] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00

systemsettings
[Sa,  5. Okt 2024, 10:10:29] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 10:10:29] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00
[Sa,  5. Okt 2024, 10:10:29] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 10:10:29] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00
[Sa,  5. Okt 2024, 10:10:29] HDR SB:01 1a 02 00 18 8a 81 37 e0 2f cf 8b 9c 1c 4d 0a
[Sa,  5. Okt 2024, 10:10:29] HDR SB:09 3d 16 40 15 01 06 00 15 01 15 01 00 00 00 00

Br
Comment 2 Amine Hassane 2024-10-06 07:53:19 UTC
You need to enable 'wcg' as well e.g kscreen-doctor output.1.wcg.enable. But this was always the case, strange that only changing 'hdr' used to work for you.
Comment 3 bugreports61 2024-10-07 10:45:39 UTC
(In reply to Amine Hassane from comment #2)
> You need to enable 'wcg' as well e.g kscreen-doctor output.1.wcg.enable. But
> this was always the case, strange that only changing 'hdr' used to work for
> you.

Ah nice, that worked, now a modeset seems to happen and all looks fine !
Many thx for the hint !