Desktop effects are slow and desktop corruption using mesa 9

Bug #1061073 reported by Stefan Freyr
182
This bug affects 32 people
Affects Status Importance Assigned to Milestone
KDE Base Workspace
Fix Released
High
Mesa
Won't Fix
High
kde-workspace (Ubuntu)
Fix Released
High
Unassigned
mesa (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

I have Kubuntu 12.10 set up on a ThinkPad T430.

I'm experiencing both desktop corruption and slow performance of desktop effects. I've tried to downgrade mesa to 8.0.4 and that fixed the problem.

Attached is a video comparing the two. The video does not show the desktop corruption I mention (vertical lines appearing) but I will attach a screenshot of that.

I originally thought this was related to bug 1042211 but they told me to file another report since it seems to be different artifacts that I'm seeing.

Of course I can't say for sure whether the slow performance and the artifacts are due to the same problem but the artifacts seem to appear when the desktop effects are activated. As you can see in the video, mesa 9.0 displays much "jerkier" effects and it seems that when the artifacts come this jerking becomes really bad just before the artifacts appear. Just now I did notice that the artifacts appeared at the mouse pointer when I clicked in a window. The artifacts followed the mouse pointer as I moved it but after clicking a few times they disappeared.

WORKAROUND:
As described in bug 1042211 I downloaded the 8.0.4 version of mesa from https://launchpad.net/ubuntu/+source/mesa/8.0.4-1ubuntu1. This fixed the problem for me.

Since it took a little while for me to figure out how to get the .deb packages from that page, here is how for anyone who wants to try:
1) Go to the above page.
2) Under "Builds" select your architecture
3) This will bring you to a page with all the .deb files for your architecture. I only installed the libgl1-mesa-dri, libgl1-mesa-glx, libglapi-mesa and libglu1-mesa packages.

Please let me know if you need more information.

p.s. I had some problems choosing the package for this bug. It wouldn't let me put it on libgl1-mesa so I put it on libgl1-mesa-dri.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: xorg 1:7.7+1ubuntu4
ProcVersionSignature: Ubuntu 3.5.0-16.25-generic 3.5.4
Uname: Linux 3.5.0-16-generic x86_64
ApportVersion: 2.6.1-0ubuntu1
Architecture: amd64
Date: Wed Oct 3 15:40:20 2012
InstallationMedia: Kubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120905)
ProcEnviron:
 LANGUAGE=
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: xorg
Symptom: display
UpgradeStatus: No upgrade log present (probably fresh install)
---
ApportVersion: 2.6.1-0ubuntu1
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: kwin
DistUpgraded: Fresh install
DistroCodename: quantal
DistroRelease: Ubuntu 12.10
DistroVariant: kubuntu
DkmsStatus: virtualbox, 4.1.18, 3.5.0-16-generic, x86_64: installed
ExtraDebuggingInterest: I just need to know a workaround
GraphicsCard:
 Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:21f3]
InstallationMedia: Kubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120905)
MachineType: LENOVO 2347W2U
Package: mesa (not installed)
ProcEnviron:
 LANGUAGE=
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-16-generic root=UUID=c8916e6c-a99f-43f1-9d8c-c1daf21fedac ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.5.0-16.25-generic 3.5.4
Tags: quantal kubuntu
Uname: Linux 3.5.0-16-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 05/25/2012
dmi.bios.vendor: LENOVO
dmi.bios.version: G1ET41WW (1.16 )
dmi.board.asset.tag: Not Available
dmi.board.name: 2347W2U
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvrG1ET41WW(1.16):bd05/25/2012:svnLENOVO:pn2347W2U:pvrThinkPadT430:rvnLENOVO:rn2347W2U:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 2347W2U
dmi.product.version: ThinkPad T430
dmi.sys.vendor: LENOVO
version.compiz: compiz N/A
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.39-0ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 9.0~git20120917.7cfd42ce-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 9.0~git20120917.7cfd42ce-0ubuntu3
version.xserver-xorg-core: xserver-xorg-core 2:1.13.0-0ubuntu5
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.3-0ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.99.99~git20120913.8637f772-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.20.9-0ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.2-0ubuntu2

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :
Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

The video doesn't seem to have been uploaded. Here it is.

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

and here is a screenshot of the artifacts I'm seeing every once in a while.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

please install xdiagnose, and run 'apport-collect 1061073'

affects: xorg (Ubuntu) → mesa (Ubuntu)
Changed in mesa (Ubuntu):
status: New → Incomplete
Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

Hi and thanks for the reply.

I installed xdiagnose, python-apport and python-launchpadlib but when I run 'apport-collect 1061073' I answer a series of questions but at the end when I press the 'Send' button I get this error:

stefan@atlas-stfs:~$ apport-collect 1061073
dpkg-query: no packages found matching mesa
Traceback (most recent call last):
  File "/usr/share/apport/apport-kde", line 519, in <module>
    sys.exit(UserInterface.run_argv())
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 634, in run_argv
    return self.run_update_report()
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 554, in run_update_report
    attachment_comment='apport information')
  File "/usr/lib/python2.7/dist-packages/apport/crashdb_impl/launchpad.py", line 358, in update
    report.write_mime(mime, skip_keys=skip_keys)
  File "/usr/lib/python2.7/dist-packages/problem_report.py", line 504, in write_mime
    attach_value = CompressedValue(v, k).gzipvalue
  File "/usr/lib/python2.7/dist-packages/problem_report.py", line 44, in __init__
    self.set_value(value)
  File "/usr/lib/python2.7/dist-packages/problem_report.py", line 50, in set_value
    gzip.GzipFile(self.name, mode='wb', fileobj=out).write(value)
  File "/usr/lib/python2.7/gzip.py", line 131, in __init__
    self._write_gzip_header()
  File "/usr/lib/python2.7/gzip.py", line 176, in _write_gzip_header
    self.fileobj.write(fname + '\000')
TypeError: 'unicode' does not have the buffer interface

tags: added: apport-collected
description: updated
Revision history for this message
Stefan Freyr (stefan-freyr) wrote : BootDmesg.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : BootLog.gz

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : DpkgLog.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : LightdmDisplayLog.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : LightdmGreeterLog.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : LightdmGreeterLogOld.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : LightdmLog.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : Lspci.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : Lsusb.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : ProcModules.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : UdevDb.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : UdevLog.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : XorgLog.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : XorgLogOld.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : Xrandr.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote : xdpyinfo.txt

apport information

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

Ok, I solved it by following the instructions in bug 1030483.

Revision history for this message
stefan (weigi) wrote :

i see the same behavior (slowness, artifacts). moreover, when using "kwin_gles" instead of "kwin" the screen does not seem to be re-drawn correctly. for example, invoking the "run command interface" starts to show it but does not finish the animation. the result is that you type but don't see what you type.
finally, turning off "use opengl 2 shaders" in the effects-config doesn't change anything either (neither for "kwin_gles" nor "kwin").

i hope this helps in some way to narrow down the issue.

Revision history for this message
In , xzell (davide-marcelli) wrote :

Kwin with opengles and the latest mesa version (9.0) is very slow, few applications don't appears on desktop (like krunner), drop-donw menu are difficult to open, the window decorators are all a glitch, same for the resize.

Reproducible: Always

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

would you mind providing some relevant data like the output of
qdbus org.kde.kwin /KWin supportInformation
;-)

