Bug 386099 - [Wayland] Plasma won't work on vertical setups
Summary: [Wayland] Plasma won't work on vertical setups
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.11.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-23 09:33 UTC by Aleix Pol
Modified: 2017-11-08 15:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
weston-info output (8.86 KB, text/plain)
2017-10-23 09:35 UTC, Aleix Pol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleix Pol 2017-10-23 09:33:32 UTC
I'm not sure what's special about vertical, but it's reproducible:
- open a session with 2 displays: working fine
- open the Displays kcm and change the layout to vertical: one screen gets b0rked
- changing the setup again to horizontal works again
Comment 1 Aleix Pol 2017-10-23 09:35:29 UTC
Created attachment 108521 [details]
weston-info output
Comment 2 Aleix Pol 2017-10-23 09:47:17 UTC
video showing what it looks like:
https://www.youtube.com/watch?v=0FgVBEaW2GA
Comment 3 Martin Flöser 2017-10-23 13:47:33 UTC
Please provide output of 
qdbus org.kde.KWin /KWin supportInformation
For the broken setup
Comment 4 Aleix Pol 2017-10-23 15:17:28 UTC
$ qdbus org.kde.KWin /KWin supportInformation
KWin Support Information:
The following information should be used when requesting support on e.g. http://forum.kde.org.
It provides information about the currently running instance, which options are used,
what OpenGL driver and which effects are running.
Please post the information provided underneath this introductory text to a paste bin service
like http://paste.kde.org instead of pasting into support threads.

==========================

Version
=======
KWin version: 5.11.90
Qt Version: 5.10.0
Qt compile version: 5.10.0
XCB compile version: 1.12

Operation Mode: Xwayland

Build Options
=============
KWIN_BUILD_DECORATIONS: yes
KWIN_BUILD_TABBOX: yes
KWIN_BUILD_ACTIVITIES: yes
HAVE_INPUT: yes
HAVE_DRM: yes
HAVE_GBM: yes
HAVE_X11_XCB: yes
HAVE_EPOXY_GLX: yes
HAVE_WAYLAND_EGL: yes

X11
===
Vendor: The X.Org Foundation
Vendor Release: 11905000
Protocol Version/Revision: 11/0
SHAPE: yes; Version: 0x11
RANDR: yes; Version: 0x14
DAMAGE: yes; Version: 0x11
Composite: yes; Version: 0x4
RENDER: yes; Version: 0xb                                                                                                                                                                                                                                                        
XFIXES: yes; Version: 0x50                                                                                                                                                                                                                                                       
SYNC: yes; Version: 0x31                                                                                                                                                                                                                                                         
GLX: yes; Version: 0x0                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                 
Decoration                                                                                                                                                                                                                                                                       
==========                                                                                                                                                                                                                                                                       
Plugin: org.kde.breeze                                                                                                                                                                                                                                                           
Theme:                                                                                                                                                                                                                                                                           
Blur: 0                                                                                                                                                                                                                                                                          
onAllDesktopsAvailable: true                                                                                                                                                                                                                                                     
alphaChannelSupported: true                                                                                                                                                                                                                                                      
closeOnDoubleClickOnMenu: false                                                                                                                                                                                                                                                  
decorationButtonsLeft: 0, 9, 1                                                                                                                                                                                                                                                   
decorationButtonsRight: 3, 4, 5
borderSize: 0
gridUnit: 8
font: Noto Sans,8,-1,5,50,0,0,0,0,0,Regular
smallSpacing: 2
largeSpacing: 8

Options
=======
focusPolicy: 0
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
legacyFullscreenSupport: false
operationTitlebarDblClick: 5000
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: 0
commandActiveTitlebar2: 30
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 30
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 31
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
showGeometryTip: false
condensedTitle: false
electricBorderMaximize: true
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
glSmoothScale: 1
xrenderSmoothScale: false
maxFpsInterval: 16666666
refreshRate: 0
vBlankTime: 6000000
glStrictBinding: false
glStrictBindingFollowsDriver: true
glCoreProfile: true
glPreferBufferSwap: 101
glPlatformInterface: 2
windowsBlockCompositing: true

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 1x1
timeThreshold: 150
reActivateThreshold: 350
actionTopLeft: 0
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0

Screens
=======
Multi-Head: no
Active screen follows mouse:  no
Number of Screens: 2

Screen 0:
---------
Name: LP125WH2-SLB LVDS-1-unknown
Geometry: 554,1080,1366x768
Refresh Rate: 60.019

Screen 1:
---------
Name: DEL DP-1-DELL U2312HM/59DJP1AHBFFL
Geometry: 0,0,1920x1080
Refresh Rate: 60


Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile 
OpenGL version string: 3.3 (Core Profile) Mesa 17.2.2
OpenGL platform interface: EGL
OpenGL shading language version string: 3.30
Driver: Intel
GPU class: SandyBridge
OpenGL version: 3.3
GLSL version: 3.30
Mesa version: 17.2.2
Linux kernel version: 4.13.8
Direct rendering: Requires strict binding: no
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used
Painting blocks for vertical retrace:  no

