Bug 474934

Summary: XWayland windows have wrong scale after kwin_wayland crash
Product: [Plasma] kwin Reporter: Nicolas Fella <nicolas.fella>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: kde, miranda, nate
Priority: NOR Keywords: wayland-only
Version First Reported In: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=480642
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Nicolas Fella 2023-09-27 12:09:31 UTC
STEPS TO REPRODUCE
1. Use "Apply scaling themselves" method for XWayland scaling
2. Have a screen with e.g. 250% scaling
2. Open some XWayland windows, e.g. Thunderbird or "dolphin -platform xcb". These are scaled fine
3. kwin_wayland --replace

OBSERVED RESULT
Thunderbird and Dolphin don't survive. After reopening them they don't have any scaling and everyting is tiny. Native Wayland windows are fine

EXPECTED RESULT
XWayland windows have their original scale

SOFTWARE/OS VERSIONS
KDE Plasma Version: master, kwin commit 99244efa3b64029df021ecf1c97cff6b5a8d5265
KDE Frameworks Version: master
Qt Version: 6.6
Comment 1 Nate Graham 2023-09-28 21:38:47 UTC
bad bot
Comment 2 Vlad Zahorodnii 2023-10-05 11:47:25 UTC
Removing qt6: it's been present in qt5 too

---

When xwayland crashes (because kwin has crashed), plasma needs to rerun all the X11 setup stuff. The difficult part is that it's scattered all over the place, some is here, some is there, some is in kded. That needs to be somehow refactored so when kwin starts xwayland it can run those setup scripts then permit xwayland to start accepting requests from x11 clients. 

---

I'm also not sure about "major". I mean it's definitely bad, but maybe not that bad. Crashes occur but not that frequently, and you will be still able to use the computer, but it will a bumpy ride.
Comment 3 Nate Graham 2024-02-02 17:43:38 UTC
Agreed, Normal is fine here.