https://bugs.kde.org/show_bug.cgi?id=480991

            Bug ID: 480991
           Summary: Windows resize oddly when 200% scaled monitor
                    hot-replugs itself
    Classification: Plasma
           Product: kwin
           Version: 5.93.0
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: kod...@gmail.com
  Target Milestone: ---

SUMMARY
***

I have my desktop configured with an LG 24UD58-B 3840x2160@60Hz monitor, set to
200% scaling, either on HDMI or DisplayPort, it will do this on either one. And
a Dell P2414H at 1920x1080@60Hz at 100% scaling, over DisplayPort.

When my primary monitor is put into DPMS power off state, and successfully
turns itself off after displaying the "power save" notice, it does something
odd when powering back on. At the instant the operating system powers it back
on with DPMS controls, it hot detaches itself from DRM, then needs to be
re-attached. This causes a video mode change, possibly causing scaling to
temporarily reset to 100% and back to 200% again.

This has the effect of causing several of my desktop windows to resize
themselves. Wezterm in Wayland mode shrinks to a tiny box. Firefox, in its
Wayland mode, maintains its size for the most part. Discord, an Electron app
running in Xwayland mode, grows its window frame to 200% of its original size,
but the content remains its original size in the top left corner of the window
frame, while the rest of the window frame becomes transparent to what's
underneath of it, and also becomes transparent to clicking in those empty
regions. When resizing this Electron window's frame, or using the Super+Right
button resize on a non-transparent region of the window contents, the window
contents suddenly grow to the full size of the 200% scaled window frame. I have
to shrink this Electron app every time I log back into my desktop, and grow the
size of Wezterm to a usable size as well.


STEPS TO REPRODUCE
1. Have a 200% scaled monitor that does the above indicated DPMS dance every
time it's powered back on, and a 100% scaled monitor to the right of it, which
does not do any sort of port resetting when restored to powered on state.
2. Start some of the above mentioned apps, and arrange their windows in a
semblance of normalcy.
3. Lock the screen.
4. Press the Escape key to DPMS power off.
5. Wait for the display to fully power off.
6. Move the mouse or press a key to power back on.
7. Unlock the desktop.

OBSERVED RESULT
Several different apps, depending on GTK+, Qt, Electron, either Xwayland or
Wayland native, will be resized oddly, in somewhat consistent ways depending on
what type of app it is.

EXPECTED RESULT
Windows should maintain their original size as they had prior to the video mode
change, considering the mode change was same mode to same mode, but maybe had
an inconsistent mode in between due to the DPMS power cycling and subsequent
DRM mode reset.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux rolling, testing repositories enabled
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
None that I can think of.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to