Bug 322482 - Virtual screen set too large when two monitors have different rotations
Summary: Virtual screen set too large when two monitors have different rotations
Status: RESOLVED UNMAINTAINED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_randr (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-17 11:22 UTC by Bogdan
Modified: 2015-01-22 12:08 UTC (History)
1 user (show)

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


Attachments
Screenshot of the bad configuration set by the config applet (536.41 KB, image/jpeg)
2013-07-17 11:27 UTC, Bogdan
Details
Screenshot of the correct configuration, fixed manually with xrandr (529.09 KB, image/jpeg)
2013-07-17 11:28 UTC, Bogdan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bogdan 2013-07-17 11:22:59 UTC
KDE version: 4.8.4

In some situations (it depends from which configuration you started from), when you combine two identical displays in one virtual screen, but you use different orientations for each, the virtual screen is set to be too wide, in fact exactly as wide as if both monitors had the same orientation.

Reproducible: Always

Steps to Reproduce:
1. Get a computer with two identical monitor. (Note: they probably don’t need to be identical, but that’s the configuration I tested.)
2. Use the Size & Orientation config applet to set one of the screens to the side of the other, both in landscape mode; apply and accept the resulting configuration.
3. Then use the same applet to turn *just* the screen on the right to portrait mode; again, apply and accept the resulting configuration.
4a. Move the mouse out of the right edge of the virtual screen; or,
4b. Use xrandr to check the exact configuration that was set.
Actual Results:  
4: The desktops will pan to the right, indicating that the virtual screen is too large.

4b: The width of the virtual screen is set to the sum of the two monitors’ widths *without rotation*. In my case, it’s 3840 = 1920*2 rather than 3120 = 1920 + 1200.

Expected Results:  
The virtual screen should be set to the bounding rectangle of the two screens in the chosen orientation. This means that (4a) the desktop shouldn’t pan and (4b) the width of the virtual screen should be the width of the normal monitor plus the original height of the rotated one.

I’ll attach screenshots of the resulting configuration, it’s easier to see than to understand the written explanation. I’m not sure if it matters which screen is considered “primary”; check the screenshot (which includes the config panel window) to see my exact configuration.

Note that the correct configuration can be achieved using xrandr directly. Once you do that, some modifications using the config applet retain the correct virtual screen size, others don’t. The only consistent rule I saw is that if you rotate the displays back to normal and apply, then rotate again one of the screens, the bug manifests again.

Here’s the output of xrandr with the configuration set by the config applet:

$ xrandr 
Screen 0: minimum 8 x 8, current 3840 x 1920, maximum 8192 x 8192
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1200x1920+1920+0 left (normal left inverted right x axis y axis) 546mm x 352mm
   1920x1200      60.0*+   59.9  
[snip other modes]
HDMI-0 connected 1920x1200+0+430 (normal left inverted right x axis y axis) 546mm x 352mm
   1920x1200      60.0*+
[snip other modes]

And here’s how to fix it and what it should actually look like:

$ xrandr --screen 0 --fb 3120x1920
$ xrandr                                                                                                            
Screen 0: minimum 8 x 8, current 3120 x 1920, maximum 8192 x 8192                                                                  
DVI-I-0 disconnected (normal left inverted right x axis y axis)                                                                    
VGA-0 disconnected (normal left inverted right x axis y axis)                                                                      
DVI-I-1 connected 1200x1920+1920+0 left (normal left inverted right x axis y axis) 546mm x 352mm                                   
   1920x1200      60.0*+   59.9                                                                                                    
[snip other modes]
HDMI-0 connected 1920x1200+0+430 (normal left inverted right x axis y axis) 546mm x 352mm                                          
   1920x1200      60.0*+
[snip other modes]
Comment 1 Bogdan 2013-07-17 11:27:40 UTC
Created attachment 81157 [details]
Screenshot of the bad configuration set by the config applet

Note: you can look at the settings window at the right for details, it’s what I used to configure the layout. In case you’re curious, the two displays are (mis-)aligned that way because that’s the physical position of my two monitors.
Comment 2 Bogdan 2013-07-17 11:28:41 UTC
Created attachment 81158 [details]
Screenshot of the correct configuration, fixed manually with xrandr
Comment 3 Bogdan 2013-07-17 11:30:23 UTC
Comment on attachment 81158 [details]
Screenshot of the correct configuration, fixed manually with xrandr

Note that the config applet does not show any difference between the two cases. It should probably display and allow manually setting the size of the virtual screen as well as that of the two displays.
Comment 4 Bogdan 2013-07-17 11:38:04 UTC
I was playing a bit more with the applet and noticed that the bug seems related to which display is set as primary. I set the portrait one as primary and I got a similar bug in both directions. Note how the height was set to 2100, larger than both display heights, even though they’re aligned at the top:

$ xrandr 
Screen 0: minimum 8 x 8, current 3840 x 2100, maximum 8192 x 8192                                                                  
DVI-I-0 disconnected (normal left inverted right x axis y axis)                                                                    
VGA-0 disconnected (normal left inverted right x axis y axis)                                                                      
DVI-I-1 connected 1200x1920+1920+0 left (normal left inverted right x axis y axis) 546mm x 352mm                                   
   1920x1200      60.0*+   59.9                                                                                                    
[snip]
HDMI-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 546mm x 352mm                                            
   1920x1200      60.0*+                                                                                                           
[snip]
Comment 5 David Edmundson 2015-01-22 12:08:49 UTC
Thanks for reporting your bug.

Since reporting Krandr has since been replaced by KScreen. It is available in the Plasma 4 series, and is default in Plasma 5 onwards.

I hope this solves your issue. If you still have a problem after upgrading please reopen a new bug under kscreen.

Thanks