Loaded Effects:
---------------
zoom
kwin4_effect_frozenapp
kwin4_effect_fade
mouseclick
kwin4_effect_maximize
kwin4_effect_login
kwin4_effect_morphingpopups
kwin4_effect_windowaperture
kwin4_effect_logout
kwin4_effect_dialogparent
kwin4_effect_translucency
slidingpopups
slide
screenshot
minimizeanimation
flipswitch
desktopgrid
coverswitch
colorpicker
presentwindows
highlightwindow
blur
contrast
startupfeedback
screenedge
kscreen

Currently Active Effects:
-------------------------
blur
contrast

Effect Settings:
----------------
zoom:
zoomFactor: 1.2
mousePointer: 0
mouseTracking: 0
enableFocusTracking: false
followFocus: true
focusDelay: 350
moveFactor: 20
targetZoom: 1

kwin4_effect_frozenapp:

kwin4_effect_fade:

mouseclick:
color1: #ff0000
color2: #00ff00
color3: #0000ff
lineWidth: 1
ringLife: 300
ringSize: 20
ringCount: 2
showText: false
font: Noto Sans,8,-1,5,50,0,0,0,0,0,Regular
enabled: false

kwin4_effect_maximize:

kwin4_effect_login:

kwin4_effect_morphingpopups:

kwin4_effect_windowaperture:

kwin4_effect_logout:

kwin4_effect_dialogparent:

kwin4_effect_translucency:

slidingpopups:
fadeInTime: 30
fadeOutTime: 50

slide:

screenshot:

minimizeanimation:

flipswitch:
tabBox: false
tabBoxAlternative: false
duration: 40
angle: 30
xPosition: 0.33000001311302185
yPosition: 1
windowTitle: true

desktopgrid:
zoomDuration: 60
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: true

coverswitch:
animationDuration: 40
animateSwitch: true
animateStart: true
animateStop: true
reflection: true
windowTitle: true
zPosition: 900
primaryTabBox: false
secondaryTabBox: false

colorpicker:

presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 20
fillGaps: true
fadeDuration: 30
showPanel: false
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0

highlightwindow:

blur:
blurRadius: 12
cacheTexture: true

contrast:

startupfeedback:
type: 1

screenedge:

kscreen:
Comment 5 Aleix Pol 2017-10-23 15:19:58 UTC
Now going back to the working set up I realized that if I align the screen at the bottom I get a similar issue, but if I do it at the top it works:
i.e. in a horizontal set up if the y!=0 one of the displays it breaks.
Comment 6 Martin Flöser 2017-10-23 15:28:33 UTC
Could you try to align the screens on the left (x==0)?
Comment 7 Aleix Pol 2017-10-23 15:38:50 UTC
Yes, aligning both at x=0 works.
Comment 8 Aleix Pol 2017-10-23 15:43:20 UTC
Wait no, it doesn't. I was just seeing garbage.
Comment 9 Martin Flöser 2017-10-24 15:16:28 UTC
I have one more idea as I know a setting in blur effect is broken on multi screen: try disabling the blur and contrast effect.
Comment 10 Aleix Pol 2017-10-25 00:38:15 UTC
No, it didn't work.
I also tried disabling more effects, but also no changes.

KWin Support Information:
The following information should be used when requesting support on e.g. http://forum.kde.org.
It provides information about the currently running instance, which options are used,
what OpenGL driver and which effects are running.
Please post the information provided underneath this introductory text to a paste bin service
like http://paste.kde.org instead of pasting into support threads.

==========================

Version
=======
KWin version: 5.11.90
Qt Version: 5.10.0
Qt compile version: 5.10.0
XCB compile version: 1.12

Operation Mode: Xwayland

Build Options
=============
KWIN_BUILD_DECORATIONS: yes
KWIN_BUILD_TABBOX: yes
KWIN_BUILD_ACTIVITIES: yes
HAVE_INPUT: yes
HAVE_DRM: yes
HAVE_GBM: yes
HAVE_X11_XCB: yes
HAVE_EPOXY_GLX: yes
HAVE_WAYLAND_EGL: yes

X11
===
Vendor: The X.Org Foundation
Vendor Release: 11905000
Protocol Version/Revision: 11/0
SHAPE: yes; Version: 0x11
RANDR: yes; Version: 0x14
DAMAGE: yes; Version: 0x11
Composite: yes; Version: 0x4
RENDER: yes; Version: 0xb
XFIXES: yes; Version: 0x50
SYNC: yes; Version: 0x31
GLX: yes; Version: 0x0

Decoration
==========
Plugin: org.kde.breeze
Theme: 
Blur: 0
onAllDesktopsAvailable: true
alphaChannelSupported: true
closeOnDoubleClickOnMenu: false
decorationButtonsLeft: 0, 9, 1
decorationButtonsRight: 3, 4, 5
borderSize: 0
gridUnit: 8
font: Noto Sans,8,-1,5,50,0,0,0,0,0,Regular
smallSpacing: 2
largeSpacing: 8

Options
=======
focusPolicy: 0
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
legacyFullscreenSupport: false
operationTitlebarDblClick: 5000
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: 0
commandActiveTitlebar2: 30
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 30
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 31
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
showGeometryTip: false
condensedTitle: false
electricBorderMaximize: true
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
glSmoothScale: 1
xrenderSmoothScale: false
maxFpsInterval: 16666666
refreshRate: 0
vBlankTime: 6000000
glStrictBinding: false
glStrictBindingFollowsDriver: true
glCoreProfile: true
glPreferBufferSwap: 101
glPlatformInterface: 2
windowsBlockCompositing: true

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 1x1
timeThreshold: 150
reActivateThreshold: 350
actionTopLeft: 0
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0

Screens
=======
Multi-Head: no
Active screen follows mouse:  no
Number of Screens: 2

Screen 0:
---------
Name: LP125WH2-SLB LVDS-1-unknown
Geometry: 0,1080,1366x768
Refresh Rate: 60.019

Screen 1:
---------
Name: DEL DP-1-DELL U2312HM/59DJP1AHBFFL
Geometry: 0,0,1920x1080
Refresh Rate: 60


Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile 
OpenGL version string: 3.3 (Core Profile) Mesa 17.2.2
OpenGL platform interface: EGL
OpenGL shading language version string: 3.30
Driver: Intel
GPU class: SandyBridge
OpenGL version: 3.3
GLSL version: 3.30
Mesa version: 17.2.2
Linux kernel version: 4.13.8
Direct rendering: Requires strict binding: no
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used
Painting blocks for vertical retrace:  no

Loaded Effects:
---------------
zoom
kwin4_effect_frozenapp
mouseclick
kwin4_effect_maximize
kwin4_effect_login
kwin4_effect_morphingpopups
kwin4_effect_windowaperture
kwin4_effect_logout
kwin4_effect_dialogparent
kwin4_effect_translucency
slidingpopups
slide
screenshot
minimizeanimation
flipswitch
desktopgrid
coverswitch
colorpicker
presentwindows
highlightwindow
startupfeedback
screenedge
kscreen

Currently Active Effects:
-------------------------

Effect Settings:
----------------
zoom:
zoomFactor: 1.2
mousePointer: 0
mouseTracking: 0
enableFocusTracking: false
followFocus: true
focusDelay: 350
moveFactor: 20
targetZoom: 1

kwin4_effect_frozenapp:

mouseclick:
color1: #ff0000
color2: #00ff00
color3: #0000ff
lineWidth: 1
ringLife: 300
ringSize: 20
ringCount: 2
showText: false
font: Noto Sans,8,-1,5,50,0,0,0,0,0,Regular
enabled: false

kwin4_effect_maximize:

kwin4_effect_login:

kwin4_effect_morphingpopups:

kwin4_effect_windowaperture:

kwin4_effect_logout:

kwin4_effect_dialogparent:

kwin4_effect_translucency:

slidingpopups:
fadeInTime: 30
fadeOutTime: 50

slide:

screenshot:

minimizeanimation:

flipswitch:
tabBox: false
tabBoxAlternative: false
duration: 40
angle: 30
xPosition: 0.33000001311302185
yPosition: 1
windowTitle: true

desktopgrid:
zoomDuration: 60
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: true

coverswitch:
animationDuration: 40
animateSwitch: true
animateStart: true
animateStop: true
reflection: true
windowTitle: true
zPosition: 900
primaryTabBox: false
secondaryTabBox: false

colorpicker:

presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 20
fillGaps: true
fadeDuration: 30
showPanel: false
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0

highlightwindow:

startupfeedback:
type: 1

screenedge:

kscreen:
Comment 11 Aleix Pol 2017-10-25 00:56:45 UTC
David just suggested me to try using KWIN_COMPOSE=Q.

With this it works!

Then it crashes after about 20s.
Comment 12 Martin Flöser 2017-10-25 07:03:04 UTC
That Qpainter works doesn't surprise me. Overall it looks quite like incorrect view port handling.
Comment 13 David Edmundson 2017-10-25 22:14:22 UTC
Git commit 5d7e22e5dcf8981f9ba65088b81c1c6d456efef3 by David Edmundson.
Committed on 25/10/2017 at 22:13.
Pushed by davidedmundson into branch 'Plasma/5.11'.

Fix viewport on vertically stacked monitors

Summary:
We want to translate by the monitor position, so that needs to be
the negative of the position.

But Kwin/KScreen treats 0 as the top of all monitors. GL treats 0 as
bottom, so that all needs inverting.

Hence this should be a positive y value for the viewport.
Related: bug 385655

Test Plan:
Had two monitors
Side by side was - fine
Stacked vertically - still fine

Modded X code to extend in y instead of x.
3 monitors worked fine.

Nested wayland only seems to support one screen?

Reviewers: #plasma

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8479

M  +1    -1    plugins/platforms/drm/egl_gbm_backend.cpp
M  +1    -1    plugins/platforms/x11/windowed/egl_x11_backend.cpp

https://commits.kde.org/kwin/5d7e22e5dcf8981f9ba65088b81c1c6d456efef3