Bug 357275 - When plugging in new screen (diff resolution) in unified mode, kwin reports wrong desktop size
Summary: When plugging in new screen (diff resolution) in unified mode, kwin reports w...
Status: RESOLVED WORKSFORME
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.5.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Daniel Vrátil
URL: http://i.imgur.com/nmWEd92.png
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-28 18:34 UTC by dump
Modified: 2022-11-18 05:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
xrandr -q output (problem is occuring) (1.21 KB, text/plain)
2015-12-28 19:36 UTC, dump
Details
xprop of bottom panel (this is my only panel) when problem is occuring (56.53 KB, text/plain)
2015-12-28 19:38 UTC, dump
Details
xprop of firefox maximized when problem is occuring (just in case its useful) (10.66 KB, text/plain)
2015-12-28 19:39 UTC, dump
Details
qdbus kwin output (problem is occuring) (5.38 KB, text/plain)
2015-12-28 19:41 UTC, dump
Details
xprop of bottom panel when problem is fixed (1920x1080 for all screens) (56.53 KB, text/plain)
2015-12-28 19:49 UTC, dump
Details
xrandr -q outpu t when problem is fixed (1920x1080 for all screens) (1.18 KB, text/plain)
2015-12-28 19:50 UTC, dump
Details
qdbus kwin output when problem is fixed (1920x1080 for all screens) (5.38 KB, text/plain)
2015-12-28 19:50 UTC, dump
Details
Quick video recording of first screen (eDP1) showing the unify "issue" and the maximize issue (3.02 MB, video/mp4)
2016-01-12 21:20 UTC, dump
Details
xrandr output (new) (1.18 KB, text/plain)
2016-01-12 21:22 UTC, dump
Details
xprop output (new) (56.54 KB, text/plain)
2016-01-12 21:23 UTC, dump
Details
qdbus output (new) (5.38 KB, text/plain)
2016-01-12 21:23 UTC, dump
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dump 2015-12-28 18:34:11 UTC
The desktop dimensions on the 2nd screen are invalid when plugged in (after plasma is already running), if both screens are unified in the display settings, and have different resolutions.
See also the link for an example of this behavior (http://i.imgur.com/nmWEd92.png)

This is mostly an issue when you use a laptop and frequently connect/disconnect a second screen in unified mode.

Reproducible: Always

Steps to Reproduce:
1) setup computer with 2 screens, 1 is 1920x1080, the other (2nd) is 1920x1200 (or any different resolution from the first screen, while both supporting a common resolution for unification to work and look like a mirror of the screen)
2) set screens as unified ("Unify outputs" button in the display configuration panel)
3) unplug 2nd screen
4) reboot or restart xorg+kwin/plasma
5) plug the 2nd screen back in
Panel will be offset on the 2nd screen, maximizing the windows will keep the offset. Moving or deleting the panel is possible, but maximized windows will still be offset, thus some desktop size reporting must be incorrect somewhere.

Actual Results:  
Offset desktop windows/panel

Expected Results:  
Windows should use the whole screen area when maximized
Panel should be the correct edge (in my case, bottom of the screen)

This used to work in earlier versions of plasma (i cant find back which version unfortunately). its broken since a few month now.
I tried on a fresh profile (new user, zero kde/plasma settings) and the problem persists.
Comment 1 dump 2015-12-28 18:37:30 UTC
First link is done via kwin/plasma screenshot utility: http://i.imgur.com/nmWEd92.png
Second via scrot/xorg: http://i.imgur.com/oSaQHiD.png

