Bug 504854

Summary: kscreen-doctor --json does not contain brightness
Product: [Plasma] KScreen Reporter: doze_planner877
Component: kscreen-doctorAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: kde, nate, xaver.hugl
Priority: NOR    
Version First Reported In: 6.3.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Output of kscreen-doctor --json

Description doze_planner877 2025-05-27 11:15:29 UTC
Created attachment 181774 [details]
Output of kscreen-doctor --json

SUMMARY
kscreen-doctor --json does not contain brightness

STEPS TO REPRODUCE
1. run kscreen-doctor --json

OBSERVED RESULT
The brightness value is missing in the json output.

EXPECTED RESULT
The brightness value of each output should be present in the json. The value can be seen in output of kscreen-doctor -o in the "Brightness control" category.
I attached the output of kscreen-doctor --json.

SOFTWARE/OS VERSIONS
kscreen 6.3.5-1.1
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.8-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 XT
Comment 1 David Edmundson 2025-05-28 09:11:45 UTC
This is expected, brightness is not saved to the config. It's not persistent data.

What's the reason you're trying to access it. There are other paths.
Comment 2 doze_planner877 2025-05-28 13:28:11 UTC
I see. I am accessing it within a script to set and later restore brightness.
I will continue reading it with kscreen-doctor -o | grep 'Brightness control' | awk '{print $7}'
This is however cumbersome.
Thanks for the quick explication.
Comment 3 Zamundaaa 2025-05-28 16:04:16 UTC
Brightness is saved and persistent, only the dimming factor isn't. It isn't in the json output because the implementation of kscreen-doctor --json calls ConfigSerializer::serializeConfig, which hasn't been updated to include all the new settings - as it's otherwise only used for the out-of-process backend on Xorg.
Comment 4 Bug Janitor Service 2025-05-28 16:09:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libkscreen/-/merge_requests/254
Comment 5 Zamundaaa 2025-06-07 14:02:30 UTC
Git commit 22ad4bf3f97c9867d82ee0efc8c267b31793ca51 by Xaver Hugl.
Committed on 07/06/2025 at 14:00.
Pushed by zamundaaa into branch 'master'.

configserializer: add missing settings to output serialization

M  +18   -5    src/configserializer.cpp

https://invent.kde.org/plasma/libkscreen/-/commit/22ad4bf3f97c9867d82ee0efc8c267b31793ca51
Comment 6 Zamundaaa 2025-06-07 14:06:59 UTC
Git commit 3cecfce2abad920626ed8805f3f20bc547390373 by Xaver Hugl, on behalf of Xaver Hugl.
Committed on 07/06/2025 at 14:04.
Pushed by zamundaaa into branch 'Plasma/6.4'.

configserializer: add missing settings to output serialization


(cherry picked from commit 22ad4bf3f97c9867d82ee0efc8c267b31793ca51)

Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>

M  +18   -5    src/configserializer.cpp

https://invent.kde.org/plasma/libkscreen/-/commit/3cecfce2abad920626ed8805f3f20bc547390373