Bug 338150

Summary: [EGL] [DRI2] [intel] missing/incomplete repaints
Product: [Plasma] kwin Reporter: Nikita Skovoroda <chalkerx>
Component: eglAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: aacid, bhush94, bugs, clearmartin, hector.acosta, jlp, kde, kdebugs, linus.kardell, max.schettler, muesli, rdieter, roberth.sjonoy, Xavion.0
Priority: NOR Flags: thomas.luebking: Intel+
Version: 5.0.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=342500
https://bugs.kde.org/show_bug.cgi?id=360550
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: A screenshot of corrupted OSD.
attachment-4738-0.html
attachment-15573-0.html

Description Nikita Skovoroda 2014-08-09 14:58:25 UTC
Created attachment 88182 [details]
A screenshot of corrupted OSD.

Plasma OSD do not work as supposed when EGL backend is chosen in kwin.

A reproducible (for me) testcase:
1) Open «kcmshell5 kwincompositing», select EGL backend, click «Apply».
2) Run «qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.brightnessChanged 10; sleep 1; qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.brightnessChanged 90; sleep 1; qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.brightnessChanged 20»

What should happen: OSD showing 10% with an icon for 1 second, OSD showing 90% with an icon for 1 second, OSD showing 20% with an icon.

What happens: OSD showing 10% without an icon for 1 second, OSD showing 90% with an icon for 1 second, OSD showing 90% with an icon. First time, there is no icon, second time, the value does not get updated.

Everything is fine when using GLX backend in kwin.

Also, plasma elements have small graphical glitches (Sliders blinking, etc) which are not observable when using GLX kwin backend.

System information: Asus UX31A, Arch Linux (current).

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.2.5
OpenGL core profile shading language version string: 3.30

[     5.207] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20080730
[     5.210] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4000
[     5.210] (**) intel(0): Option "AccelMethod" "sna"
Comment 1 Bhushan Shah 2014-08-09 15:01:36 UTC
Yesm I can also reproduce this.
Comment 2 Martin Flöser 2014-08-11 07:27:32 UTC
what about restarting KWin instead of just changing the type in the configuration?
Comment 3 Nikita Skovoroda 2014-08-11 07:46:21 UTC
Created attachment 88213 [details]
attachment-4738-0.html

There are still glitches after restarting kwin with EGL, I verified that
before posting a bug report.
Comment 4 Thomas Lübking 2014-08-11 11:06:09 UTC
Does 5.0.0 already have the strict binding "fix" for intel?

kwriteconfig5 --file kwinrc --group Compositing --key GLStrictBinding true
Comment 5 Nikita Skovoroda 2014-08-11 12:01:28 UTC
Created attachment 88216 [details]
attachment-15573-0.html

Does not help.
EGL + OpenGL 2.0/3.1 — glitches.
GLX + OpenGL 2.0/3.1 — no glitches.

And yes, I re-launching kwin after applying that setting.
Comment 6 Nikita Skovoroda 2014-08-12 10:38:47 UTC
s/re-launching/re-launched/
Comment 7 Thomas Lübking 2015-02-10 21:05:02 UTC
*** Bug 343712 has been marked as a duplicate of this bug. ***
Comment 8 Roberth Sjonøy 2015-10-14 13:22:59 UTC
When I open up the menu and for example move the cursor over the shortcuts under favourites, the marker indicating which shortcut my cursor is over doesn't always follow and stays on the last shortcut, is this cause by the same issue?
Comment 9 Roberth Sjonøy 2015-10-14 13:24:20 UTC
Oh nevermind, yes I just saw the duplicate bug which described exactly what I was experiencing.
Comment 10 Martin Kostolný 2015-11-08 02:09:46 UTC
I just tried to enable DRI3 and these issues with EGL just went away. The test with brightness notification started to work OK. Moving cursor over menu entries in kicker works like in GLX and panel stopped flickering. So far no problems attached. If I meet some I'll report. Please try to enable the DRI3 in xorg conf:
Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "DRI"    "3"
EndSection
Comment 11 Thomas Lübking 2015-11-10 19:43:50 UTC
*** Bug 352427 has been marked as a duplicate of this bug. ***
Comment 12 Thomas Lübking 2015-11-10 19:44:12 UTC
*** Bug 347507 has been marked as a duplicate of this bug. ***
Comment 13 Thomas Lübking 2015-11-12 21:30:42 UTC
*** Bug 355246 has been marked as a duplicate of this bug. ***
Comment 14 Thomas Lübking 2015-12-04 20:55:32 UTC
*** Bug 356263 has been marked as a duplicate of this bug. ***
Comment 15 Thomas Lübking 2016-03-15 11:07:45 UTC
*** Bug 360550 has been marked as a duplicate of this bug. ***
Comment 16 Roberth Sjonøy 2016-04-23 05:28:12 UTC
Using dri3 is a terrible sollution, dri3 just introduces a lot more bugs everywhere.
Comment 17 Thomas Lübking 2016-04-23 05:42:57 UTC
The "solution" is to use GLX - notably if the EGL implementation of the driver is too buggy in every configuration.
And coplaining about the driver *here* is completely pointless, try here:
https://bugs.freedesktop.org/buglist.cgi?component=EGL&product=Mesa
Comment 18 Thomas Lübking 2016-05-21 07:37:46 UTC
*** Bug 363350 has been marked as a duplicate of this bug. ***
Comment 19 Nikita Skovoroda 2016-07-08 21:32:30 UTC
Just another bit of information to anyone interested: I and other people that I know have observed various issues go away after just uninstalling xf86-video-intel and letting the x server use the built-in generic modesetting driver. Btw, that doesn't induce any observable performance hit for me.

For anyone using xf86-video-intel (with recent Xorg versions) and having any graphical issues, I can certainly recommend uninstalling xf86-video-intel, restarting X, and checking if those issues go away.

Btw, I can't reproduce this specific issue with EGL now.