windows start to move slow after using compiz for some hours

Bug #770160 reported by Achim
214
This bug affects 43 people
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Binary package hint: compiz

If I use compiz (unity) for some hours windows start to move slow.
FYI I move the windows with my mouse. The rest of the desktop seems to be fast.
After running unity --replace the windows move fast again.

I have tried to get some information from perf:

Window movement slow
 Performance counter stats for process id '1662':

         2,081,748 cache-misses # 0.361 M/sec (scaled from 67.41%)
        84,637,337 cache-references # 14.677 M/sec (scaled from 67.37%)
         8,190,904 branch-misses # 0.405 % (scaled from 32.89%)
     2,020,123,475 branches # 350.309 M/sec (scaled from 32.65%)
     7,780,284,300 instructions # 0.814 IPC (scaled from 49.79%)
     9,562,086,917 cycles # 1658.157 M/sec (scaled from 66.67%)
             1,764 page-faults # 0.000 M/sec
               148 CPU-migrations # 0.000 M/sec
             6,917 context-switches # 0.001 M/sec
       5766.695927 task-clock-msecs # 0.466 CPUs

       12.375089653 seconds time elapsed

after unity --replace
Window movement fast
 Performance counter stats for process id '10954':

         1,143,182 cache-misses # 0.610 M/sec (scaled from 65.29%)
        80,353,845 cache-references # 42.866 M/sec (scaled from 66.86%)
        11,336,369 branch-misses # 2.265 % (scaled from 34.72%)
       500,520,313 branches # 267.010 M/sec (scaled from 33.45%)
     2,076,439,842 instructions # 0.706 IPC (scaled from 50.27%)
     2,942,735,544 cycles # 1569.846 M/sec (scaled from 66.53%)
             4,989 page-faults # 0.003 M/sec
               126 CPU-migrations # 0.000 M/sec
            13,993 context-switches # 0.007 M/sec
       1874.537363 task-clock-msecs # 0.127 CPUs

       14.807205720 seconds time elapsed

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: compiz 1:0.9.4+bzr20110415-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,move,snap,compiztoolbox,regex,place,grid,resize,gnomecompat,session,imgpng,vpswitch,mousepoll,animation,workarounds,wall,unitymtgrabhandles,expo,ezoom,staticswitcher,fade,scale,unityshell]
CompositorRunning: compiz
DRM.card0.DP.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
DRM.card0.HDMI.A.1:
 status: connected
 enabled: enabled
 dpms: Off
 modes: 1920x1080 1920x1080 1680x1050 1400x1050 1600x900 1280x1024 1280x1024 1440x900 1280x960 1280x800 1152x864 1280x720 1280x720 1024x768 1024x768 1024x768 832x624 800x600 800x600 800x600 800x600 720x576 720x480 640x480 640x480 640x480 640x480 720x400
 edid-base64: AP///////wA4o3lnAQEBATUTAQOAMx146vgFpFVNnSUSUFS/74CBAIFAgYCBwJUAkECzAKnAAjqAGHE4LUBYLEUA/h8RAAAeAAAA/QA4TB9TEQAKICAgICAgAAAA/ABFQTIzMVdNaQogICAgAAAA/wAwMTEwNTY2NE5CCiAgAe4CAQQAAR0AclHQHiBuKFUA/h8RAAAejArQiiDgLRAQPpYA/h8RAAAYjArQkCBAMSAMQFUA/h8RAAAYAR0AvFLQHiC4KFVA/h8RAAAeAjqA0HI4LUAQLEWA/h8RAAAeAR2AGHEcFiBYLCUA/h8RAACeAAAAAAAAAAAAAAAAAAAAFQ==