Which also hints at the issue (xorg desktop size is correct, whatever is used by the plasma framework to communicate it to the screenshot tool is incorrect)
Comment 2 Thomas Lübking 2015-12-28 18:38:12 UTC
please post "xrandr -q" output befopre and after the problematic change as well as "xprop" on all involved panels (cursor turns into "+", then click the panel) - you may strip the icon informations (ASCII art) from xprop.
Comment 3 Thomas Lübking 2015-12-28 18:43:08 UTC
Oh, and the output of "qdbus org.kde.KWin /KWin supportInformation" before and after.
Comment 4 dump 2015-12-28 19:36:46 UTC
Created attachment 96338 [details]
xrandr -q output (problem is occuring)
Comment 5 dump 2015-12-28 19:38:37 UTC
Created attachment 96339 [details]
xprop of bottom panel (this is my only panel) when problem is occuring
Comment 6 dump 2015-12-28 19:39:52 UTC
Created attachment 96340 [details]
xprop of firefox maximized when problem is occuring (just in case its useful)
Comment 7 dump 2015-12-28 19:41:29 UTC
Created attachment 96341 [details]
qdbus kwin output (problem is occuring)
Comment 8 dump 2015-12-28 19:49:29 UTC
Created attachment 96342 [details]
xprop of bottom panel when problem is fixed (1920x1080 for all screens)
Comment 9 dump 2015-12-28 19:50:03 UTC
Created attachment 96343 [details]
xrandr -q outpu t when problem is fixed (1920x1080 for all screens)
Comment 10 dump 2015-12-28 19:50:39 UTC
Created attachment 96344 [details]
qdbus kwin output when problem is fixed (1920x1080 for all screens)
Comment 11 Thomas Lübking 2015-12-28 19:53:07 UTC
One of your screens is WUXGA (x1200), the other one FullHD (x1080)
=> The cannot be "unified", ever.

What happens is that the plasma panel "feels" like it's on the smaller screen and adds a 172px strut (52 for the panel and 120 for the offset to the root window, which is the bounding rect of all screens, ie 1920x1200)

There's no bug in KWin here.

Your problems are:
a) the screens have different geometries
b) they're not bottom aligned
c) the panel alignes to the smaller screen (what makes sense! otherwise it would be visible on only the bigger screen)

The HDMI seems to support FullHD as well, so it might be desired and reasonable for kscreen to actually unify them (omitting the preferred resolution of the bigger screen) when restoring(?) the screen config.
Comment 12 dump 2015-12-28 20:00:41 UTC
Note: i believe that i know what causes the issue.
At some point in time it was only possible to unify outputs if they had the same resolution (1920x1080) in my case.

Then when scaling options came up, it was possible to unify outputs with different resolution (1920x1200 + 1920x1080 in my case, where items would scale up to match).

The scaling only works right when the screen would be connected at plasma/kwin startup it seems like.

Right now, unless i wipe my configuration, since ive manually set both screens to 1920x1080 it seems to work ok so far (after a few disconect/reconnect).  I dont seem to be able to reset that via the display configuration panel to the original/buggy setup unless i wipe all config/new profile (but i may be wrong, ill try playing with the scaling settings a bit more)

The scaled version is much nicer though tho since all items are crisp on both screens (1920x1080 on a 1920x1200 screen is a different aspect ratio so looks a little blurred)
Comment 13 dump 2016-01-12 21:16:24 UTC
Since I reinstalled I dont run into this issue so I was going to close the bug. But it turns out that I do run in a similar but slightly different situation (which is maybe is the same bug, in fact):

Right now my 2 screens show as 1920x1080 in the display panel (and look to be at that resolution), and I did unify them. However if i close/open the display panel they show as non-unified (i can click on unify again and nothing happens).

This time also, instead of having a space at the bottom of the screen, some of the window is not displayed when maximized (goes under the bottom panel that i have, on both screens).
Note: I do not know if it's a kwin problem or something else for sure (or my fault somehow).

Will attach details.
Also, thanks for taking the time to look at this!
Comment 14 dump 2016-01-12 21:20:30 UTC
Created attachment 96608 [details]
Quick video recording of first screen (eDP1) showing the unify "issue" and the maximize issue
Comment 15 dump 2016-01-12 21:22:59 UTC
Created attachment 96609 [details]
xrandr output (new)
Comment 16 dump 2016-01-12 21:23:13 UTC
Created attachment 96610 [details]
xprop output (new)
Comment 17 dump 2016-01-12 21:23:31 UTC
Created attachment 96611 [details]
qdbus output (new)
Comment 18 dump 2016-01-12 21:24:52 UTC
Note: now running 5.5.3
Comment 19 Justin Zobel 2022-10-19 02:59:51 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 20 Bug Janitor Service 2022-11-03 05:07:03 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 21 Bug Janitor Service 2022-11-18 05:17:17 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!