Bug 454425

Summary: Windows are resized to a minimal height if I unplug external monitors
Product: [Plasma] kwin Reporter: Peter Tselios <ptselios>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: grzegorz.alibozek, nate
Priority: NOR    
Version: 5.24.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot with the issue.
shrinked window
screen layout

Description Peter Tselios 2022-05-26 07:55:12 UTC
Created attachment 149225 [details]
Screenshot with the issue.

SUMMARY
***
My current setup is this: 
1. Laptop screen at  2560x1440
2. 2xExternal screens at 1920x1080, one at DVI-D and one at HDMI port or the dock. 
3. KDE with X11

Problem: When I suspend the laptop, or I close the lid, or I unplug any of the external monitors, or I simple undock the laptop, all open windows placed at the un-plugged screen are moved to one of the other screens, BUT with very minimal height! 
If the session is locked, and I have at least 2 screens, the unlock screen is visible to only ONE screen. If I use only the laptop's screen, the unlock screen is not visible and I cannot even see if I type the password to unlock the screen. Yes, when I manage to unlock, the windows are in a very minimal HEIGHT. Windows placed on a screen that is not unplugged, are not affected. 

This is the outcome when I undocked the laptop this morning. Firefox and Dolphin where placed on the external screens. The other windows where placed at the laptop's screens, thus they are not affected by this issue. 

Note: Telegram, which as far as I can tell is not a KDE app, is NOT affected by this issue. However, Libreoffice, Firefox, Chrome, ALL of the other KDE apps ARE affected. 

I have no clue if this is a KWin, KScreen or anything else related, I open in here because it looks like a mis-calculation of the window size from KWin, but please move it to the right project if it doesn't belong here. 

***


STEPS TO REPRODUCE
1. Login to KDE in a multimonitor setup, preferably using screens with different resolutions
2. Suspend the PC/Undock the laptop
3. Notice the height of the windows. 

OBSERVED RESULT
Windows have very short height when they are automatically moved to another screen. 

EXPECTED RESULT
Windows size is maintained. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Fedora 34
KDE Plasma Version:  5.24.4
KDE Frameworks Version:  5.91.0
Qt Version: 5.15

ADDITIONAL INFORMATION
https://postimg.cc/WDjKCBpn
Comment 1 Nate Graham 2022-05-26 16:40:19 UTC
Does it happen in the Wayland session too, or just X11?

Is Telegram using client-side decorations, or does it have a titlebar that looks like the titlebar in your KDE apps?
Comment 2 Grzegorz 2022-05-27 19:44:53 UTC
Created attachment 149270 [details]
shrinked window

After disconnect the external screens from my laptop, often all windows will be reduced in length.
The linked screens are above the laptop (in display settings too)

ArchLinux
Plasma: 5.24.5
Framework: 5.94.0
Qt: 5.15.4

I guess this happened after updating framework version to 5.93.0 or qt to 5.15.3
Comment 3 Grzegorz 2022-05-27 19:47:26 UTC
I'm using plasma on x11
Comment 4 Nate Graham 2022-06-01 16:11:13 UTC
1. Is the primary screen on the left side or the right side? If it's on the right side, can you make the left-most screen primary and try again?
2. Can you try the Wayland session and see if the same thing happens there?
Comment 5 Grzegorz 2022-06-01 16:13:52 UTC
Created attachment 149380 [details]
screen layout

my screen layout
Comment 6 Grzegorz 2022-06-01 16:15:01 UTC
main screen is laptop screen
Comment 7 Nate Graham 2022-06-01 16:34:30 UTC
Thanks.

1. Can you make the top-left screen primary and try again?
2. Can you try the Wayland session and see if the same thing happens there?
Comment 8 Grzegorz 2022-06-03 12:08:15 UTC
I have this problem sometimes :/
I am trying to find a rule so that I can always trigger it
Comment 9 Bug Janitor Service 2022-06-18 04:35:33 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Grzegorz 2022-06-18 20:18:52 UTC
Peter, maybe you are able to reproduce this problem? 
recently this problem has occurred when docking laptop to station which have connected two external monitor (above in settings)
Comment 11 Bug Janitor Service 2022-07-03 04:36:53 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2022-07-18 04:36:47 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 13 Grzegorz 2022-07-30 08:01:35 UTC
(In reply to Nate Graham from comment #7)
> Thanks.
> 
> 1. Can you make the top-left screen primary and try again?
unchanged, problem persists

> 2. Can you try the Wayland session and see if the same thing happens there?
I was unable to reproduce the problem on wayland
Comment 14 Grzegorz 2022-07-30 09:33:00 UTC
looks from duplicate to https://bugs.kde.org/show_bug.cgi?id=452118
Comment 15 Peter Tselios 2022-09-22 04:46:02 UTC
(In reply to Grzegorz from comment #14)
> looks from duplicate to https://bugs.kde.org/show_bug.cgi?id=452118

I will be able to see if this is somehow fixed after the latest commits regarding other bugs about position of the screens etc and Fedora brings those packages.
I also promise to find some time to test different scenarios, like changing screen positions,  primary screen etc.
Comment 16 Nate Graham 2022-09-22 15:03:35 UTC

*** This bug has been marked as a duplicate of bug 452118 ***