if just a mesa ungrade got you trouble, this is however likely a mesa or configuration issue (like you're suddenly running on llvmpipe or so)

Revision history for this message
In , Mgraesslin (mgraesslin) wrote :

(In reply to comment #1)
> (like you're suddenly running on llvmpipe or so)
which is quite likely as the code in 4.9 IIRC would happily accept running on llvmpipe for GLES.

Revision history for this message
In , xzell (davide-marcelli) wrote :
Download full text (4.2 KiB)

(In reply to comment #1)
> would you mind providing some relevant data like the output of
> qdbus org.kde.kwin /KWin supportInformation
> ;-)
>
> if just a mesa ungrade got you trouble, this is however likely a mesa or
> configuration issue (like you're suddenly running on llvmpipe or so)

Options
=======
focusPolicy: 0
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
tiling: false
tilingLayout: 1
tilingRaisePolicy: 0
separateScreenFocus: false
activeMouseScreen: 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
electricBorders: true
electricBorderDelay: 0
electricBorderCooldown: 350
electricBorderPushbackPixels: 1
electricBorderMaximize: true
electricBorderTiling: true
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
unredirectFullscreen: true
glSmoothScale: 2
glVSync: true
xrenderSmoothScale: false
maxFpsInterval: 17
refreshRate: 0
vBlankTime: 6144
glDirect: true
glStrictBinding: true
glStrictBindingFollowsDriver: true

Compositing
===========
Qt Graphics System: native
Compositing is active
Compositing Type: OpenGL ES 2.0
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
OpenGL version string: OpenGL ES 2.0 Mesa 9.0
Driver: Intel
GPU class: SandyBridge
OpenGL version: 2.0
Mesa version: 9.0
X server version: 1.13
Linux kernel version: 3.5.6
Direct rendering: yes
Requires strict binding: no
GLSL shaders: yes
Texture NPOT support: yes
OpenGL 2 Shaders are used

Loaded Effects:
---------------
kwin4_effect_zoom
kwin4_effect_login
kwin4_effect_slidingpopups
kwin4_effect_minimizeanimation
kwin4_effect_translucency
kwin4_effect_screenshot
kwin4_effect_slide
kwin4_effect_slideback
kwin4_effect_desktopgrid
kwin4_effect_fade
kwin4_effect_dialogparent
kwin4_effect_highlightwindow
kwin4_effect_taskbarthumbnail
kwin4_effect_presentwindows
kwin4_effect_blur
kwin4_effect_logout
kwin4_effect_dashboard
kwin4_effect_outline
kwin4_effect_startupfeedback

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

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

kwin4_effect_login:
fadeToBlack: false

kwin4_effect_slidingpopups:
fadeInTime: 250
fadeOutTime: 250

k...

Read more...

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

Try to disable the blur effect, if that helps, lower the blur radius.
If at a certain point there's a significant performace boost, that's it.

(I think GLES just guesses the capabilities, does it?)

Revision history for this message
In , xzell (davide-marcelli) wrote :

(In reply to comment #4)
> Try to disable the blur effect, if that helps, lower the blur radius.
> If at a certain point there's a significant performace boost, that's it.
>
> (I think GLES just guesses the capabilities, does it?)

No, the problem it isn't the blur.

Revision history for this message
In , Mgraesslin (mgraesslin) wrote :

(In reply to comment #4)
> (I think GLES just guesses the capabilities, does it?)
for SandyBridge it should not make any difference at all.

Does the problem go away when switching from GLES to normal GL? The EGL backend is not yet as good as the GLX one, e.g. doesn't provide vsync.

Revision history for this message
In , xzell (davide-marcelli) wrote :

(In reply to comment #6)
> (In reply to comment #4)
> > (I think GLES just guesses the capabilities, does it?)
> for SandyBridge it should not make any difference at all.
>
> Does the problem go away when switching from GLES to normal GL? The EGL
> backend is not yet as good as the GLX one, e.g. doesn't provide vsync.

Yes, all normal with the GL.

Revision history for this message
In , ValdikSS (valdikss) wrote :

I use kwin with just gl and not gles, and I experience some performance issues with new mesa 9.0. But it's just a performance issues without any glitches and so. I think that's a vsync issue. Downgrading to mesa 8.0.4 fixes that.

Lenovo X220, Intel HD3000, KDE 4.9.2, ArchLinux.

Revision history for this message
In , valdikss (valdikss1) wrote :

Hello!
I'm using Intel HD3000, KDE 4.9.2, Mesa 9.0 and it's much slower than with mesa 8.0.4 in KWin with OpenGL backend and with VSync enabled, and you can see tearing. Not sure if this mesa or kwin bug.

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

(In reply to comment #8)
> I think that's a vsync issue.
Double sync? (you'd get 30FPS with the show fps plugin)

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

Why is this still incomplete?

Revision history for this message
In , ValdikSS (valdikss) wrote :

http://www.youtube.com/watch?v=o7Elvm1FMNw
FPS drops down to 45-50 fps even without vsync. BTW no fps drop when recording in recordmydesktop.

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

No double sync then, might be related to relaxed feature limitations (check the impact of blurring and "accurate" scaling) then - also rather don't use OpenGL 2 shaders with GMA < 965, the FFP performs better (at least did so here)

Also check your Xorg log whether you might have dropped from SNA to UXA or so.

Revision history for this message
In , ValdikSS (valdikss) wrote :

It doesn't matter SNA or UXA, it lags on both.
With 8.0.4 I get 60 constant fps. Will update and reboot again now.

Revision history for this message
In , ValdikSS (valdikss) wrote :

Well, yes, I get 60 fps with blur disabled. But I desync lower than with mesa 8.0.4. I mean, on intel 3000 with RC6 enabled you get desync on almost top of the screen and with mesa 9.0 it's almost in the senter of the screen.

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

(In reply to comment #13)
> Well, yes, I get 60 fps with blur disabled.

Sounds like the troublemaker, try lowering the blur strength.

> But I desync lower than with
> mesa 8.0.4. I mean, on intel 3000 with RC6 enabled you get desync on almost
> top of the screen and with mesa 9.0 it's almost in the senter of the screen.
I don't understand that.
If you're talking about vsync, the idea is to have no break at all (the buffer should be changed while the screen takes a short break)

If you have a tear line despite vsync is enabled, that means that it doesn't really work - and if the tearline shifts with the version that very likely means that the subbuffy copy can not be performed during the retrace and the only working approach is a buffer swap, see bug #307965

Revision history for this message
In , ValdikSS (valdikss) wrote :

This type of tearing is typical for Intel HD3000. There is no way (I don't know any) to bypass it in KWin, but it can be bypassed in GNOME with some Clutter parameters.
So, there is a tear line in 8.0.4, but it's on the almost top of the screen, and with 9.0 it is much lower, almost in the center.

And I got another bug, just restored minimized window of opera browser and it didn't repaint anything. I have clicked on some tabs and nothing happened, minimized and restored again and it was on that tab that I clicked last. It never happened on 8.0.4.

Revision history for this message
In , ValdikSS (valdikss) wrote :

Screw that, switching mplayer from windowed to fullscreen mode fully hang my video adapter. I'm downgrading to 8.0.4

Revision history for this message
In , Brian-m-hill (brian-m-hill) wrote :

I'm getting this as well.

Arch Linux
Intel HD Graphics 3000
KDE 4.9.2
MESA 9.0

The tearing seems to occur only in one area, about 1/5th of the way down the screen. It is as if the first 5th of the screen is updating slower. Downgrading Intel-DRI and libgl to 8.0.4 fixed the issue.

Tried TearFree option in Xorg.conf and that gets rid of the tearing but makes the graphics unusably slow using KWin/OpenGL.

Revision history for this message
In , Benoit-gouhier (benoit-gouhier) wrote :

I am getting this too, both with intel Sandy Bridge and radeon Xpress200m, with free drivers.
They both use mesa 9.0 and kde 4.9.2, and the tearing happens in the top and bottom 1/5th parts of the screen.

Going back to 8.0.4 solves the issue.

Revision history for this message
In , Dwyer-g (dwyer-g) wrote :

Same problem with i7-3520M HD4000 graphics: Thinkpad X230

Archlinux x86_64
Intel HD4000
KDE 4.9.2 _OpenGL
MESA 9.0

Kernels tried:
3.5.6-1-grsec
3.6.1-2-grsec

And Arch default kernel
3.5.6-1-ARCH

Same tearing about 1/5th of the way down the screen, Arrifacts on screen, and slow.

At first I did just try downgrading xf86-video-intel, but still broken. Then I whent fullboar and downgraded all of it to fix it.

[2012-10-14 16:25] upgraded libglapi (8.0.4-3 -> 8.0.4-3)
[2012-10-14 16:25] upgraded libgl (9.0-1 -> 8.0.4-3)
[2012-10-14 16:25] upgraded mesa (9.0-1 -> 8.0.4-3)
[2012-10-14 16:25] upgraded freeglut (2.8.0-2 -> 2.8.0-1)
[2012-10-14 16:25] upgraded ftgl (2.1.3rc5-4 -> 2.1.3rc5-3)
[2012-10-14 16:25] upgraded gegl (0.2.0-4 -> 0.2.0-3)
[2012-10-14 16:25] upgraded glew (1.8.0-2 -> 1.8.0-1)
[2012-10-14 16:25] upgraded gtkglext (1.2.0-8 -> 1.2.0-7)
[2012-10-14 16:25] upgraded jasper (1.900.1-8 -> 1.900.1-7)
[2012-10-14 16:25] upgraded intel-dri (9.0-1 -> 8.0.4-3)
[2012-10-14 16:25] upgraded libgles (9.0-1 -> 8.0.4-3)
[2012-10-14 16:25] upgraded libgbm (9.0-1 -> 8.0.4-3)
[2012-10-14 16:25] upgraded libegl (9.0-1 -> 8.0.4-3)
[2012-10-14 16:25] upgraded lib32-libglapi (9.0-1 -> 8.0.4-4)
[2012-10-14 16:25] upgraded lib32-libgl (9.0-1 -> 8.0.4-4)
[2012-10-14 16:25] upgraded lib32-intel-dri (9.0-1 -> 8.0.4-4)
[2012-10-14 16:25] upgraded xf86-input-evdev (2.7.3-2 -> 2.7.3-1)
[2012-10-14 16:25] upgraded xf86-input-synaptics (1.6.2-2 -> 1.6.2-1)
[2012-10-14 16:25] upgraded xf86-video-intel (2.20.9-2 -> 2.20.9-1)
[2012-10-14 16:25] upgraded xorg-server-common (1.13.0-2 -> 1.12.4-1)
[2012-10-14 16:25] upgraded xorg-server (1.13.0-2 -> 1.12.4-1)

Revision history for this message
In , Tureba (tureba) wrote :

I got similar specs: Intel SandyBridge HD 3000, KDE 4.9.2, Mesa 9.0, KWin on OpenGL with VSync, in Exherbo Linux.

But I _do not_ see the problem. I suppose whatever is different between our systems must be the source of the problem. What else can we compare?

Revision history for this message
In , Dwyer-g (dwyer-g) wrote :

Hum, well I am using "uxa". sna was crashing for me on the original install about a month or so ago. I'll try sna again..

Section "Device"
   Identifier "Intel Graphics"
   Driver "intel"
   #Option "AccelMethod" "sna"
   Option "AccelMethod" "uxa"
EndSection

Revision history for this message
In , ctarwater (ctarwater) wrote :

I'm experiencing the same issue here. Here's my specs:
Up to date Arch Linux

Asus U43F-BBA6 laptop
Intel HD Graphics / 4300

KDE 4.9.2
Mesa 9.0
Intel SNA

Changing to Xrender from OpenGL was the only way I could fix the issue.

Revision history for this message
In , Ezio Vergine (virgolus) wrote :

I've an intel 17 cpu (grapichs HD3000) and with mesa 9 I have a big performance loss. Kwin_gles is totally corrupted (continuous repainting problem). With standard kwin the present window work very bad bat If I disable blur effect, the problem is resolved.
Downgraded to mesa 8 and now kwin is fast as light.

Revision history for this message
In , Tureba (tureba) wrote :

I'm on SNA as well. How about comparing the ./configure options?

For Mesa 9.0:
./configure --prefix=/usr --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --docdir=/usr/share/doc/mesa-9.0 --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --enable-fast-install --libdir=/usr/lib64 --with-egl-platforms=x11,drm --enable-dri --enable-glx --enable-gles1 --enable-gles2 --enable-glx-tls --enable-egl --disable-va --enable-64-bit --enable-gallium-llvm --enable-texture-float --disable-vdpau --enable-xorg --disable-xvmc --disable-gallium-g3dvl --with-dri-drivers=swrast,i915,i965,intel --with-gallium-drivers=i915 --enable-gallium-egl --enable-openvg --enable-gbm --enable-shared-glapi --disable-opencl --enable-gallium-gbm --disable-gallium-g3dvl --with-dri-drivers=swrast,i915,i965,intel --with-gallium-drivers=i915 --enable-gallium-egl --enable-openvg --enable-gbm --enable-shared-glapi --disable-opencl --enable-gallium-gbm

For xf86-video-intel 2.20.10:
./configure --prefix=/usr --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --docdir=/usr/share/doc/xf86-video-intel-2.20.10 --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --enable-fast-install --libdir=/usr/lib64 --enable-dri --enable-xvmc --disable-dga --disable-xaa --enable-udev --disable-uxa --enable-sna --disable-debug

Revision history for this message
In , valdikss (valdikss1) wrote :

(In reply to comment #7)
    COMMONOPTS="--prefix=/usr \
    --sysconfdir=/etc \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast \
    --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
    --enable-gallium-llvm \
    --enable-egl \
    --enable-gallium-egl \
    --with-egl-platforms=x11,drm \
    --enable-shared-glapi \
    --enable-gbm \
    --enable-glx-tls \
    --enable-dri \
    --enable-glx \
    --enable-osmesa \
    --enable-gles1 \
    --enable-gles2 \
    --enable-texture-float \
    --enable-xa \
    --enable-vdpau "

This bug doesn't depend on xf86-video-intel.

Revision history for this message
In , Tureba (tureba) wrote :

Perhaps, but SNA was mentioned and I only found it on xf86-video-intel.

I must say I do experience problems with this setup - just not the 1/5th screen tearing or the slowdown. One of the problems - random X freezes and I have to SysReq my way out of X - disappears when I disable vdpau and xvmc on Mesa (xvmc is still enabled in xf86-video-intel, though). And the other is glitches after suspend/wakeup, but similar glitches happen to the audio, so it probably has nothing to do with the subject.

Revision history for this message
In , RussianNeuroMancer (russianneuromancer) wrote :

> Kwin_gles is totally corrupted (continuous repainting problem).
Looks like Mesa issue: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1065125

Robert Hooker (sarvatt)
Changed in mesa (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
In , Stefan Freyr (stefan-freyr) wrote :

I also have this problem on Kubuntu 12.10.

I filed a bug on launchpad which just got connected with this bug.
https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/1061073

Revision history for this message
In , Flateric (flateric) wrote :

Same problems with radeon driver (GPU: ATI Mobility Radeon x1400)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kde-workspace (Ubuntu):
status: New → Confirmed
Revision history for this message
Robert Hooker (sarvatt) wrote :

Can you try a few of these downgrades and report back on if they are working or not?

First, kde-workspace downgrade to 4.9.0, it was updated to 4.9.2 in the same timeframe as final mesa 9.0 and was a pretty large change from a glance.
https://launchpad.net/ubuntu/quantal/+source/kde-workspace/4:4.9.0-0ubuntu4

If that doesn't work, upgrade it back to kde-workspace 4.9.2, then try downgrading to each of these snapshots of mesa 9.0 and see if they are any better so we can narrow down where the problem was introduced.
https://launchpad.net/ubuntu/quantal/+source/mesa/9.0~git20121004.b2048c5e-0ubuntu1
https://launchpad.net/ubuntu/quantal/+source/mesa/9.0~git20120917.7cfd42ce-0ubuntu3
https://launchpad.net/ubuntu/quantal/+source/mesa/9.0~git20120903.e1673d20.is.git20120821.c1114c61-0ubuntu1

Revision history for this message
In , Gannet (ken20001) wrote :

Of course with Radeon is the same problem. I have Radeon HD 2600 XT card.

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

launchpad bug also mentions nouveau, either the bug is in MESA or the interpretation of EGL/GLES has been changed.

arch bug on kwin:
https://bugs.archlinux.org/task/31956?project=1&order=id&sort=desc
(the screenshot there has the white lines like in bug #308245 which also mentions it's regardless of the compositor.

arch bug on chromium/gtk
https://bugs.archlinux.org/task/31915?project=1&openedfrom=-1+week

Revision history for this message
In , Mgraesslin (mgraesslin) wrote :

(In reply to comment #21)
> launchpad bug also mentions nouveau, either the bug is in MESA or the
> interpretation of EGL/GLES has been changed.
I yesterday installed Kubuntu 12.10 on an USB stick and tried current master in OpenGL+EGL mode on my Intel hardware. It showed the same behavior and my guess it that it picks the wrong EGL driver.

So if anyone wants to play with it: try some of the environment variables listed in http://www.mesa3d.org/egl.html

With Mesa 8 the gallium driver is chosen

Revision history for this message
In , Aitor Pazos (aitorpazos) wrote :

Created attachment 74610
kwin_gles repainting bug

Posting a screenshot to shows the glitches

Revision history for this message
Rich Sezov (sezovr) wrote :

I've gotten this problem to mostly go away (see my post here: http://www.kubuntuforums.net/showthread.php?60502-Screen-artifacts-Intel-video) by changing Qt Graphics System to Render in System Settings -> Desktop Effects.

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

That doesn't solve the problem... it just bypasses it. Besides, using XRender disables most of the desktop effect goodies.

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

Ok, so this doesn't seem to be that simple really.

First of all, mostly for my own referencing in the future let me describe what I did exactly.

To upgrade kde-workspace:

1) Downloaded all of the .deb files from the link above with the following command:
wget -r -A.deb --no-directories https://launchpad.net/ubuntu/+source/kde-workspace/4:4.9.0-0ubuntu4/+build/3762859

2) Ran the following script to install only the packages that are already installed on my system:
pl= ; for a in *.deb ; do p=$(dpkg-deb --info $a | sed -n 's/Package: \(\S*\)/\1/p') ; i=$(dpkg -s $p 2>/dev/null |grep Status) ; pl="$pl $a" ; done ; sudo dpkg -i $pl

This resulted in some errors. The full output is here (http://paste.ubuntu.com/1285546/) but in short the errors were some missing dependencies that I could get around by installing the packages needed (a bit weird though why the dependency changed but that's a different conversation).

But after installing the needed packages, I'm getting a version conflict for kde-workspace-data. It turns out that there is no 4.9.0 package for that for some reason and kde-workspace-bin cannot be installed because of that. Can anyone tell me where I could get my hands on kde-workspace-data_4.9.0-0ubuntu4_amd64.deb?

Revision history for this message
Rich Sezov (sezovr) wrote :

I left OpenGL enabled, and only changed the Qt Graphics Subsystem. All my desktop goodies are in place, so far.

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

Ahh.. so you mean you changed that from "Native" to "Raster"? (not Render)

Revision history for this message
Rich Sezov (sezovr) wrote :

Just so you know, I'm not trying to take away from the real (and hard) work you're doing on this issue: it is a bug, plain and simple, and it needs to be fixed. I'm just offering a workaround for those of us who may have installed the beta on our main machines, since we were so close to the release. :-)

My effects are still slow, but the glitchy windows aren't preventing me from getting work done anymore. Very much looking forward to the proper resolution of this issue, and I wish I knew more about KDE development so that I could be of help. Thanks for your efforts!

Revision history for this message
Rich Sezov (sezovr) wrote :

Did I say Render (yes I did)? Yes, I meant Raster. That seems to have at least gotten rid of the screen corruption, though the effects are still slow.

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

Ok so I managed to get through my dependency woes. I figured out that there are two packages that are architecture agnostic and those .deb files are only on the i386 files so I got the kde-workspace and kde-workspace-data .deb files from there and all is now good.

So now I have kde-workspace 4.9.0 and mesa 9.0 installed and I can verify that the desktop effects are still very slow. I haven't seen the rendering artifacts (the white lines as in the screenshot attached to this bug) however but those appear sporadically so I can't say for sure that they're gone or whether they just haven't appeared for me.

I will take a look at downgrading mesa step by step next. Will report back.

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

I installed Mesa 9.0 20120903 from https://launchpad.net/ubuntu/quantal/+source/mesa/9.0~git20120903.e1673d20.is.git20120821.c1114c61-0ubuntu1 and I experience the same slowness and artifacts on that.

So I won't try the other git snapshots since the bug was clearly introduced before 03.09.2012.

Revision history for this message
In , Stefan Freyr (stefan-freyr) wrote :

I'm having this problem on Kubuntu 12.10 and reported it on launchpad. There is some troubleshooting there (I tried different versions of mesa etc):
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1061073

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

There is a bug report on this in the KDE bug tracker as well:
https://bugs.kde.org/show_bug.cgi?id=308385

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :
Revision history for this message
In , stefan (weigi) wrote :

(In reply to comment #22)
> (In reply to comment #21)
> > launchpad bug also mentions nouveau, either the bug is in MESA or the
> > interpretation of EGL/GLES has been changed.
> I yesterday installed Kubuntu 12.10 on an USB stick and tried current master
> in OpenGL+EGL mode on my Intel hardware. It showed the same behavior and my
> guess it that it picks the wrong EGL driver.
>
> So if anyone wants to play with it: try some of the environment variables
> listed in http://www.mesa3d.org/egl.html
>
> With Mesa 8 the gallium driver is chosen

i tried exporting EGL_DRIVER to gallium in my bashrc and restarted the machine. i tried both, kwin and kwin_gles and they show the same glitches. but maybe i tested it wrong?

Revision history for this message
In , Wojtask9 (wojtask9) wrote :

*** Bug 55856 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

*** Bug 308649 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dwyer-g (dwyer-g) wrote :

Okay, I just did a full upgrade to my

Arch Linux x86_64
Kernel 3.6.2-grsec
Intel HD4000
KDE4 with OpenGL (no problem with XRender)

System. horable Artifacts, Tarring, and slow.

Then I down graded only these three packages. Now I still have Tarring. However, it fixed the Artifacts problem and the desktop seems fast again.

libglapi (9.0-1 -> 8.0.4-3)
libgl (9.0-1 -> 8.0.4-3)
intel-dri (9.0-1 -> 8.0.4-3)

Revision history for this message
In , Dwyer-g (dwyer-g) wrote :

I tried downgrading to:

mesa-8.0.4-3
ftgl-2.1.3rc5-3
glew-1.8.0-1
gtkglext-1.2.0-7
jasper-1.900.1-7

And removeing the new package glu-9.0.0-1

However, this seemed to have not effect. I have upgraded back to mesa-9 and stuff, becuause the downgrade did not fix the Tarring.

One other thing that has changed after the downgrade of:

libglapi (9.0-1 -> 8.0.4-3)
libgl (9.0-1 -> 8.0.4-3)
intel-dri (9.0-1 -> 8.0.4-3)

Is that now the Tarring line is not staying at 1/5th the way down the screen. Instead now the Tarring line slowly starts at the bottom of the screen and moves to the top, then starts at the bottom again.

Revision history for this message
Thiago Martins (tcmartins) wrote :

Same issues here, corruption and slowness on kwin with an Intel 3rd gen gpu (HD4000?)l As suggested in the original post, I downgraded to mesa 8.0.4 and now kwin is again rendering at 60fps with no corruption.

Changed in kdebase-workspace:
importance: Unknown → High
status: Unknown → New
Revision history for this message
Rich Sezov (sezovr) wrote :

Possible newbie question: how did you downgrade to Mesa 8.0.4? I've been looking for a PPA, but haven't found one. Should I grab the ones from the Precise repository?

Revision history for this message
Rob Hasselbaum (rhasselbaum) wrote :

Caution: Downgrading Mesa to 8.0.4 as described in the original bug report does not play well with Bumblebee (NVIDIA Optimus support). When I first downgraded, everything worked fine: no corruption, fast performance. But after installing Bumblebee, I lost desktop effects. I also tried Ubuntu (Unity) 12.10 and noticed problems there, too, although not as bad as KDE. Some windows didn't render completely.

The only thing that made my system whole again was to revert to Kubuntu 12.04.

Revision history for this message
Thiago Martins (tcmartins) wrote :

@Rob: Aw snap! Guess what I was just about to do? Well, that's a serious no-go for me, but since I still want to give 12.10 a chance, I'll go on installing bumblebee anyway... Most likely that's the last thing I'll do on 12.10. I will report soon.

Revision history for this message
Thiago Martins (tcmartins) wrote :

@Rob: Ok, so I'm back from rebooting after bumblebee install and I report no corruption nor frame rate reduction. optirun glxspheres is working flawlessly on my NVidia 650M at 220 fps (jpg transport)...

However...

I did install it through aptitude, which pointed that the recommended virtualgl-libs-ia32 (i386) was incompatible with the available versions of libgl1-mesa-glx:i386 (only version 9.0-0ubuntu1 is available here). As such, aptitude (rightfully) ignored this recommendation. Muon, on the other hand, *will* try to install virtualgl-libs-ia32, which I suppose will break the downgrade to mesa 8.0.4.

Now, what do I make of this? Well, for start, I fear my bumblebee install won't work with my wine games. I haven't tried it yet, but the lack of a 32 bits virtualgl lib is not looking promising. I will report on that soon.

Then, again, aptitude won't install the 32bits version of virtualgl for the lack of a 32bits version of libgl1-mesa-glx. Well, there's one build of such version on the very same repository pointed by the OP, under i386 builds! My next steps are:

- Find out if the lack of virtualgl-libs-ia32 is really problematic (i.e. wine gaming).
- Find out if I can install virtualgl-libs-32 using the i386 builds of mesa 8.0.4 from the repository of the OP.

Revision history for this message
Thiago Martins (tcmartins) wrote :

@Rob: Ok, as I guessed, wine wouldn't even install without virtualgl-libs-ia32 (on a unrelated note: aren't all *-ia32 libs deprecated in favor of multiarch?).

Fair enough, I downloaded the i386 versions of libgl1-mesa-dri, libgl1-mesa-glx, libglapi-mesa and libglu1-mesa packages and installed them with dpkg -i. Unsurprisingly, libgl1-mesa-* remained unconfigured due to unsatisfied dependencies. I ten fired aptitude, who promptly suggested the removal of the 3 libs. The very next suggestion was the installation of the missing dependencies. I installed them and now I have a working wine+bublebee combo. My packages are a bit of a mess now, though...

Changed in mesa:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
Rich Sezov (sezovr) wrote :

Okay, I got my machine working properly, but I had to go back to a 12.04-based distro (I used Netrunner). Here's how to get things working, without the trial and error that I went through.

1. Install the OS.
2. Disable Desktop effects, and install all patches.
3. Add the Bumblebee and x-swat PPAs. You have to do this because the latest NVidia drivers aren't in the 12.04 repos.
4. apt-get install bumblebee bumblebee-nvidia. This adds the latest NVidia driver to your machine. Unfortunately, it also installs the problematic Mesa 9 libraries. We will fix this in the next step. It's also important that you have desktop effects turned off. If they're still on when you reboot, you'll get really bad system locks. Once this is installed, reboot.
5. Video is configured correctly, but will have all kinds of problems if you enable desktop effects. To get everything working properly, you need to downgrade to Mesa 8.0.4. The following command will do that:

sudo apt-get install libglapi-mesa=8.0.4-0ubuntu0.1 libgl1-mesa-glx=8.0.4-0ubuntu0.1 ia32-libs=20090808ubuntu35 ia32-libs-multiarch:i386=20090808ubuntu35 libgl1-mesa-glx:i386=8.0.4-0ubuntu0.1 libglapi-mesa:i386=8.0.4-0ubuntu0.1 libglu1-mesa:i386=8.0.4-0ubuntu0.1 libgl1-mesa-dri=8.0.4-0ubuntu0.1

6. Reboot. When you log back in, hit Alt-Shift-F12 and test that desktop effects are working properly. If they are, you can enable them by default.

7. To prevent constant update notifications, I used ppa-purge to remove the x-swat PPA.

8. Add the kubuntu-backports PPA and install KDE 4.9.2, which is the same version of KDE that 12.10 has.

You now have a working system! No package mess, and you're running basically the same software. Since this seems to be a KDE bug, I'm not all that hopeful for a fix here; I'm betting it'll take another KDE release. So for the time being, I'm staying on this set up until either this bug is marked as fixed or the one from KDE is marked as fixed and there's a new release available.

I hope this helps somebody!

Revision history for this message
Thiago Martins (tcmartins) wrote :

@Rich: I'm not sure that's a KDE issue. It has been repported under Unity too. See post #43 above.

Revision history for this message
In , stefan (weigi) wrote :

hi,

what is the state on this bug? is it worth trying to downgrade mesa or will a fix be released soon? is it mesa's fault at all?

cheers

Revision history for this message
In , K6j-fdedria-zp0 (k6j-fdedria-zp0) wrote :

Someone who is able to reproduce the problem is going to have to bisect it so we can know which commit caused the regression.

Revision history for this message
In , Kenxeth (kenxeth) wrote :

Unfortunately, I can't seem to reproduce this: I also have KDE 4.9.2 and Mesa 9.0, but it appears to work fine for me.

Revision history for this message
In , Dwyer-g (dwyer-g) wrote :

I currently have a fully upto date Arch Linux x86_64 system with Intel HD4000

I am still at the state where I have to downgrade

libglapi (9.0-1 -> 8.0.4-3)
libgl (9.0-1 -> 8.0.4-3)
intel-dri (9.0-1 -> 8.0.4-3)

I leave mesa at 9.0.1. Downgrading Mesa dose not seem to help anything. However, when I upgrade these three packages I get artifacts.

I will not have time until Friday to work on the problem. What are the steps you would like me to take to bisect the problem?

Revision history for this message
avlas (avlas) wrote :

In my case mesa 9 is a mess only if using kwin_gles, if using kwin everything is in order

Revision history for this message
In , Wojtask9 (wojtask9) wrote :

(In reply to comment #16)
> Unfortunately, I can't seem to reproduce this: I also have KDE 4.9.2 and
> Mesa 9.0, but it appears to work fine for me.

My knowledge about mesa and opengl is very limited so sorry about my terminology.

To reproduce this bug you must use kwin_gles (http://blog.martin-graesslin.com/blog/2011/07/running-kwin-with-opengl-es-2-0/).
Using gentoo try set USE flags "gles -opengl" at kwin package.
With kwin default (i think it is call backend) opengl everything is ok.

Like I said in https://bugs.freedesktop.org/show_bug.cgi?id=55856 this not happen in mesa-9.0_pre20120918.

Until friday I'm not able to bisect mesa to find a commit that cause regression.
If nobody bisect mesa I will try.

Revision history for this message
In , Kenxeth (kenxeth) wrote :

Created attachment 69265
Bisect log (Kayden)

I managed to reproduce this after all.

Steps to reproduce:
1. Enable KWin's "Show FPS" counter plugin.
2. Configure the "Present Windows" effect to one of the screen corners.
3. Mash that repeatedly and watch the FPS counter.

On HD 4000, a good version of Mesa results in perhaps ~55-60 FPS. Bad Mesa can be as low as 17 FPS, often mid-30s.

I also went ahead and bisected it (the log is attached).

e943e5c291c5f4c017f9f5a483f1940313333fc3 is the first bad commit
commit e943e5c291c5f4c017f9f5a483f1940313333fc3
Author: Chad Versace <email address hidden>
Date: Thu Aug 2 17:13:17 2012 -0700

    intel: Advertise multisample DRI2 configs on gen >= 6

    This turns on window system MSAA.

So in other words, it looks like KDE is using multisampling now, whereas it didn't before. Our implementation of that may not be optimal, and may have bugs, but it will always be far slower than single sampling.

My next question would be: how can one disable the use of MSAA in KWin or Plasma? I don't see an option for that, but I would be really surprised if there wasn't one...

Revision history for this message
In , Wojtask9 (wojtask9) wrote :

> intel: Advertise multisample DRI2 configs on gen >= 6

i can reproduce this bug on Gen4 (Lenovo T61).

>Author: Chad Versace <email address hidden>
>Date: Thu Aug 2 17:13:17 2012 -0700

strange because on my system with mesa-9.0_pre20120918 everything is ok (3 times downgrade mesa to be sure on my system)

Revision history for this message
In , RussianNeuroMancer (russianneuromancer) wrote :

wojtek, your issue with GLES is also reproducible on nouveau and radeon drivers. Your issue is not duplicate of this bug.

Revision history for this message
Thiago Martins (tcmartins) wrote :

It seem to be an intel+mesa9 specific problem. And what about KDE? Can anyone confirm the rendering problems on Unity? And what about other distros? Who else is fielding mesa9 right now? It seems that both fedora and opensuse remain on 8.0.4. Heck, even Debian friggin' unstable is on 8.0.4.! Gentoo perhaps?

Revision history for this message
In , K6j-fdedria-zp0 (k6j-fdedria-zp0) wrote :

(In reply to comment #19)
> e943e5c291c5f4c017f9f5a483f1940313333fc3 is the first bad commit
> commit e943e5c291c5f4c017f9f5a483f1940313333fc3
> Author: Chad Versace <email address hidden>
> Date: Thu Aug 2 17:13:17 2012 -0700
>
> intel: Advertise multisample DRI2 configs on gen >= 6
>
> This turns on window system MSAA.
>
> So in other words, it looks like KDE is using multisampling now, whereas it
> didn't before. Our implementation of that may not be optimal, and may have
> bugs, but it will always be far slower than single sampling.
>
> My next question would be: how can one disable the use of MSAA in KWin or
> Plasma? I don't see an option for that, but I would be really surprised if
> there wasn't one...

The algorithm that chooses the FBConfig doesn't check the values of GLX_SAMPLES and GLX_SAMPLE_BUFFERS, so I guess it ends up picking an MSAA config purely by accident. That's something we'll have to fix in KWin.

But unfortunately that also means that there is no way to enable or disable the use of MSAA right now.

Revision history for this message
In , Kenxeth (kenxeth) wrote :

Ouch. Well...in that case, I'm not sure what to do on the Mesa side...perhaps a point release of KWin could fix this?

For what it's worth, KWin from git master has the slowdown with the GLX backend, but appears to work well with the EGL backend. I imagine that's because it uses eglChooseConfig, and doesn't request any samples, so Mesa gives it a proper non-MSAA config. It's just with GLX, where KWin rolls its own algorithm, that there's a problem.

Revision history for this message
In , stefan (weigi) wrote :

this bug has been bisected by someone on freedesktop.org: https://bugs.freedesktop.org/show_bug.cgi?id=55998#c19

Revision history for this message
In , RussianNeuroMancer (russianneuromancer) wrote :

Looks like slowdown is one issue (default MSAA only on Intel) but glitches with GLES is another issue (on all Mesa drivers). Only first one has been bisected.

Revision history for this message
Adam Lyall (magicmyth) wrote :

I was running 12.04 with the KDE 4.92 backports just fine. I decided to test out the latest Mesa using oibaf graphic drivers PPA which usually contains Mesa from master (9.1). After installing this I got the issue in this bug report. However, at the time I chalked it up to issues in the latest commits to master. I purged those drivers which made KWin work great again (Mesa 8.0.4) and decided to upgrade to 12.10 which brought with it Mesa 9.0 stable and the exact same issues I had with Mesa master.

Looking over the bug report it seems part of the issue stems from MSAA being used with KWin due to a mistake by an algorithm which the GLES version of Kwin does not do. I decided to test this and installed kde-window-manager-gles. Ran "kwin_gles --replace" and performance was massively improved. However I still have the screen corruptions plus the other re-draw errors mentioned about KWIN GLES.

Note I can still get some corruptions even with composite suspended as shown in the attached screen of krunner.

This is on a Lenovo x230t with a Intel HD4000 gpu from the i7-3520M

Revision history for this message
Rob Hasselbaum (rhasselbaum) wrote :

In response to comment 68: @Thiago, I see a similar problem in Unity, but not as bad as KDE. In Unity, some windows do not render completely (i.e. controls missing or cropped).

Revision history for this message
In , Rune-nr (rune-nr) wrote :

> The algorithm that chooses the FBConfig doesn't check the values of
> GLX_SAMPLES and GLX_SAMPLE_BUFFERS, so I guess it ends up picking an MSAA
> config purely by accident. That's something we'll have to fix in KWin.
>
> But unfortunately that also means that there is no way to enable or disable
> the use of MSAA right now.

Usually implementations choose the first config that matches its main criteria (just alpha, red, green, and blue for basic apps)

Are the MSAA configs at the top of the list?

The spec. has ordering rules for each attribute and the order for EGL_SAMPLES is accending...

Revision history for this message
In , K6j-fdedria-zp0 (k6j-fdedria-zp0) wrote :

I've pushed a patch to KWin that should fix the problem. The patch is in both master and the 4.9 branch, so you should see it in 4.9.3. That release will be tagged on Thursday.

@Rune: The GLX backend in KWin uses glXGetFBConfigs(), so the ordering rules in the spec don't apply here. I've thought about rewriting that code to use glXChooseFBConfig(), but I'm reluctant to touch working code without a good reason. This bug might be enough of a reason to do that though.

Revision history for this message
In , Mgraesslin (mgraesslin) wrote :

Git commit 6cf057777555a5d0c834de3a0165a62916cf3b40 by Fredrik Höglund.
Committed on 30/10/2012 at 18:20.
Pushed by fredrik into branch 'KDE/4.9'.

kwin/glx: Avoid MSAA configs in initBufferConfigs()

It appears that we're accidentally choosing an MSAA config with the
Intel driver in Mesa 9.0. So change the algorithm to take the values
of GLX_SAMPLES and GLX_SAMPLE_BUFFERS into account.

Found by Kenneth Graunke.

M +20 -1 kwin/scene_opengl_glx.cpp

http://commits.kde.org/kde-workspace/6cf057777555a5d0c834de3a0165a62916cf3b40

Revision history for this message
In , Kenxeth (kenxeth) wrote :

(In reply to comment #25)
> I've pushed a patch to KWin that should fix the problem. The patch is in
> both master and the 4.9 branch, so you should see it in 4.9.3. That release
> will be tagged on Thursday.

Thanks Fredrik! Based on that, I'm closing this as RESOLVED/NOTOURBUG.

> @Rune: The GLX backend in KWin uses glXGetFBConfigs(), so the ordering rules
> in the spec don't apply here. I've thought about rewriting that code to use
> glXChooseFBConfig(), but I'm reluctant to touch working code without a good
> reason. This bug might be enough of a reason to do that though.

@Rune: Feel free to double check by running glxinfo, but I believe the ordering is correct: multisample configs are always sorted later, as required.

Using glXChooseFBConfig() does seem like a good idea...could guard against future problems (though I don't know what), and should simplify the code a fair bit. Also, KWin's EGL backend uses eglChooseConfig() and it never had this problem. That would also make the GLX and EGL backends more similar.

Thanks again.

Revision history for this message
Adam Lyall (magicmyth) wrote :

The MSAA bug has been fixed in kwin:
https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/6cf057777555a5d0c834de3a0165a62916cf3b40

I just tested this patch directly by downloading the scene_opengl_glx.cpp, replaced the existing one in kde-workspace-4.9.2 deb source and compiling kwin. So far everything is now working perfectly again. If any one wants me to I can write a quick guide here on how to test yourself?

Revision history for this message
In , Adam Lyall (magicmyth) wrote :

Just thought I'd let you know I tested the patched scene_opengl_glx.cpp file with the existing Ubuntu deb source kde-workspace package and it has fixed the slow down and screen corruption issues for me. This is on a Lenovo x230 with an intel i7-3520M, Mesa 9.0, KDE Workspace 4.9.2.

Thanks.

Revision history for this message
In , Andrea Scarpino (bashlnx-deactivatedaccount-deactivatedaccount) wrote :

Patch applied in kdebase-workspace (Arch Linux), as RunetMember already said, I confirm that only the slow down has been fixed.

Revision history for this message
In , Adam Lyall (magicmyth) wrote :

Just to be clear. I was talking about the non-gles version of Kwin when testing. Don't know if a bug report should be created specifically for the MSAA bug which seems to be what caused the screen corruption as well as slowdown in kwin standard OpenGL.

Revision history for this message
In , ValdikSS (valdikss) wrote :

The slowdown gone, but I have screen freeze issue now. Like, the screen is not always updated and if you click somewhere you think nothing happened but if you minimize and restore window, you see that click worked.

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

I'm waiting eagerly for this patch to be applied to the Kubuntu package and will test as soon as I can get a package to install.

-Stefan Freyr.

Revision history for this message
Rohan Garg (rohangarg) wrote :
Revision history for this message
Rohan Garg (rohangarg) wrote :

Scratch that, those packages don't work. Please wait for updated packages.

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

Heh... just in the nick of time, I was just about to start installing.

Do you mean that I should wait for updated packages in the official repository or are you building another batch now and will you let us know?

Revision history for this message
Rohan Garg (rohangarg) wrote :

I'll be building another batch, but atleast not for another day or so. It's fairly late and we *might* have discovered other potential issues in the kde-workspace package.

Revision history for this message
In , Dwyer-g (dwyer-g) wrote :

Okay, Arch Linux has now put out...

kdebase-workspace 4.9.2-6

Which I guess has this patch applied. My system is now all up-to-date and there are no more Artifacts or slow down. However, the Tarring line is still there.

Revision history for this message
In , valdikss (valdikss1) wrote :

For me, this fixes slowdown which I wrote in the first message. There is 2 other bugs: screen corruption with gles and incorrect screen repainting with gl. And I don't know if it's MESA or KDE bugs.

Changed in mesa:
status: Confirmed → Won't Fix
Changed in kde-workspace (Ubuntu):
importance: Undecided → High
Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

*** Bug 309510 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

*** Bug 308369 has been marked as a duplicate of this bug. ***

Revision history for this message
Alex Slepoy (alexz75) wrote :

Looks like possible workaround, at least I've no artifacts now on my Lenovo T430S :
1. Add ppa https://launchpad.net/~oibaf/+archive/graphics-drivers/
2. apt-get upgrade
3. Removing /etc/X11/xorg.conf if exists
:)

Revision history for this message
In , Wojtask9 (wojtask9) wrote :

(In reply to comment #21)
> wojtek, your issue with GLES is also reproducible on nouveau and radeon
> drivers. Your issue is not duplicate of this bug.

git bisect bad
e1cb50b15dbb75d1ba0fe184d05be7d302b058ee is the first bad commit
commit e1cb50b15dbb75d1ba0fe184d05be7d302b058ee
Author: Robert Bragg <email address hidden>
Date: Tue Sep 18 16:10:03 2012 +0100

    SwapBuffersRegionNOK: invert rectangles on y axis

    The EGL_NOK_swap_region2 spec states that the rectangles are specified
    with a bottom-left origin within a surface coordinate space also with a
    bottom left origin, so this patch ensures the rectangles are flipped
    before passing them on to dri2_copy_region.

    Fixes piglit's egl-nok-swap-region test.

    Tested-by: Matt Turner <email address hidden>
    (cherry picked from commit 0a523a8820e8a2549ac1c7887eb1892b228af44b)

this commit introduced regression on my system (kwin_gles)
I'll reopen https://bugs.freedesktop.org/show_bug.cgi?id=55856

Revision history for this message
In , ValdikSS (valdikss) wrote :
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :
Robert Hooker (sarvatt)
Changed in mesa (Ubuntu):
assignee: nobody → Robert Hooker (sarvatt)
importance: Undecided → Medium
milestone: none → precise-updates
Robert Hooker (sarvatt)
Changed in mesa (Ubuntu):
milestone: precise-updates → quantal-updates
Revision history for this message
Rich Sezov (sezovr) wrote :

@sarvatt: Does this mean there's an update now in Quantal? Because I (temporarily) went back to Precise to avoid this issue.

Revision history for this message
Thiago Martins (tcmartins) wrote :

@Sezov: Well, 4.9.3 packages should be right around the corner (I'd give it a week). It's supposed to be fixed in 4.9.3.

Revision history for this message
Thiago Martins (tcmartins) wrote :

Heh, I spoke too soob, 4.9.3 packages are out on the kubuntu-ppa. I just installed it along with mesa9 and kwin is compositing with opengl at 60 fps with no artifacts.

Revision history for this message
Augie DeHainaut (augied) wrote :

4.9.3 from the kubuntu-ppa seems to fix things for me too. Thanks everyone.

Revision history for this message
Robert Hooker (sarvatt) wrote :

Yeah it's fixed in kwin 4.9.3, which was uploaded to raring recently. It'll be SRUed to quantal "very soon now". The mesa task I targetted is for another issue with the screen not updating that'll be fixed in mesa 9.0.1

Revision history for this message
Stefan Freyr (stefan-freyr) wrote :

I confirm.

Upgrading to KDE 4.9.3 fixed the slow FPS and the artifacts I was experiencing.

Revision history for this message
In , Andrea Scarpino (bashlnx-deactivatedaccount-deactivatedaccount) wrote :

Thanks Robert!
Can you backport this so it gets included in the next 9.0.1 release?

Revision history for this message
In , Konstantinos Smanis (ksmanis) wrote :

The slowdown is gone for me except in fullscreen HD videos (either VLC or flash - 720p+). I am quite sure this is a KWin bug because I tried downgrading to Mesa 8.0.4 (which was working fine before) and I experienced the same issues. So it is something in the 4.9.2 -> 4.9.3 transition (perhaps even the above patch).

I also noticed that low resolution videos (480p) play smoothly, as well as the HD videos but only when not viewed fullscreen.

Mesa: 9.0
KDE: 4.9.3
Linux: 3.6.6
Intel Driver: 2.20.12
Intel HD Graphics 4000

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

(In reply to comment #37)

> I also noticed that low resolution videos (480p) play smoothly, as well as
> the HD videos but only when not viewed fullscreen.

"kcmshell4 kwincompositing", last tab. is "suspend compositing for fullscreen windows" checked? Do they play faster if you suspend compositing altogether?

Revision history for this message
In , Konstantinos Smanis (ksmanis) wrote :

(In reply to comment #38)
> (In reply to comment #37)
>
> > I also noticed that low resolution videos (480p) play smoothly, as well as
> > the HD videos but only when not viewed fullscreen.
>
> "kcmshell4 kwincompositing", last tab. is "suspend compositing for
> fullscreen windows" checked? Do they play faster if you suspend compositing
> altogether?

It is not checked, with KDE 4.9.2 + Mesa 8.0.4 it worked fine unchecked.

Checking it and/or disabling effects altogether caused VLC to play smoothly fullscreen.

Flash remained unaffected either way (it doesn't simply slow down, it fails to expand the video fullscreen and freezes the video).

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

Iff at all, rather
http://quickgit.kde.org/?p=kde-workspace.git&a=commit&h=9364f5a7579567f5ebcf537eccf6147416e0e7e0
or maybe
http://quickgit.kde.org/?p=kde-workspace.git&a=commit&h=55a2f19c8a41d9b3d13d69d7769999daf5730414

- Can you check reverting the commits?

- Sure the intel driver (xf86-video-intel) / flash / vlc/libav didn't change between "works" and "works not"?

This:
"Flash remained unaffected either way (it doesn't simply slow down, it fails to expand the video fullscreen and freezes the video)."
Smells suspicious, since with suspended compositing, kwin is actually out of game here.

Revision history for this message
In , Konstantinos Smanis (ksmanis) wrote :

- I tried reverting the commits each alone and together and the result is that the first commit introduced the VLC slowdown.

- Checking my logs, there was a google-chrome update along with KDE 4.9.3. It could be that the flash issues are totally unrelated (I am using the built-in flash player).

Just for reference:
Reverting commit 1+2: VLC is OK, Flash freezes
Reverting commit 1: VLC is OK, Flash freezes
Reverting commit 2: VLC is slow, Flash freezes

Suspending the effects for fullscreen windows stops the VLC slowdown but when another window pops up (e.g. KMix's volume indicator) it becomes sluggish again. Suspending the effects altogether produces no slowdown at all.

Revision history for this message
In , Konstantinos Smanis (ksmanis) wrote :

Yep, I can confirm that the flash issue is unrelated. External flash (11.2) works fine, please ignore the issue. Chrome 23 ships flash 11.5.

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

kwriteconfig --file kwinrc --group Compositing -- key GLStrictBinding true
qdbus org.kde.kwin /KWin reconfigure
then toggle compositing off / on (shift+alt+f12)

Completely suspend compositing in that case will however likely still get you the best overall performance.

@Fredrik:
the commit is not commented - what was the reason behind this (possibly related to a special driver version?)

Bryce Harrington (bryce)
Changed in mesa (Ubuntu):
status: Confirmed → Triaged
status: Triaged → In Progress
Revision history for this message
In , ValdikSS (valdikss) wrote :

Just updated xf86-video-intel to 2.20.13 and get lags with mplayer -vo gl fullscreen without suspending compositing for fullscreen windows. It happens only with SNA. Everything is fine with UXA.

Revision history for this message
In , K6j-fdedria-zp0 (k6j-fdedria-zp0) wrote :

(In reply to comment #43)
> @Fredrik:
> the commit is not commented - what was the reason behind this (possibly
> related to a special driver version?)

With DRI2 drivers there is no need to rebind the window pixmap to the texture every time the window is damaged. The texture and the pixmap reference the same memory buffer.

This commit has no effect on the GLES backend however, since it always enables loose binding unconditionally.

Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

@Konstantinos: are you actually running kwin_gles?

Revision history for this message
In , Konstantinos Smanis (ksmanis) wrote :

No, standard OpenGL.

Robert Hooker (sarvatt)
Changed in kde-workspace (Ubuntu):
status: Confirmed → Fix Released
Robert Hooker (sarvatt)
Changed in mesa (Ubuntu):
assignee: Robert Hooker (sarvatt) → nobody
status: In Progress → Triaged
Revision history for this message
In , Thomas-luebking (thomas-luebking) wrote :

The original bug is fixed with commit in comment #29, thus closing.

Regarding the video slowdown / other issues regarding non-strict binding, please check whether this is still an issue (see comment #43 and set it "false" instead of "true") and file a new bug in case.

Thanks everyone.

Changed in kdebase-workspace:
status: New → Fix Released
Oibaf (oibaf)
Changed in mesa (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Tommy_CZ (t-kijas) wrote :

I can confirm it in KDE4.8.5, Ubuntu 12.04 and latest saucy-enablement-stack (xorg).
I had to downgrade mesa to original precise version.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.