Moving windows is very laggy with Compiz
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Compiz Core |
In Progress
|
High
|
Daniel van Vugt | ||
| compiz (Ubuntu) |
In Progress
|
High
|
Daniel van Vugt | ||
Bug Description
Binary package hint: compiz
After upgrading to Natty, moving windows around is really laggy. It also happens in the gnome-classic session. It looks to be Compiz related because there is no issue with the gnome classic (no effects) session.
To reproduce, just login to a session with Compiz (gnome classic or Ubuntu Unity session) running, open a window and move it around.
I would expect that moving windows would be smooth. But instead it's really laggy.
Description: Ubuntu 11.04
Release: 11.04
apt-cache policy compiz
compiz:
Installed: 1:0.9.4+
Candidate: 1:0.9.4+
Version table:
*** 1:0.9.4+
500 http://
100 /var/lib/
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: compiz 1:0.9.4+
ProcVersionSign
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelMo
.proc.driver.
.proc.driver.
.proc.driver.
NVRM version: NVIDIA UNIX x86_64 Kernel Module 270.41.06 Mon Apr 18 14:53:56 PDT 2011
GCC version: gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
Architecture: amd64
CompizPlugins: [core,bailer,
CompositorRunning: compiz
Date: Sat Apr 30 01:36:57 2011
DistUpgraded: Log time: 2011年04月29日 22:23:52.924774
DistroCodename: natty
DistroVariant: ubuntu
DkmsStatus:
vboxhost, 4.0.6, 2.6.38-8-generic, x86_64: installed
nvidia-current, 270.41.06, 2.6.35-28-generic, x86_64: installed
nvidia-current, 270.41.06, 2.6.38-8-generic, x86_64: installed
GraphicsCard:
nVidia Corporation GF104 [GeForce GTX 460] [10de:0e22] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. Device [1462:2321]
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
InstallationMedia_: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
JockeyStatus: xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary, Enabled, Not in use)
MachineType: System manufacturer System Product Name
PackageArchitec
ProcEnviron:
LANGUAGE=en_US:en
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/zsh
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
Renderer: Unknown
SourcePackage: compiz
UpgradeStatus: Upgraded to natty on 2011年04月30日 (0 days ago)
dmi.bios.date: 06/17/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 2102
dmi.board.
dmi.board.name: M4A79XTD EVO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev X.0X
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: System Product Name
dmi.product.
dmi.sys.vendor: System manufacturer
version.compiz: compiz 1:0.9.4+
version.ia32-libs: ia32-libs 20090808ubuntu13
version.libdrm2: libdrm2 2.4.23-1ubuntu6
version.
version.
version.
version.
version.
version.
version.
version.
Related branches
- Compiz Maintainers: Pending requested
-
Diff: 34 lines (+6/-17) 1 file modifiedapisrc/timer.cpp (+6/-17)
- .proc.driver.nvidia.params.txt Edit (455 bytes, text/plain; charset="utf-8")
- BootDmesg.txt Edit (56.3 KiB, text/plain; charset="utf-8")
- CurrentDmesg.txt Edit (2.7 KiB, text/plain; charset="utf-8")
- Dependencies.txt Edit (5.4 KiB, text/plain; charset="utf-8")
- GconfCompiz.txt Edit (47.9 KiB, text/plain; charset="utf-8")
- GlConf.txt Edit (1.4 KiB, text/plain; charset="utf-8")
- Lspci.txt Edit (16.5 KiB, text/plain; charset="utf-8")
- Lsusb.txt Edit (698 bytes, text/plain; charset="utf-8")
- ProcCpuinfo.txt Edit (5.3 KiB, text/plain; charset="utf-8")
- ProcInterrupts.txt Edit (2.6 KiB, text/plain; charset="utf-8")
- ProcModules.txt Edit (3.4 KiB, text/plain; charset="utf-8")
- UdevDb.txt Edit (125.1 KiB, text/plain; charset="utf-8")
- UdevLog.txt Edit (268.5 KiB, text/plain; charset="utf-8")
- UnitySupportTest.txt Edit (591 bytes, text/plain; charset="utf-8")
- XorgConf.txt Edit (633 bytes, text/plain; charset="utf-8")
- XorgLog.txt Edit (17.6 KiB, text/plain; charset="utf-8")
- XorgLogOld.txt Edit (18.3 KiB, text/plain; charset="utf-8")
- Xrandr.txt Edit (19.1 KiB, text/plain; charset="utf-8")
- nvidia-settings.txt Edit (37.4 KiB, text/plain; charset="utf-8")
- peripherals.txt Edit (1.8 KiB, text/plain; charset="utf-8")
- xdpyinfo.txt Edit (22.1 KiB, text/plain; charset="utf-8")
- xinput.txt Edit (757 bytes, text/plain; charset="utf-8")
No longer a duplicate of bug 92599. Seems to be different.
Status changed to 'Confirmed' because the bug affects multiple users.
Nick, When you say "laggy", do you mean:
(a) the windows appear to stutter in a jerky way?; or
(b) tearing is visible (horizontal lines where moving windows look sheared)?; or
(c) that they smoothly lag a long way behind the mouse pointer?; or
(d) some combination of the above options?
Please change the status back to Confirmed when the question has been answered. Thanks...
The correct one is (a). For what it's worth, I've found that Kwin and Mutter do not have this problem, but Metacity's built in compositor (the XRender one) also does.
Status Confirmed
On 11/25/2011 03:13 AM, Daniel van Vugt wrote:
> Nick, When you say "laggy", do you mean:
>
> (a) the windows appear to stutter in a jerky way?; or
> (b) tearing is visible (horizontal lines where moving windows look sheared)?; or
> (c) that they smoothly lag a long way behind the mouse pointer?; or
> (d) some combination of the above options?
>
> Please change the status back to Confirmed when the question has been
> answered. Thanks...
>
> ** Changed in: compiz (Ubuntu)
> Status: Confirmed => Incomplete
>
Nick, please try ppa:vanvugt/compiz (https:/
If the PPA does not solve this problem for you then please change the status back to Confirmed...
P.S. You will need to upgrade to 11.10 in order to test the PPA. Sorry about that, but I can only develop and test on so many different releases at once.
Hmm, confirmed by multiple duplicates (and more I just found).
All; please try ppa:vanvugt/compiz (https:/
I will test this as soon as possible. It may take a week or so for me to test this as my computer is currently broken.
On 12/10/2011 01:01 AM, Daniel van Vugt wrote:
> Hmm, confirmed by multiple duplicates (and more I just found).
>
> All; please try ppa:vanvugt/compiz
> (https:/
> to whether it solved this bug for you.
>
Note to self, and Compiz developers...
I managed to fix this bug by hacking the CompTimer source priority; lowering the priority to around "IDLE" level. This allows compiz time to process all pending X events (such as mouse motion) before rendering each frame. Unfortunately it's not a fix I can recommend right now because it created bugs with full-screen painting modes.
I think an alternative fix might be possible by optimizing the compiz "move" plugin to reduce the overhead associated with handling so many motion events. Especially when there are multiple such events pending and you know the newest one is the only one that's really important.
and the smoothness of moving windows in gnome-shell :-)
Hmm, the priority fix seems to work when combined with the fix for improved timer scheduling fairness (bug 897045). This now looks easy to do.
Hey all... Please wait for version "vv6" to be published before testing the fix for this bug in ppa:vanvugt/compiz.
every performance issue is important, raised priority.
removed: needs-reassignment
I tested your fix Daniel. It didn't fix the issue. I have the same card as the user that posted this bug except mine is the 460M not the 460.
I added your ppa and then did an apt-update then apt-get install compiz and still same issue after fresh reboot.
Let me know if you need more help to debug.
Could you please report the version of compiz you have installed and provide a video of the lag still happening?
Also, I suspect there are two very different bugs here, and maybe we need to treat them separately...
1. Moving windows lagging behind the mouse pointer by a few frames; a few milliseconds.
2. Moving windows lagging behind the mouse pointer by 1-2 seconds; windows appear to freeze when dragging.
Everyone -- please add comments describing whether ppa:vanvugt/compiz helps you and which of the above issues you have.
Before adding ppa:vanvugt/compiz, I had lagging type 1 as well as type 2. windows move smoothly for some time when I restarted unity, but after some time window movement always got really jerky.
applying your fix basicly eliminates the lags most of the time, but jerkyness (inconsistent lag; ranging from like 1ms to like 1 sec.) still occurs from time to time.
While your fix defenitly helped with the overall smoothness of moving windows, there still seems to be another issue...
A potential workaround to either bug is to reduce the sample rate of your mouse to about 2x the refresh rate of your monitor. It's normally about 16x by default so compiz and xorg have to process up to 16 window movements every screen refresh. Obviously you can only every see 1 movement per refresh on the screen so it's a waste. But I recommend using 2x the refresh rate to ensure everything stays smooth. Sorry I haven't researched/tested how to do this yet.
Please also test ppa:vanvugt/unity at the same time as ppa:vanvugt/compiz. The unity PPA contains a fix for a severe performance bug 861061, which slows down all compiz redraws in Ubuntu 11.10.
Nick B. (futurepilot) -- please answer comment #17.
I have reverted the proposed fix for this bug in ppa:vanvugt/compiz, but kept the critical timing fixes which I think will still help significantly. In theory this might eliminate some jerkiness (skipped frames). Please update and try the new version "vv7". Let me know if it's any better, and what version you think it's better/worse than.
I've tried ppa:vanvugt/compiz, and for the moment I can easily see performance improvements.
I tested before with "samegame" qml demo from qt creator, which exposed performance issues compared to metacity (like 1:3 FPS). Now it seems on pair
I don't know if it's related to that, but 2 compiz sessions (unity3d) fail miserably today... I can only use one user
The new version is an improvement to some extent. It looks I get more redraws than before. The skipping now seems more erratic than before. Please let me know if you want another video showing the behaviour.
I'm afraid however that from a user's perspective the difference is negligible; on systems suffering from this bug Unity is not in a very usable state. :(
In any case, your efforts are greatly appreciated. From what I can gather the root-cause seems to be NVidia's closed source driver not giving back correct data.
- Video about wm lag Edit (4.5 MiB, video/ogg)
Hi, here just a video showing that unity with compiz is not usable on my netbook (eeepc 1005HA)
Andrea, your frame rate issue is probably bug 861061. You need ppa:vanvugt/unity for that.
I've used the latest versions both from ppa:vanvugt/compiz and ppa:vanvugt/unity and still no luck. AMD graphics here.
Ubuntu 11.10 amd64
kernel: 3.1.0-030100-
Lenovo Thinkpad T500
AMD Catalyst 11.10 for Mobility Radeon HD 3650
My settings (just in case):
Sync to VBlank - OFF
AMD: Tear-free - ON
AMD: Wait for vertical - Always
(Same with other combinations of these settings for that matter...)
*** But I've been using different versions recently and have naever noticed any improvements re our case here. I tried kernels from 2.6.34 up to my current one (few of them).
Please note that animations like Win+W, minimizing/
Also an issue on Precise.
fglrx: 2:8.920-0ubuntu1
compiz: 1:0.9.6+
kernel: 3.2.0.5.5
Daniel, is it normal for vv7 to be worse while using nouveau?
I have been trying your ppa waiting it would eventually fix the lag in window drawing while resizing, but I never noticed the window lagging behind before like others reported. In my system, with the package in main the windows move normally.
With vv7 the windows started lagging behind like others are reporting for the first time with my system, which is weird, since it should be better than the current version in main (oneiric-updates), right?
I purged your ppa and everything is back to normal, windows still lag while resizing but they don't when moved around. In vv6 I'm almost sure the windows resized more smoothly, though, but I'd have to try it again.
I have a GeForce 9800 GT.
Is this relevant besides the regression with the nouveau driver? Is any information or test I can do to help you diagnose the issue?
vv7 also adds lag to window movement on my intel laptop, can anyone else confirm this?
vv7 _removed_ the experimental fix for this bug because it could theoretically make things worse. It seems like it actually made things better for some of us. But some of us are not all of us.
ppa:compiz/vanvugt does contain some fixes that might make this bug better or worse, but it presently (vv7) does not contain an explicit fix for this bug.
Now I've got another machine set up that can reproduce both problems, a proper fix will be possible. But I haven't started yet.
Please, no more "me too" comments until a new fix has been announced. But I would really like Nick B. (futurepilot) to reply to comment #17...
Daniel, I am seeing the second case in comment 17.
I think my comment won't fall into "metoo" category.
It seems it fixed the problem for me somewhat but only for kernel 3.0.0-14-generic. When I tried to switch to 3.1.4 or 3.2.*rc* I got laggy (heavy, not stuttering as before) windows while dragging. I said 'somewhat' because I'm not even sure if 'complete unity 3D' is running, as I don't see >any< alt-tab switcher nor Win+W actions. Win+S works but it looks like in Unity 2D even though I'm sure I've logged into Unity (i.e. Unity 3D).
Ubuntu 11.10 amd64
kernel: 3.0.*14*
Lenovo Thinkpad T500
AMD Catalyst 11.10 for Mobility Radeon HD 3650
dpkg -l |grep unity-common
ii unity-common 4.24.0-
ppa:compiz/vanvugt vv8 does not make a difference. Window moving is still very choppy. Windows appear to freeze when moving them. I also added ppa:vanvugt/unity and that did not make a difference either.
Installed version: 1:0.9.6+
Available version: 1:0.9.6+
sorry for doubleposting...
All, please don't expect a proper fix for this bug until PPA version vv9 at least. I haven't started work on it yet!
Thanks Nick... this allows me to clarify the duplicates situation.
Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 764330, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.