Bug 454348

Summary: Stretched distorted image when monitor is rotated and compositing is enabled
Product: [Plasma] kwin Reporter: nyanpasu64 <nyanpasu64>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.24.90   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Spectacle screenshot of screen contents stretched horizontally after switching back to horizontal rotation

Description nyanpasu64 2022-05-24 17:39:22 UTC
SUMMARY
After upgrading to kwin 5.24.90, when I log in and my secondary monitor is rotated to portrait, the entire screen is stretched taller vertically and compressed horizontally, and blurred.

STEPS TO REPRODUCE
1. Plug in two monitors (in my case a 2560x1440 and 1920x1080).
2. In System Settings -> Display Configuration, place the 1920x1080 monitor to the right, secondary, rotated vertically (base on the left)
3. (optional) Log out and back in.

OBSERVED RESULT
Entire screen is stretched vertically and compressed horizontally. Mouse cursor appears in real location, but menus appear in the wrong spot, and what you click is not what your cursor appears over. Disabling compositing with alt-shift-f12 causes screen contents to appear in the right spot.

Oddly while experimenting with disabling and enabling monitors, I got KDE into a state where the image is not stretched with the right monitor vertical, but stretched horizontally with it set to horizontal.

EXPECTED RESULT
Screen contents appear at the right spot.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.90
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Kernel Version: 5.17.9-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550M DS3H

ADDITIONAL INFORMATION
Comment 1 nyanpasu64 2022-05-24 17:40:26 UTC
Created attachment 149175 [details]
Spectacle screenshot of screen contents stretched horizontally after switching back to horizontal rotation
Comment 2 Vlad Zahorodnii 2022-05-25 06:44:32 UTC
> Graphics Platform: X11

There was an issue in X11 backend how it handles output geometry changes. It should be fixed with https://invent.kde.org/plasma/kwin/-/merge_requests/2454. If not, please reopen this bug report.