Bug 488229 - Kwin Configuration (kwinoutputconfig) Overridden on login
Summary: Kwin Configuration (kwinoutputconfig) Overridden on login
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.5
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-08 23:03 UTC by postcert
Modified: 2024-06-12 16:08 UTC (History)
2 users (show)

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


Attachments
current kwinoutputconfig.json (3.01 KB, application/json)
2024-06-08 23:03 UTC, postcert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postcert 2024-06-08 23:03:39 UTC
Created attachment 170280 [details]
current kwinoutputconfig.json

SUMMARY
Configuration within ~/.config/kwinoutputconfig.json is overridden on login.
I needed to disable HDR on an output as it leads to resume and login failures on my system with an Nvidia gpu.
Enabling it while in a KDE session works correctly, it just leads to a lockup on resume or subsequent logins. 

STEPS TO REPRODUCE
1. Enable HDR through Display Settings
2. Change "highDynamicRange" to false for the previously set monitor in ~/.config/kwinoutputconfig.json manually

OBSERVED RESULT
"highDynamicRange" is overridden to true for the given output.

EXPECTED RESULT
"highDynamicRange" is set to false.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Nixos
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
I was able to workaround the issue and start into Wayland by modifying the file and making it immutable with "chattr +i"
Got the idea to make the file immutable as a solution from: https://forum.endeavouros.com/t/black-screen-after-enabling-hdr-on-wayland/52025

I don't believe there is any issue with my configuration file as I've deleted/recreated it multiple times in an attempt to correct this issue but I've attached it anyway.
Comment 1 postcert 2024-06-08 23:13:21 UTC
The data source for this configuration could very much be somewhere else I haven't identified but in the case output configuration needs to be manually modified/reset I am unable to change it as simply/easily as I would for Plasma5/X11 through ".local/share/kscreen" and or ".local/kwinrc"
Comment 2 Zamundaaa 2024-06-11 14:40:35 UTC
The config is not overwritten on login, but it is saved from KWin's internal data structures on logout. Did you maybe modify it while the session was running?
Comment 3 postcert 2024-06-12 01:44:42 UTC
(In reply to Zamundaaa from comment #2)
> The config is not overwritten on login, but it is saved from KWin's internal
> data structures on logout. Did you maybe modify it while the session was
> running?

Yes, in these cases I had loaded up KDE under X11 in an attempt to correct the Wayland configuration.
Thanks for the info, I guess it's not necessarily a bug and more of a situation where the Wayland specific configuration is not exposed under X11, so items like HDR/VRR/etc can't be toggled off.
Comment 4 Zamundaaa 2024-06-12 15:35:30 UTC
oh, it doesn't need to be loaded on X11. That can be fixed easily
Comment 5 Bug Janitor Service 2024-06-12 15:36:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5885
Comment 6 Zamundaaa 2024-06-12 16:04:54 UTC
Git commit 6543ab3caaf1593bee23c1e211bc8419bba00d93 by Xaver Hugl.
Committed on 12/06/2024 at 15:46.
Pushed by zamundaaa into branch 'master'.

workspace: only load output configs on Wayland

They don't need to be loaded, or on exit saved again on X11

M  +2    -1    src/workspace.cpp

https://invent.kde.org/plasma/kwin/-/commit/6543ab3caaf1593bee23c1e211bc8419bba00d93
Comment 7 postcert 2024-06-12 16:08:28 UTC
Awesome, that gives at least an escape hatch through X11 until all the Wayland edge cases are addressed.
Thanks for the quick response!