DRM.card0.VGA.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
Date: Mon Apr 25 10:39:36 2011
DistUpgraded: Log time: 2011-03-18 14:25:17.020762
DistroCodename: natty
DistroVariant: ubuntu
GraphicsCard:
 Intel Corporation 4 Series Chipset Integrated Graphics Controller [8086:2e22] (rev 03) (prog-if 00 [VGA controller])
   Subsystem: Micro-Star International Co., Ltd. Device [1462:7521]
   Subsystem: Micro-Star International Co., Ltd. Device [1462:7521]
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110318)
InstallationMedia_: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110318)
MachineType: MICRO-STAR INTERNATIONAL CO.,LTD MS-7521
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=9bf80bd3-a330-4d0b-b199-0467bb403d8b ro quiet splash vt.handoff=7
ProcVersionSignature_: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Renderer: Unknown
SourcePackage: compiz
UpgradeStatus: Upgraded to natty on 2011-04-08 (16 days ago)
dmi.bios.date: 03/30/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V4.6
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: G45M Digital (MS-7521)
dmi.board.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
dmi.board.version: 2.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
dmi.chassis.version: 2.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV4.6:bd03/30/2010:svnMICRO-STARINTERNATIONALCO.,LTD:pnMS-7521:pvr2.0:rvnMICRO-STARINTERNATIONALCO.,LTD:rnG45MDigital(MS-7521):rvr2.0:cvnMICRO-STARINTERNATIONALCO.,LTD:ct3:cvr2.0:
dmi.product.name: MS-7521
dmi.product.version: 2.0
dmi.sys.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
version.compiz: compiz 1:0.9.4+bzr20110415-0ubuntu2
version.ia32-libs: ia32-libs 20090808ubuntu13
version.libdrm2: libdrm2 2.4.23-1ubuntu6
version.libgl1-mesa-dri: libgl1-mesa-dri 7.10.2-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.10.2-0ubuntu2
version.xserver-xorg: xserver-xorg 1:7.6+4ubuntu3
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.0-0ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.14.0-4ubuntu7
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110107+b795ca6e-0ubuntu7

Revision history for this message
Achim (ach1m) wrote :
Revision history for this message
Michael-250 (michael-250) wrote :

I can confirm this issue. I'm using a nvidia gfx (restricted, recommended driver).

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Confirmed by another user.

Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
Alberto Milone (albertomilone) wrote :

I can reproduce the problem with the r600c driver, so it's not nvidia specific. Moving windows around makes CPU usage increase. This is with an I-core 7 CPU with 6Gb of RAM.

According to the attached output of sysprof, libdecor.so and libcairo.so play a big role in this issue.

Revision history for this message
Alberto Milone (albertomilone) wrote :
Changed in compiz (Ubuntu):
importance: Undecided → High
Revision history for this message
Alberto Milone (albertomilone) wrote :

I've also swapped my radeon card with an Nvidia card (using the proprietary driver) and I can still reproduce the problem.

Revision history for this message
Alberto Milone (albertomilone) wrote :

Here's the output of Sysprof using Nvidia.

Revision history for this message
Alberto Milone (albertomilone) wrote :

compiz is using 121.9Mb with 8 open windows.

Revision history for this message
Achim (ach1m) wrote : Re: [Bug 770160] Re: windows start to move slow after using compiz for some hours

I have visualized the three sysprof profiles. Maybe it is helpful.

Revision history for this message
Alberto Milone (albertomilone) wrote :

I've just reproduced the problem using Ubuntu's classic desktop (i.e. only compiz), therefore I think this problem has very little to do with Unity and might be a leak in compiz instead.

Revision history for this message
Alberto Milone (albertomilone) wrote :
Achim (ach1m)
tags: added: regression-release
Revision history for this message
Kole de nNix (koledennix) wrote :

As for me - this issue happens after monitor torns off (15 minutes) and turn on.

Revision history for this message
Kole de nNix (koledennix) wrote :

Sorry for my english. I mean that on my laptop this issue happens after monitor turns on after monitor power suspend (witch happens after 15 minutes of waiting). I use nvidia blob dirver.

Revision history for this message
Achim (ach1m) wrote :

The problem is still present with the latest updates

compiz:
  Installed: 1:0.9.4+bzr20110415-0ubuntu2
  Candidate: 1:0.9.4+bzr20110415-0ubuntu2
  Version table:
 *** 1:0.9.4+bzr20110415-0ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ natty/main amd64 Packages
        100 /var/lib/dpkg/status
unity:
  Installed: 3.8.12-0ubuntu1
  Candidate: 3.8.12-0ubuntu1
  Version table:
 *** 3.8.12-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ natty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.8.10-0ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ natty/main amd64 Packages

But it seems compiz is using much less memory than before.
In my case it uses 48.6MB.

I am restarting unity 3-5 times a day, to get back to a working state.
I do not know what the others think but to my mind the bug priority should be set to critical.

Revision history for this message
Geoffrey Pursell (geoffp) wrote :

This happens every time I leave my computer and then come back, which leads me to suspect that it happens whenever the monitor powers off, also.

Revision history for this message
Apteryx (maxco) wrote :

I confirm running "unity --replace&" in a terminal is a workaround to solve the slowness problem. Thanks to Achim.

Revision history for this message
h3ct0r (hectorxxx) wrote :

It happens to me also, after 20-30 min working on ubuntu 11.04 with the lastest updated. With Gnome clasic (no unity). Also im using a radeon HD 4870 with privative drivers. the "unity --replace&" command didnt work for me.

Revision history for this message
Apteryx (maxco) wrote :

