dvratil added a comment.
I wonder how it happens that we try to enable an output without having the mode set. The KDED module should always pick the best resolution (or falling back to preferred mode) when it's enabling an output. While this fix makes sense in as a crash-guard, I'd also look into why KDED is failing to set the mode in the first place. INLINE COMMENTS > xrandrconfig.cpp:519 > + if (!kscreenOutput->currentMode()) { > + modeId = kscreenOutput->preferredModeId().toInt(); > + } I wonder if it might be safer to query the preferred mode from corresponding `XRandROutput` rather than trusting user-provided `KScreen::Output` here? > xrandrconfig.cpp:561 > + if (!kscreenOutput->currentMode()) { > + modeId = kscreenOutput->preferredModeId().toInt(); > + } In `changeOutput()` we only change position, mode or rotation of an already-enabled output. I would argue that if the mode is missing in the `kscreenOutput` here (for any reason) it would make more sense to interpret it as "no change" and use `xOutput->currentMode()->id()` and only if `xOutput->currentMode()` is null then fall back to preferred mode (although that already hints that something weird is going on). REPOSITORY rLIBKSCREEN KScreen Library REVISION DETAIL https://phabricator.kde.org/D2330 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: sebas, dvratil Cc: graesslin, plasma-devel, #plasma, ali-mohamed, jensreuterberg, abetts, sebas
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel