Bug 338434

Summary: Strange highlighting issue in chrome menus
Product: [Plasma] kwin Reporter: MikeC <mike.cloaked>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bugs, perrantrevan
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Diagnostic information for Intel desktop
Output of qdbus org.kde.KWin /KWin supportInformation

Description MikeC 2014-08-21 09:30:45 UTC
With the KDE desktop as my D.E. and running the chrome browser, when clicking on a menu item from the top of the chrome browser, and if there is an item list then the highlighting of each item as the cursor moves down the list only highlights every second item instead of every item as normal. This is with desktop effects enabled. Turning off desktop effects with Alt-Shift-F12 makes the problem disappear.

If the arch package kdebase-workspace is downgraded from kdebase-workspace 4.11.11-1 to kdebase-workspace-4.11.10-2 then the problem disappears.

The system is arch linux and the problem has been present through several recent updates to the kernel, as well as recent updates to KDE including 4.13.x - currently it is also present with kde version 4.14.0-1

This seems to be a regression introduced with versions of kdebase-workspace since version 4.11.10-2
Comment 1 Thomas Lübking 2014-08-21 13:45:42 UTC
please attach the output of
   qdbus org.kde.kwin /KWin supportInformation
Comment 2 MikeC 2014-08-21 14:23:20 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: 4.11.11
KDE SC version (runtime): 4.14.0
KDE SC version (compile): 4.13.3
Qt Version: 4.8.6

Options
=======
focusPolicy: 1
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 750
delayFocusInterval: 300
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
showDesktopIsMinimizeAll: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
legacyFullscreenSupport: false
operationTitlebarDblClick: 
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
unredirectFullscreen: false
glSmoothScale: 2
colorCorrected: false
xrenderSmoothScale: false
maxFpsInterval: 16666666
refreshRate: 0
vBlankTime: 6000000
glDirect: true
glStrictBinding: false
glStrictBindingFollowsDriver: true
glLegacy: false
glCoreProfile: false
glPreferBufferSwap: 101

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 
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:  yes
Number of Screens: 1
Screen 0 Geometry: 0,0,1920x1080

Decoration
==========
Current Plugin: kwin3_aurorae
Shadows: yes
Alpha: yes
Announces Alpha: yes
Tabbing: no
Frame Overlap: yes
Blur Behind: yes

Compositing
===========
Qt Graphics System: raster
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL version string: 3.0 Mesa 10.2.5
OpenGL shading language version string: 1.30
Driver: Intel
GPU class: Haswell
OpenGL version: 3.0
GLSL version: 1.30
Mesa version: 10.2.5
X server version: 1.16
Linux kernel version: 3.16.1
Direct rendering: yes
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:
---------------
kwin4_effect_zoom
kwin4_effect_slidingpopups
kwin4_effect_login
kwin4_effect_minimizeanimation
kwin4_effect_cubeslide
kwin4_effect_screenshot
kwin4_effect_desktopgrid
kwin4_effect_translucency
kwin4_effect_maximize
kwin4_effect_fade
kwin4_effect_highlightwindow
kwin4_effect_taskbarthumbnail
kwin4_effect_dialogparent
kwin4_effect_presentwindows
kwin4_effect_blur
kwin4_effect_logout
kwin4_effect_dashboard
kwin4_effect_screenedge
kwin4_effect_startupfeedback
kwin4_effect_kscreen

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

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

kwin4_effect_slidingpopups:
fadeInTime: 250
fadeOutTime: 250

kwin4_effect_login:

kwin4_effect_minimizeanimation:

kwin4_effect_cubeslide:
rotationDuration: 500
dontSlidePanels: true
dontSlideStickyWindows: false
usePagerLayout: true
useWindowMoving: false

kwin4_effect_screenshot:

kwin4_effect_desktopgrid:
zoomDuration: 300
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: true

kwin4_effect_translucency:

kwin4_effect_maximize:

kwin4_effect_fade:

kwin4_effect_highlightwindow:

kwin4_effect_taskbarthumbnail:

kwin4_effect_dialogparent:

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

kwin4_effect_blur:
blurRadius: 12
cacheTexture: true

kwin4_effect_logout:
useBlur: true

kwin4_effect_dashboard:
brightness: 0.5
saturation: 0.5
blur: false

kwin4_effect_screenedge:

kwin4_effect_startupfeedback:

kwin4_effect_kscreen:
Comment 3 MikeC 2014-08-21 14:25:40 UTC
Apologies for adding the text directly instead of a link in the reply to the request for additional information. I'll include any further diagnostic output as an attachment and not direct text.
Comment 4 MikeC 2014-08-21 14:31:53 UTC
Created attachment 88352 [details]
Diagnostic information for Intel desktop

Output from "qdbus org.kde.kwin /KWin supportInformation"for a second machine (desktop based on motherboard DQ77KB with Intel integrated graphics) exhibiting the same chrome menu problem as for the Lenovo Y510p laptop that had the output in comment #2
Comment 5 Thomas Lübking 2014-08-21 14:35:45 UTC
nevermind. try:

kwriteconfig --file kwinrc --group Compositing --key GLStrictBinding true
qdbus org.kde.kwin /KWin reconfigure
qdbus org.kde.kwin /KWin toggleCompositing
qdbus org.kde.kwin /KWin toggleCompositing
Comment 6 MikeC 2014-08-21 15:39:45 UTC
Yes!  I have tried your four commands on one laptop, and this does fix it both immediately after running the 4 commands as user, as well as after logging out and back in again.

I will try the same on the other machines and also check that the problem remains fixed after reboot, and I will report back shortly.

Many thanks for your help with this.
Comment 7 MikeC 2014-08-21 15:47:00 UTC
I have tested the same four commands as per comment #5 on a second machine, and the problem is fixed there also, including after logout/relogin.  I have also rebooted the first machine and the problem has also remained fixed there too.

Does this fix require the same commands to be run for each user on each machine or will this be fixed in a future package update?
Comment 8 Martin Flöser 2014-08-21 15:52:43 UTC
> Does this fix require the same commands to be run for each user on each
> machine or will this be fixed in a future package update?

Actually I thought we already shipped a fix, but apparently only for 5.x, not 
for 4.11: 
http://quickgit.kde.org/?p=kwin.git&a=commit&h=e8241313fc979aefafc8c2a0207570d6394f1580

we should backport that one, shouldn't we?
Comment 9 Thomas Lübking 2014-08-21 17:11:22 UTC
from the review comments, i thought "we" had - and yes, "we" should ;-)
should "we"? should "i"?

*** This bug has been marked as a duplicate of bug 336589 ***
Comment 11 perrantrevan 2014-12-02 18:12:03 UTC
Hello,

I still get this issue with Chrome menus on Plasma 5/Frameworks 5 if I use EGL instead of GLX...

Intel Haswell Graphics

Should I make a new bug?
Comment 12 Thomas Lübking 2014-12-02 20:45:31 UTC
What's the output of
   qdbus org.kde.KWin /KWin supportInformation | grep -iE '(strict|version)'

You need commit e8241313fc979aefafc8c2a0207570d6394f1580
Comment 13 perrantrevan 2014-12-02 20:53:21 UTC
 qdbus org.kde.KWin /KWin supportInformation | grep -iE '(strict|version)'
Version
KWin version: 5.1.1
Qt Version: 5.3.2
glStrictBinding: true
glStrictBindingFollowsDriver: true
OpenGL version string: 3.3 (Core Profile) Mesa 10.3.4
OpenGL shading language version string: 3.30
OpenGL version: 3.3
GLSL version: 3.30
Mesa version: 10.3.4
X server version: 1.16.2
Linux kernel version: 3.17.4
Direct rendering: Requires strict binding: yes
Comment 14 Thomas Lübking 2014-12-02 21:16:38 UTC
Ah, it's because of

    if (isMesaDriver() && platformInterface == EglPlatformInterface) {
        // According to the reference implementation in
        // mesa/demos/src/egl/opengles1/texture_from_pixmap
        // the mesa egl implementation does not require a strict binding (so far).
        m_looseBinding = true;
    }

Please add

GLStrictBinding=false

to the [Compositing] group in ~/.config/kwinrc, restart KWin ("kwin_x11 --replace &") and ensure that this "fixes" it.
Comment 15 perrantrevan 2014-12-02 21:29:50 UTC
Thanks but it didn't work for me: -

qdbus org.kde.KWin /KWin supportInformation | grep -iE '(strict|version)'
Version
KWin version: 5.1.1
Qt Version: 5.3.2
glStrictBinding: false
glStrictBindingFollowsDriver: false
OpenGL version string: 3.3 (Core Profile) Mesa 10.3.4
OpenGL shading language version string: 3.30
OpenGL version: 3.3
GLSL version: 3.30
Mesa version: 10.3.4
X server version: 1.16.2
Linux kernel version: 3.17.4
Direct rendering: Requires strict binding: no
Comment 16 Thomas Lübking 2014-12-02 21:47:04 UTC
Ok, leaving aside the logic error on my side (the initial setting was supposed to be "corrrect", are you sure this is egl?) this is a different bug.

Please file a new one and attach the complete output of "qdbus org.kde.KWin /KWin supportInformation" and a screenshot or video of the issue.
Comment 17 perrantrevan 2014-12-02 21:55:02 UTC
Well, I set EGL in the compositing KCM. It seems to have no glitches apart from this Chrome issue whereas with GLX I sometimes get some weird flickering in certain parts of the screen.

How can I prove I'm running EGL otherwise? Looking at the /.config/kwinrc it actually says: -

[Compositing]
AnimationSpeed=3
Backend=OpenGL
Enabled=true
GLColorCorrection=false
GLCore=true
GLPlatformInterface=egl
GLPreferBufferSwap=a
GLStrictBinding=false
GLTextureFilter=2
HiddenPreviews=5
OpenGLIsUnsafe=false
UnredirectFullscreen=false
XRenderSmoothScale=false
Comment 18 Martin Flöser 2014-12-03 06:42:17 UTC
I had seen such a problem the other day and can pass a patch along
Comment 19 Martin van Es 2015-09-07 09:13:24 UTC
I'm still seeing this problem in plasma 5.3.2 with Chrome 45, and the same effect is also apparent on the launcher widget.

$ qdbus org.kde.KWin /KWin supportInformation | grep -iE '(strict|version)'
Version
KWin version: 5.3.2
Qt Version: 5.4.1
Qt compile version: 5.4.1
XCB compile version: 1.10
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
glStrictBinding: false
glStrictBindingFollowsDriver: true
OpenGL version string: 3.3 (Core Profile) Mesa 10.5.9
OpenGL shading language version string: 3.30
OpenGL version: 3.3
GLSL version: 3.30
Mesa version: 10.5.9
X server version: 1.17.1
Linux kernel version: 4.2
Direct rendering: Requires strict binding: no
Comment 20 Thomas Lübking 2015-09-07 11:24:03 UTC
can you please attach a complete output of "qdbus org.kde.KWin /KWin supportInformation"
Comment 21 Martin van Es 2015-09-07 12:03:03 UTC
Created attachment 94449 [details]
Output of qdbus org.kde.KWin /KWin supportInformation

A requested: Output of qdbus org.kde.KWin /KWin supportInformation
Comment 22 Thomas Lübking 2015-09-07 19:43:16 UTC
Like perrantrevan, you're on EGL (and I assume the problem only manifests there)

a) please open a new bug (it seems to be totally unrelated to this since...)
b) try to enforce strict binding in ~/.config/kwinrc, [Compositing] group: GLStrictBinding=true
    and restart "kwin_x11 --replace &"
    (....but from perrantrevan's comments, this won't help)

@Martin, you suggested a patch for this (specific EGL issue) in comment #18?
Comment 23 Martin Flöser 2015-09-08 06:27:06 UTC
yep, found a patch from that date which seems fitting

commit c7cb0cef5837bca1adaa7a6f0248a7b6e16334e3
Author: Martin Gräßlin <mgraesslin@kde.org>
Date:   Wed Dec 3 07:49:58 2014 +0100

    Also disable loose binding on egl
    
    See e8241313fc979aefafc8c2a0207570d6394f1580.

diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp
index 548d459..e2443f2 100644
--- a/libkwineffects/kwinglplatform.cpp
+++ b/libkwineffects/kwinglplatform.cpp
@@ -812,13 +812,6 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
         }
     }
 
-    if (isMesaDriver() && platformInterface == EglPlatformInterface) {
-        // According to the reference implementation in
-        // mesa/demos/src/egl/opengles1/texture_from_pixmap
-        // the mesa egl implementation does not require a strict binding (so far).
-        m_looseBinding = true;
-    }
-
     if (isSoftwareEmulation()) {
         // we recommend XRender
         m_recommendedCompositor = XRenderCompositing;
Comment 24 Thomas Lübking 2015-09-08 07:07:28 UTC
See comment #13 - perrantrevan initially had strict binding enabled, so I'm not sure that covers whatever he (and maybe Martin vE) sees :-(
Comment 25 Martin van Es 2015-09-08 07:34:05 UTC
(In reply to Thomas Lübking from comment #22)
> Like perrantrevan, you're on EGL (and I assume the problem only manifests
> there)
> 
> a) please open a new bug (it seems to be totally unrelated to this since...)
> b) try to enforce strict binding in ~/.config/kwinrc, [Compositing] group:
> GLStrictBinding=true
>     and restart "kwin_x11 --replace &"
>     (....but from perrantrevan's comments, this won't help)
> 
> @Martin, you suggested a patch for this (specific EGL issue) in comment #18?

Indeed, I am on EGL and can confirm the problems disappear when switching to GLX. So that's a good work-around for me (I don't exactly know the difference, but thought EGL was the "future" technology, hence my choice for EGL).
I tried the suggested GLStrictBinding=true fix, but that didn't help (under EGL).

So, yes I think it's an EGL issue and for now I'm good using GLX. Do you still need me to open a new issue? If there's anything you want me to test (except compiling a new plasma-workspace because I don't have the resources to do that right now) please feel free to ask.
Comment 26 Thomas Lübking 2015-09-08 07:44:41 UTC
Video or at least screenshot would be cool (to have an idea what this looks like)
Also you could try to set the tearing prevention to "none", resp. "full scene repaints" to see whether this might be caused by re-using an old buffer or insufficient update regions.

Since this is a completely different bug, we should rather not "pollute" this one with it.
Comment 27 Martin van Es 2015-09-08 07:59:15 UTC
I opened Bug #352427.
As written there: none, or full-screen repaint don't help.