Bug 451056 - Kwin-X11 Windows Resize, Position, and Move Erratically
Summary: Kwin-X11 Windows Resize, Position, and Move Erratically
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.24.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-02 21:46 UTC by Michael Mikowski
Modified: 2022-03-09 22:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Mikowski 2022-03-02 21:46:58 UTC
SUMMARY

Kwin is showing the following anomalies. These are not constant, but occur frequently (10-20 times) per day. They all appear to be associated with a scaling issue, so I have grouped them here. I will work to provide a better guide to reproduce as I find out more. Driver package is nvidia-driver-470.

STEPS TO REPRODUCE

1. Run Jammy with multiple 4K monitors attached. I've tried this with a high font DPI setting (System Settings > Fonts > Force DPI = 144) and fractional scaling (System Settings > Displays > Global Scale = 150%). These symptoms occur in either setting. I have not confirmed if this works without either.
2. Launch an app such as konsole or google-chrome (the latter seems highly susceptible).
3. Tile and drag windows. This results in issues (1), (2), and (3), above.
4. Drag a tab from konsole or firefox into an empty space. The window will be placed incorrectly even if the area dragged to is completely open.
5. Turning off compositing (alt+shift+f12) results in window being sized to include a large black border (around 50px) which presumably is the shadow size. This border is ignored when tiling or using the maximize button. But it is included in window size when using vertical maximize and horizontal maximize.

OBSERVED RESULT

A. When moving windows, the window will not move with the cursor but will continue to move the window further downwards on the screen even as the cursor is pushed further up. In fact, the speed at which a window moves down appears proportional to the upward movement of the cursor.

B. Windows that are moved as in (1) will often "slide off screen" and are inaccessible using the cursor although they still exist in the panel. Windows include IntelliJ Pro, Google Chrome, Konsole.

C. Windows that have been tiled (e.g. press meta + arrow key) when moved by dragging the title bar, will vertically collapse to only the height of the title bar. After dropping this title bar, one cannot select or move it again from the screen. Windows include IntelliJ Pro, Google Chrome, Konsole

D. Windows spawned by dragging a tab from one window onto an empty space (e.g. dragging a tab from a firefox browser or konsole session onto an empty space on the desktop) are placed badly - usually far away from the intended location, and sometimes off-screen as in (2).

EXPECTED RESULT

A and B. Moving windows should follow the cursor and not 'slide off screen' where they are inaccessible. 
C. Windows show maintain their size or pre-tiling size when moving, and should not collapse to title-bar height.
D. Windows spawned from another window tab like konsole or firefox, should be created in the area of the cursor, not off screen.

SOFTWARE/OS VERSIONS

Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.15.0-18-lowlatency (64-bit)
Graphics Platform: X11
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 31.1 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2

ADDITIONAL INFORMATION

Downstream Kubuntu bug: https://bugs.launchpad.net/ubuntu/+source/kwin/+bug/1962621
All kwin settings are defaults. No kwin scripts are installed or used.

SPECULATION

Scaling is not applied correctly to window moving or sizing?
Font DPI is not applied correctly to window moving or sizing?
Comment 1 Michael Mikowski 2022-03-04 00:28:20 UTC
1. NO IMPROVEMENT: Turned off fractional scaling + no forced DPI.
2. IMPROVED: Turned off fractional scaling + FORCED DPI to 96. This appears to FIX issues A-D. In addition, turning off the compositor no longer results in a large black border where the window shadow used to be.

I recognize this may be related to a recent software upgrade as well. I will try this with 96 DPI and fractional scaling and report back.
Comment 2 Michael Mikowski 2022-03-09 22:41:30 UTC
At present, the windows appear to behaving well with the latest point update (5.24.2 => 5.24.3).