H3ct0r: try doing Alt-F2, typing "unity --replace" without the quotes then pressing enter.

Revision history for this message
Apteryx (maxco) wrote :

But the problem will come back after some time... So this is only a very partial workaround.

Revision history for this message
nebirhos (nebirhos) wrote :

"compiz --replace" doesn't solve the problem in classic ubuntu desktop

Revision history for this message
Damian (galmido) wrote :

Ok, sorry for my English. I make some tests with miscellaneous compiz configurations. On my nVidia GTX 260 (Gold series, 216 cores, offical nvidia drivers) with enabled VBlank and refresh rate 120Hz (monitor refresh rate x2) compiz works good until:

- run browser (Firefox). FPS when dragging windows drops down after serval minutes.
- try to group windows. No matter if I only group, or tabbling it, FPS drop down immediately for all windows, not only for grouped/tabbled.
- turn off option "Lazy Positioning" in Drag Window plugin configuration.

I think this bug have connection with XServer and refreshing windows coordinates on it.

Revision history for this message
Achim (ach1m) wrote :

Damian, I think you experience another problem, you should fill a new Bug.

Revision history for this message
Alberto Milone (albertomilone) wrote :

I've found a rather easy workaround. I simply had to disable the following option in the Device section of my /etc/X11/xorg.conf (see the attached file) so that vline doesn't wait for non-pageflipped swap buffers:

Option "SwapbuffersWait" "False"

Remeber to restart the xserver afterwards (e.g. log in and log out) and moving windows shouldn't be slow any more. I can't see any regressions after doing this.

Note: this works with the radeon driver but should also work with intel. I'm not sure how to do the same with proprietary drivers.

Revision history for this message
Alberto Milone (albertomilone) wrote :

if I open many windows (e.g. 80 tabs in chromium + thunderbird and other apps) things slow down a bit but not nearly as bad as it used to be.

I supposed it's the way the do sync to vblank in nux/compiz (?) which reduces fps.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Hi, would this bug be related to bug 760814? These two seem to be regarding the same symptoms and perhaps be married.

Revision history for this message
Achim (ach1m) wrote :

I don't think that these bugs are directly related to each other. The main difference is that the windows only start to move "really" slow after some time. For me it happens faster if I use my desktop more active (many windows).

Revision history for this message
Andrei Gladkyi (arg) wrote :
Revision history for this message
Colin D Bennett (colinb) wrote :

@Andrey Gladkyy:
How is this related to Bug #764330? In that bug, slowness always occurs and only when mouse movement takes place.

In this bug, at least for me, slowdown occurs only after a long period of time (days to weeks) and I experience lags when using the keyboard as well; for instance, to switch workspaces with Ctrl+Alt+Right there is a huge delay of a couple of seconds before anything happens.

I have a Logitech mouse and I do not experience the window-move problems reported in Bug #764330.

Revision history for this message
Achim (ach1m) wrote :

If I move a window with my mouse very fast around on my desktop no screen updates happen.
My observation is that compiz has a high cpu usage, please see attached screenshot (compiz high cpu usage).

Compiz has 70% and X has ~30% so in sum this are 100%.
I hope this can be fixed at least for ubuntu+1 (precise).

compiz:
  Installiert: 1:0.9.6+bzr20110929-0ubuntu6vv1
  Kandidat: 1:0.9.6+bzr20110929-0ubuntu6vv1
  Versionstabelle:
 *** 1:0.9.6+bzr20110929-0ubuntu6vv1 0
        100 /var/lib/dpkg/status
     1:0.9.6+bzr20110929-0ubuntu6 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric-proposed/main amd64 Packages
     1:0.9.6+bzr20110929-0ubuntu5 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric-updates/main amd64 Packages
     1:0.9.6+bzr20110929-0ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The issue with constantly high CPU usage (not just after a few hours) is discussed in bug 803943.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Note there are problems with window movement even immediately after logging in on some systems. That is covered by bug 773861 and bug 891744, which both have fixes on the way.

Revision history for this message
Matt Pharoah (mpharoah) wrote :

compiz --replace works for me in that it gets rid of the window slowness, but doing that causes the much more severe bug 903512 making it impossible to switch workspaces without a complete graphics freeze, so it's not really a fix.

Revision history for this message
ruffian (ruffian-ua) wrote :

Yup I also have this bug

Revision history for this message
Michael Knap (michael-knap) wrote :

I would be tempted to mark this as a duplicate of bug 888039 which was fixed over the weekend. If you are interested, you can follow the thread on that bug and test the fix. It seems to be working for me.

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

Other bug subscribers

Remote bug watches

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