[regression] All apps have a lower frame rate under Unity.

Bug #861061 reported by Rocko
356
This bug affects 63 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
High
Daniel van Vugt
4.0
Fix Released
High
Daniel van Vugt
unity (Ubuntu)
Fix Released
High
Daniel van Vugt
Oneiric
Fix Released
Undecided
Daniel van Vugt
Precise
Fix Released
High
Daniel van Vugt

Bug Description

TEST CASE:

1. Install VirtualGL from http://sourceforge.net/projects/virtualgl/files/VirtualGL/2.2.90%20%282.3beta1%29/
2. Run /opt/VirtualGL/bin/glxspheres{64}
3. Note the frame rate that glxspheres reports.

This frame rate is significantly lower when running Unity, than when running Unity-2D or Gnome Shell (3.2).

However, if you open CCSM and disable the Unity plugin of compiz, instantly the frame rate jumps up to the same as you see in Unity-2D or Gnome Shell. So this proves the issue is not with vanilla compiz, but specifically a problem with the Unity plugin.

This bug does not seem to occur with high-end graphics hardware using high-performance proprietary drivers. However it seems easy to reproduce using open source DRM drivers: intel, nouveau or radeon.

ORIGINAL DESCRIPTION:

A recent update to compiz in oneiric has had a big impact on 3d performance. The desktop feels more sluggish, and the glxspheres benchmark indicates about half the performance compared to metacity and mutter (on my Sandy Bridge GPU I get 30-32 fps in unity/compiz vs 59-60 fps in both unity-2d/metacity and gnome-shell/mutter). Previously compiz matched the performance of metacity and mutter.

I also tested the oneiric beta2 live CD (amd64) and performance was similar (ie regressed compared to beta1).

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: compiz 1:0.9.5.94+bzr20110919-0ubuntu1
Uname: Linux 3.1.0-rc7-git-20110927.1407 x86_64
.tmp.unity.support.test.0:

ApportVersion: 1.23-0ubuntu1
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,text,mousepoll,gnomecompat,imgpng,snap,grid,wall,imgjpeg,move,place,vpswitch,session,compiztoolbox,resize,regex,animation,workarounds,unitymtgrabhandles,expo,fade,scale,ezoom,scaleaddon,unityshell]
CompositorRunning: None
Date: Wed Sep 28 09:15:49 2011
DistUpgraded: Log time: 2011-09-02 11:56:50.062543
DistroCodename: oneiric
DistroVariant: ubuntu
GraphicsCard:
 Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Dell Device [1028:050e]
 nVidia Corporation GF106 [GeForce GT 555M] [10de:0df4] (rev ff) (prog-if ff)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110330)
MachineType: Dell Inc. Dell System XPS L502X
PackageArchitecture: all
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.1.0-rc7-git-20110927.1407 root=UUID=67083065-b92e-4596-a218-817c1dfc8ae7 ro quiet splash i915.i915_enable_rc6=1 pcie_aspm=force i915.lvds_downclock=1 i915.i915_enable_fbc=1 vt.handoff=7
SourcePackage: compiz
UpgradeStatus: Upgraded to oneiric on 2011-09-27 (0 days ago)
dmi.bios.date: 03/25/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A04
dmi.board.name: 0NJT03
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnDellInc.:bvrA04:bd03/25/2011:svnDellInc.:pnDellSystemXPSL502X:pvr:rvnDellInc.:rn0NJT03:rvrA00:cvnDellInc.:ct8:cvr0.1:
dmi.product.name: Dell System XPS L502X
dmi.sys.vendor: Dell Inc.
version.compiz: compiz 1:0.9.5.94+bzr20110919-0ubuntu1
version.ia32-libs: ia32-libs 20090808ubuntu23
version.libdrm2: libdrm2 2.4.26-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 7.11-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.11-0ubuntu3
version.xserver-xorg: xserver-xorg 1:7.6+7ubuntu7
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.6.0-1ubuntu13
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20110811.g93fc084-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.15.901-1ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110411+8378443-1

Related branches

Revision history for this message
Rocko (rockorequin) wrote :
description: updated
Revision history for this message
estama (estama) wrote :

I also see exactly the same behavior with Oneiric's Compiz and Radeon HD 3200 (AMD 780G chipset's integrated graphics). Compiz is a lot slower/laggier than it was in 11.04.

Testing with glxgears (leaving the glxgears window in its default size) on latest Ubuntu 11.10:

Compiz is at around 33-42 FPS
Mutter is at a stable 59.xxx FPS

Ubuntu's 11.04 Compiz was also at 59.xxx FPS (the screen's refresh is at 60 fps).

There is a chance that the fix in:

https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/763005

solves it, but i don't have a way to test it until a PPA of the fix for Oneiric is build.

I think that this is a very important regression because for the systems that it affects, Compiz/Unity becomes unbearably stuttery/slow.

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

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

Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
Rocko (rockorequin) wrote :

I looked at #763005, and that bug indicates it's a problem in compiz's sync-to-vblank implementation. Changing that setting makes no appreciable difference for me, though.

Revision history for this message
estama (estama) wrote :

Yes indeed, that setting doesn't make a difference for me too. I have also tried a number of other solutions (like changing SwapbuffersWait in xorg.conf) that also didn't work.

Based on the above, IMHO, i believe that the problem is something that changed inside compiz between Ubuntu 11.04 and 11.10.

Revision history for this message
Rocko (rockorequin) wrote :

Yes indeed, and moreover the problem is due to a very recent change in compiz. I only discovered glxspheres a couple of weeks ago, and when I first ran it I was getting 59.xxx fps with the (beta 1) Oneiric version of compiz.

Revision history for this message
Loris Zinsou (nepenthes) wrote :

I disabled DynamicTwinView in the Xorg configuration file, disabled Compiz refresh rate detection, and i did set it manually to the real refresh rate (60fps).
The bug is still not fixed : I'm still getting half the fps i have in Gnome Shell and Unity 2D.

On my nvidia 8400m GS GPU, that makes almost any game unplayable under Unity 3D desktop (including Trine, Minecraft and others), as long as this graphics card is just powerful enough to get these games running around 60~70fps under normal circumstances.

Revision history for this message
Rocko (rockorequin) wrote :

After my system updated to compiz 1:0.9.6+bzr20110929-0ubuntu1 and unity 4.20.0-0ubuntu1 I'm now getting just under 60 fps with glxspheres again on my Intel chipset (and 110 fps on the nvidia chipset), so for me it is fixed now.

Revision history for this message
Rocko (rockorequin) wrote :

Or at least it's mostly fixed. Immediately after logging in, I get 59.x fps in glxspheres: after unity crashes and restarts, I might get 30-35 fps again.

Revision history for this message
Loris Zinsou (nepenthes) wrote :

Same here, good performance right after startup, but it slows down (probably after suspend and resume, or VT switch, or when a game exits). I might have to run some more tests, to identify precisely what causes performance drop.

Revision history for this message
Rocko (rockorequin) wrote :

I had to run "unity --reset" to fix a bug in the way it was handling windows, and now the performance is back to being woeful.

Revision history for this message
Bernd Robertz (bernd.robertz) wrote :

Same here about performance in 3D applications like games or 3D-accel-programs.
What helped out a good way was to activate the "unredirect fullscreen windows" checkbox in CCSM under "Composite".

Since that I can run glxsphere in good stable rates, I also can play OilRush in average FPS. Before that, OilRush was about 5 to 12 FPS.

Running Ubuntu 11.10 with Unity on an Acer Aspire 8920 with NV 9500M GS.

Revision history for this message
Rocko (rockorequin) wrote :

I already have "unredirect fullscreen windows" checked (but I don't think should affect glxspheres in any case since it isn't a fullscreen window).

After a complete system reboot I can sometimes get ~60 fps in glxspheres. But it gradually (or some cases, suddenly) regresses.

I have noticed that when it runs slower, both glxspheres and compiz take up less CPU time:

60 fps => glxspheres = 20% CPU / compiz = 14%
45 fps => 16% / 11%
40 fps => 11% / 8 %

ie compiz has decided for some reason to work less hard, resulting in laggy 3d.

It sometimes goes back to 60 fps all by itself without a reboot. For instance, just now I checked 'Detect Refresh Rate' in ccsm/General Options and it went from 40 back to 60. (I had tried setting the refresh rate to 60 Hz in case the detection code was faulty, but I can't say that it made any difference.)

Revision history for this message
Scott Deagan (scott-deagan) wrote :

I'm glad I found this post. I'm experiencing the same problem on three different machines running Ubuntu 11.10:

1. a Sony Vaio VPC F11S1E (GeForce GT330M),
2. a generic AMD A8 Fusion box with a GeForce GTX460, and
3. an iMac (2009 model) with a GeForce 9400.

The symptoms are: from start, things are buttery smooth. Then, if I open Firefox things are still buttery smooth for a short time, then everything becomes laggy and jerky.

All three machines were running 11.04 and did not experience this problem.

Compiz performance deteriorates with usage.

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

Thank you for taking the time to report this bug and helping to make Ubuntu better.

As these performance issues are often specific to a graphics driver, we should initially focus on the graphics hardware this bug was reported on: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller

The intel graphics driver documentation suggests this might be caused by the TripleBuffer configuration option which is enabled according to your log files. It is in fact enabled on all intel graphics systems by default.

It's possible and even likely that compiz in Ubuntu 11.10 is taking slightly more time per frame than 11.04 did, and so is not meeting the deadline to achieve full frame rate. I suspected this was happening on my machine a few days ago (with the same hardware) after I upgraded to 11.10.

Please try disabling TripleBuffer by setting (something like) this in /etc/X11/xorg.conf:

       Section "Device"
         Identifier "devname"
         Driver "intel"
         Option "TripleBuffer" "false"
       EndSection

If that fails, please also try adding:

         Option "SwapbuffersWait" "false"

For more information, run: man intel

If the above options fail to improve anything, please attach new copies of your /var/log/Xorg.0.log file when the options are set.

Finally, your logs show that you have not yet upgraded to the latest compiz 0.9.6+ which comes with Ubuntu 11.10. Please try upgrading your packages/system to match the final version of compiz that was released in Ubuntu 11.10.

Changed in compiz (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You will probably also need to turn off "Sync To VBlank" in compiz before you can test if TripleBuffer=false is fixing the problem.

To turn off "Sync To VBlank", please install the package "compizconfig-settings-manager", run "ccsm" and turn it off in the OpenGL section.

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

AMD/ATI and Intel users: Please check if you have bug 763005 before thinking you have this one.

NVIDIA users: Please try the workaround in bug 92599 first.

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

Nvidia here. All workarounds in bug 92599 did not work.

Revision history for this message
Rocko (rockorequin) wrote :

Intel here: Bug #763005 isn't a problem (the animation is fast and smooth whether or not glxspheres shows low frame rates) and Option "TripleBuffer" "false" (with or without sync to vblank) doesn't fix it.

The low frame rates aren't consistent. Often (well, usually) immediately after X starts, glxspheres can manage almost 60fps. Some time later it deteriorates. I've seen the frame rate go as low as 20fps. Sometimes it recovers by itself, other times not.

Right now, glxspheres is showing between 24 and 35 fps. The system isn't under heavy load or anything - I've only got firefox running. And as a comparison, alien arena is showing 8-15fps whereas normally it can manage closer to 30fps.

Revision history for this message
Rocko (rockorequin) wrote :

Here's Xorg.0.log for the currently slow-running system. TripleBuffers is turned off, but SwapBuffers wait is enabled.

Revision history for this message
Rocko (rockorequin) wrote :

And compiz is currently at version 0.9.6+bzr20110929-0ubuntu5.

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

I think it is worth trying the fix I proposed for bug 763005. Even if you don't have the symptoms of that bug, you will in theory still get a compiz performance boost from the fix. Whether or not the improvement is noticeable for you remains to be seen.

You can try the fix by adding ppa:vanvugt/compiz to your package sources;
https://launchpad.net/~vanvugt/+archive/compiz

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

I added the ppa and have been using it for a few days. I have observed that there is no performance boost from my desktop effects. Actual gaming, I don't know.

I have also tried all vsync fiddling, triple buffering settings, etc. etc.

Long story short: Performance is awesome after boot. Just dandy.

Seven hours later I'm watching a powerpoint presentation when I move my windows around.

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

Performance degrading slowly over time could be a resource leak of some sort.

If you find performance gets worse over time, try noting how much memory compiz is using when you first log in and compare it to when performance has degraded. You can get the memory usage from:

  ps auxw | grep compiz

The columns of interest are #5 and #6 (VSZ, RSS).

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

I'll do that. Is this the correct bug report to go on? There are so many bug reports that I'm not sure which one to really post to. Performance is just fine at first but becomes unbearable after many hours. And this is on a higher-end machine (gtx 560, 8 gb ram, etc.)

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

@Chauncellor, I'm not sure if this is the right bug for you, but I can't suggest a more appropriate one either. Certainly the reporter of this bug describes similar performance degradation to yours.

Video performance bugs are very messy. Unless there is an easy switch or workaround to try then most of the time you'll never be too sure that everyone is actually experiencing and discussing the same bug. But I am trying to (slowly) disambiguate such bugs, and fix some of them too.

Revision history for this message
Rocko (rockorequin) wrote :

I have some more observations:

1. I tried gnome-shell for a day, and at one point glxspheres was suffering in performance, but not as badly as under compiz. The animation was periodically freezing for a half second - it would then report one (say) 40fps reading, and then immediately jump back to 59fps. I didn't notice any slowdown in the UI, though.

2. Today in compiz I had the slow window dragging issue after a few hours of use, ie when you drag a window it only moves the window jerkily, and if you move the mouse too fast the window stops moving altogether. However, and perhaps strangely, glxpheres reported a consistent 59fps. Animations were slower than usual although the super-S and super-W animations were still nice and fast.

The only odd thing that had happened in the session was that compiz had earlier lost track of a window while I was dragging it when another window was opened - I had to manually kill the process and restart it because compiz couldn't re-display it.

I tried a ps auxw |grep compiz and it reported 721 MB VSZ and 71MB RSS, whereas after startup it's more like 800MB and 120MB.

I'll try the PPA version to see if it helps.

Revision history for this message
Rocko (rockorequin) wrote :

Almost a day later the PPA version of compiz is still performing nicely even after a few suspend/resume cycles (this is on an Intel GPU). I haven't noticed any UI slowdowns and the slowest that glxspheres has shown is 58fps.

There have been a couple of issues, which may not be related:

* Unity crashed once and restarted when I tried to open a window in Thunderbird. Afterwards I had to restart Thunderbird because it just displayed as a large empty frame with the background showing through. compiz does generally have trouble with Thunderbird, though.

* The adjust screen brightness buttons stopped working after a suspend/resume.

* A couple of times the screensaver has kicked in while I was typing (it immediately stopped when I hit the next key).

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

If you ever want to revert to the original compiz version, you could try a script like the one I use. Something like this:

sudo apt-get install compiz/oneiric compiz-core/oneiric compiz-gnome/oneiric compiz-plugins/oneiric libdecoration0/oneiric libdecoration0-dev/oneiric

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

Rocko, after you have established the bug has gone away, please try reverting to the original version of compiz and see if it comes back. If it does come back reliably without my PPA fix then it will be safe to mark this as a duplicate of bug 763005.

Revision history for this message
Rocko (rockorequin) wrote :

OK, I'll keep testing the PPA version for a while first.

With the PPA version, I did encounter the 'jerky' animation while moving windows problem again, ie where you move the mouse but the window only moves every twenty pixels or so of mouse movement (and sometimes it will freeze and wait until you stop moving the mouse before it moves the window). Is that likely to be a different bug? compiz wasn't using a lot of memory at the time and glxspheres still showed 57-59fps, so that was fine.. I opened ccsm and turned off session management, which crashed compiz (as ccsm often does), and when it restarted moving windows was smooth again.

Is there anything I can check that might be useful when I encounter the 'jerky' windows movement again?

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

I believe the jerky window moving problem is a bug in unity-window-decorator. That's my suspicion anyway. I noticed the same bug, but it too vanished mysteriously after a while and hasn't come back for many days.

Someone has probably already logged that bug elsewhere if you care to dig deep enough to find it.

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

I've set a cron job to log ps auxw every hour. It hasn't gotten to intolerable proportions yet, so I'll wait until reporting that. However, I have noticed the VSZ and RSS columns moving upward.

Revision history for this message
Scott Deagan (scott-deagan) wrote :

I installed the 285 and 290 (beta) drivers, but the problem persists in 11.10.

I did a fresh install (and applied all updates) to Ubuntu 11.04 and no longer suffer from this problem.

I'm going to stick to 11.04 for the time being. Hope this problem is solved soon as 11.10 is fantastic (other than this problem).

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

I was away from the affected machine for the weekend. I've gotten it to the point of intolerability. I'll upload the log I made.

beginning: 746556 176164
end: 878552 255664

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :
Revision history for this message
Scott Deagan (scott-deagan) wrote :

I think I have found a solution to this. On my Sony Vaio VPCF11S1E running an nVidia 330M, I did this:

1. Start CompizConfig Settings Manager.
2. Type in "workaround" in the filter text box.
3. Tick "Fix screen updates in XGL with fglrx".
4. Tick "Force synchronization between X and GLX".

I have no idea what these do, but it seems to have solved "jerky/laggy window movement" issue for me in 11.10.

Revision history for this message
Rocko (rockorequin) wrote :

I have reproduced the problem with the PPA version of compiz. It was *much* harder to reproduce it with the PPA version, though.

I think it might be related to memory stress - my system ran out of RAM and was using swap heavily, glxspheres dropped to around 40fps, and compiz was only reported as using 31MB of RAM instead of the more normal 120MB. Killing processes so that RAM usage returned to normal didn't help, though. (Currently the system is showing 37MB of swap usage.)

Restarting unity and then compiz didn't help - in fact performance dropped to 30fps, although compiz was again using 120MB. Logging in and out also didn't help (still 30fps).

Restarting lightdm made performance go back up to 40-44fps.

('Force sync between X and GLX' doesn't help, either. But the jerky windows movement must be a different issue because it occurs independently of the glxspheres slowdown - I don't have jerky windows at the moment but I do have the drop in glxspheres' fps.)

Revision history for this message
Rocko (rockorequin) wrote :

And in fact a full system reboot hasn't helped, either. glxspheres is running at 30-40fps.

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

Well spotted Scott. I hadn't looked at the Workarounds section for a very time and didn't know it had syncing options.

I suggest you will get the best performance using the workaround option "Force full screen redraws (buffer swap) on repaint", but if will perform well ONLY if you have ppa:vanvugt/compiz enabled. Because optimizing buffer swap performance is part of the fix for bug 763005 which is only fixed in my PPA so far.

The above suggestion, in theory, is also equivalent to a fix for bug 880707.

summary: - compiz 3d performance regression
+ Running compiz makes 3D apps like glxspheres (VirtualGL) perform worse.
description: updated
Changed in compiz (Ubuntu):
status: Incomplete → Confirmed
tags: added: testcase
affects: compiz (Ubuntu) → unity (Ubuntu)
summary: - Running compiz makes 3D apps like glxspheres (VirtualGL) perform worse.
+ Unity makes 3D apps like glxspheres (VirtualGL) or glxgears perform
+ worse.
description: updated
description: updated
summary: - Unity makes 3D apps like glxspheres (VirtualGL) or glxgears perform
- worse.
+ Unity makes 3D apps run much slower.
Rocko (rockorequin)
description: updated
description: updated
tags: added: regression-release
Changed in unity (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in unity (Ubuntu):
status: Confirmed → In Progress
Changed in compiz (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
Changed in unity:
status: New → In Progress
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in compiz (Ubuntu):
status: In Progress → Invalid
Omer Akram (om26er)
no longer affects: compiz (Ubuntu)
summary: - Unity makes 3D apps run much slower.
+ [regression] Unity makes 3D apps run much slower.
description: updated
description: updated
description: updated
Omer Akram (om26er)
Changed in unity:
importance: Undecided → High
Changed in unity (Ubuntu):
importance: Undecided → High
summary: - [regression] Unity makes 3D apps run much slower.
+ [regression] All apps have a lower frame rate under Unity.
50 comments hidden view all 130 comments
Revision history for this message
Florin Coras (fcoras) wrote :

Thanks! Just installed them both on my laptop with an Nvidia NVS 140M and a C2D T9300. First impressions:

- I can also confirm the increase of the number of fps in glxspheres to ~140 just after logging in. This is identical to the results in gnome-shell.
- No tearing when moving windows around

Downsides:
- Aggregate CPU usage of compiz, unity and X is constantly above 5% (3% compiz, 1% unity and more than 1% X). Gnome-shell typically uses just 1-2%.
- After several minutes of using chrome, thunderbird and other applications, glxspheres frame rate dropped to 40-70fps.

Other thoughts:
- enabling of chrome flags "GPU compositing on all pages" and "GPU Accelerated Canvas 2D" has quite a detrimental effect on frame-rates.

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

All, the issue with windows freezing while being dragged is being handled in bug 773861. At least, that's where I'm directing all reports of the problem.

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

Interestingly, the fix for bug 897045 provides an extra improvement in frame rates when testing glxspheres. I'll try to get that in ppa:vanvugt/compiz within the next day.

Revision history for this message
Rocko (rockorequin) wrote :

I can confirm the improvement in framerates with glxspheres - the latest version from the PPA now gives a consistent 150-160 fps for the nvidia card via virtualgl. It's significantly better than mutter now.

tags: added: performance
Revision history for this message
EliCoten (launchpad-elicoten) wrote :

I see I'm joining in here quite late, but the problem I'm experiencing fits this bug description perfectly. I'm using the ATI Radeon open source driver because my video card is no longer supported by the flgrx driver. (I don't know if this is relevant but after booting up the machine I always suspend and resume before logging in otherwise my fans never come on and the laptop gets too hot).

Revision history for this message
EliCoten (launchpad-elicoten) wrote :

I've just installed all the packages from your PPAs (both Unity and Compiz) and I find that whilst the performance is slightly better than it was before, it's still not as good as it was in Natty (or in the Oneiric default version of Compiz with Unity plugin disabled). I'm using a ATI Radeon X1250 with the radeon open source driver - the proprietary driver doesn't support my graphics card any more.

So unless I've made some mistakes during the installation, which is very possible, it seems that these packages don't fix everything for me.

I haven't done any proper benchmarks but I can see two main differences:
-1 The animations seem to play properly now - by that I mean that although everything seems to happen in slow motion, they are not 'jerky' as they were before
-2 The system feels a bit more responsive, especially to keyboard input when typing. There is still a noticeable lag between pressing a key and the character appearing on screen but nowhere near as much as before I installed the patch
-3 Previously, I could get perfect performance (as I had in Natty) with Compiz with the Unity plugin disabled. Now disabling the Unity plugin doesn't help at all and the problems with the performance remain.

Hope this is helpful

Revision history for this message
Rocko (rockorequin) wrote :

@EliCoten: Regarding when you are using the unity plugin, how recently did you install from the PPA? As of a few days ago there is a new distribution release of unity which gets installed in preference to the PPA's version. If you do "dkg -l |grep unity-common" you should see version 4.24.0-0ubuntu2b1vv5 if you've got the PPA version. Otherwise you've got the slower distribution release.

Revision history for this message
Bucic (bucic) wrote :

I got 4.24.0-0ubuntu2b1vv5 and something has changed. First I get no stuttering while dragging windows anymore. Second - Unity dash started to reveal itself after 1-1.5 sec delay. Third - alt-tab switcher (no switcher shows, not even the old 2d one), Win+W and other Unity features don't work for me anymore and I don't know at what stage it happened as I was using Unity 2D for weeks now.

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

Nothing has changed in ppa:vanvugt/unity for 10 days. And even before that there were very few changes:
http://bazaar.launchpad.net/~vanvugt/+junk/ppa-vanvugt-unity-oneiric/view/head:/debian/changelog

Bucic: I don't think the fix for this bug is related to your new problems.

EliCoten: Please try removing ppa:vanvugt/compiz. It does not contain any code relevant to this bug and is likely causing some regression you talk about. I know I recommended ppa:vanvugt/compiz because it seems to help so many people, but it's still under development. Please try testing ppa:vanvugt/unity alone.

I am totally confident this bug is fixed in ppa:vanvugt/unity. I am not totally confident that ppa:vanvugt/compiz is right for all hardware configurations just yet.

Revision history for this message
Rocko (rockorequin) wrote :

@Daniel: I don't think it is possible to install the version of unity from your PPA any more. The latest version is now 4.24.0-0ubuntu2.1, which supersedes 4.24.0-0ubuntu2b1vv5.

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

It's only a problem if you're using the proposed (pre-release) packages. ppa:vanvugt/unity is still ahead of the official oneiric-updates. See: https://launchpad.net/ubuntu/oneiric/+source/unity

But I'll try to sync the PPA with proposed some time soon.

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

The issue with ppa:vanvugt/compiz causing animations to play in "slow-motion" should now be fixed if you update to ppa:vanvugt/compiz version 1:0.9.6+bzr20110929-0ubuntu6vv8.

Revision history for this message
EliCoten (launchpad-elicoten) wrote :

Sorry I didn't realise I wasn't subscribed to this bug - sorry it's taken me so long to reply.

I uninstalled the Compiz PPA and now I'm using version unity version 4.24.0-0ubuntu2.1vv1 and Compiz 1:0.9.6+bzr20110929-0ubuntu6. It seems to better - at least it's usable - but I still think it's not as smooth as it was when I was running Natty.

Revision history for this message
EliCoten (launchpad-elicoten) wrote :

After a little more testing, I have found that disabling the Unity plugin from Compiz-Config Settings Manager still increases performance.

I don't have any scientific test or benchmark but I was running a video totem and noticed the following observations:

**Unity Plugin Enabled**
-Video seems to play ok windowed but when I drag it around the screen it doesn't move smoothly (I have wobbly windows enabled and this really shows up the lag)
-Full screen video is not smooth

**Unity Plugin Disabled***
-Video plays fine and there is hardly any noticeable lag when wobbling/dragging the video round the screen
-Full screen video seems to be smooth

So the difference is certainly noticeable, at least under some conditions. For everyday use, the difference is less noticeable but Videos and Wobbly Windows are more noticeable when there's a lag.

So for me, this patch is a great improvement but I don't think it's totally resolved yet.

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

Tagged power-management. Because the root cause of this bug is Unity constantly (ab)using the GPU even when it should be idle.

tags: added: power-management
Revision history for this message
Rocko (rockorequin) wrote :

@Daniel: re power management, is this what your patch addresses, or it a separate issue?

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

Yes, my fix or any fix for this bug should reduce GPU power consumption. It may be very significant with some drivers/hardware, but is hard to prove without careful testing. Especially since GPU power hogs don't usually show up in CPU lists like "top".

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

The fix has finally been committed to lp:unity r1816. Though smspillaz redesigned it slightly to fit in with his other changes. I assume the fix still works...

Changed in unity:
status: In Progress → Fix Committed
Revision history for this message
Rocko (rockorequin) wrote :

That's excellent! Thanks for all the great work getting this fixed, Daniel!

I can't wait for r1816 to hit the official repos, especially as I've also experienced the crashes mentioned in the other bugs that r1816 says it fixes.

Revision history for this message
Leuke (leuke) wrote :

Daniel, I'm using your ppas, both compiz and unity. I installed them when screenlets were already installed and active on my desktop and everything worked smoothly.
As I tried to remove screenlets, after reboot compiz didn't load anymore. The possible solutions were either re-installing screenlets package and continue using your ppas or downgrade to official versions of compiz and unity (proposed repository).
I don't know if this is a bug, it could be just my system a little messed up, but since the fix is going to official repositories maybe it's worth investigating.

Revision history for this message
Owais Lone (loneowais) wrote :

For those who are brave enough and can't wait, r1816 will be hitting the staging ppa in the next 24hours.

Download from https://launchpad.net/~unity-team/+archive/staging/+packages

Revision history for this message
Rocko (rockorequin) wrote :

I can't recommend upgrading just yet: the upgrade from ppa:unity-team/staging removes unity completely at the moment. ("unity : Depends: libnux-abiversion-20111213 but it is not installable", even though the libnux-2.0-0 2.0.0~+bzr534ubuntu0+307 package was built only 5 hours ago.)

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

I've deciphered some of the branching chaos and found the (unity) fix has slipped into lp:unity/4.0 already (r1726). Now I have created the missing branch links, it's more obvious.

Sam, please be careful. You obviously lost track of which bug fixes your merge proposals contained. But it's excellent to see the fixes for bug 861061 and bug 880707 actually being released.

This bug is now fix-released in unity 4.28.0 "SRU2". Could someone please fix the "unity" Milestone column to show this?

Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu Oneiric):
status: New → Confirmed
Changed in unity (Ubuntu Oneiric):
status: Confirmed → In Progress
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I now see the correct status should be like that of bug 887465.

Could someone please mark this bug as Fix Committed in unity 5.0.0, and Fix Released in 4.28.0 "SRU2"?

Revision history for this message
Rocko (rockorequin) wrote :

Where is version 4.28, btw? The latest one I can see in oneiric-updates/proposed is still 4.24.

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

Unity 4.28.0 has been released upstream (for developers only). It's not in any ubuntu branches yet.

Upstream: https://launchpad.net/unity/4.0/4.28.0
Ubuntu: https://launchpad.net/ubuntu/+source/unity

Omer Akram (om26er)
Changed in unity:
status: Fix Released → Fix Committed
milestone: none → 5.0.0
Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.0 KiB)

This bug was fixed in the package unity - 5.0.0-0ubuntu1

---------------
unity (5.0.0-0ubuntu1) precise; urgency=low

  [ Didier Roche ]
  * New upstream release.
    - compiz crashed with SIGSEGV in __dynamic_cast() (LP: #853038)
    - unity-panel-service crashed with SIGSEGV in panel_service_show_entry()
      (LP: #861144)
    - unity-panel-service crashed with SIGSEGV in
      panel_indicator_entry_accessible_get_n_children() (LP: #869816)
    - Launcher - Launcher icon for Dash does not highlight when the Alt+F1 key
      shortcut is pressed (LP: #849561)
    - compiz crashed with SIGSEGV in unity::PanelTray::FilterTrayCallback()
      (LP: #868868)
    - [regression] Compiz: Visible tearing is worse in 11.10 than 11.04, even
      when "Sync To VBlank" is enabled, but only when Unity is active.
      (LP: #880707)
    - [regression] All apps have a lower frame rate under Unity. (LP: #861061)
    - compiz crashed with SIGSEGV in
      nux::Property<nux::color::Color>::operator=() from
      unity::switcher::SwitcherController::OnBackgroundUpdate() (LP: #887465)
    - DashSearchBarSpinner.cpp:56: Conditional jump or move depends on
      uninitialised value(s) (LP: #901610)
    - quicklist shows in incorrect position when launched from workspace
      switcher (LP: #914251)
    - Build "show me the desktop" mini-app that adds a show desktop button to
      Launcher (LP: #681348)
    - Select quicklist items with just one right click (LP: #688830)
    - cannot change volume by scrolling on the icon when the SoundMenu is
      opened (LP: #722082)
    - [a11y] Unity launcher buttons are not Actionable (LP: #772573)
    - Ubuntu Start launcher item doesn't start dash with keyboard navigation
      (LP: #825037)
    - multimonitor , window management - Multi-Monitor Maximized Difficulty
      (LP: #843958)
    - [regression] Drag and drop inside dash is very slow with Active Blur
      activated (LP: #851172)
    - Activating an alt-tab icon that holds initially unminimized windows
      should unminimize all windows (LP: #854595)
    - Dash - The Dash category headers are positioned incorrectly
      (LP: #839467)
    - Missing global menu with a semi-maximized window dragged to the right.
      (LP: #861279)
    - Launcher - Dragging and dropping a running application in to the Trash
      should quit the application and (if the app is pinned to the Launcher)
      un-pin the application from the Launcher (LP: #870143)
    - top bar, integrated menu - when a application is first launched, the
      integrated menu should be displayed for 2 seconds before fading out of
      view (LP: #874254)
    - Window control buttons are not shown when an indicator is opened and the
      pointer is over the top-left corner (LP: #890970)
    - Quicklist item using some special chars doesn't show at all
      (LP: #899677)
    - PanelView.cpp:370: Conditional jump or move depends on uninitialised
      value(s) (LP: #901602)
    - unityshell.cpp:1982,1984: Conditional jump or move depends on
      uninitialised value(s) (LP: #901603)
    - Dash Search spinner sometimes doesn't spin at all (LP: #903090)
    - Point of tooltip is misaligned to focused ap...

Read more...

Changed in unity (Ubuntu Precise):
status: In Progress → Fix Released
Revision history for this message
Rocko (rockorequin) wrote :

So far 4.28.0 is working nicely on my system, although after switching external monitors a couple of times, I did notice a massive slowdown in the framerate obtained using optirun glxspheres (ie using the nvidia card via VirtualGL). It slowed down from 150fps after booting to only 60-70fps. (Note that just using glxspheres by itself gave ~59.1 fps instead of ~59.6 fps, so there wasn't a big difference there).

Restarting unity didn't help, but a reboot did. Might this have been an issue in compiz rather than unity?

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

I'm sure there are other performance bugs we haven't pinpointed yet. If you have Sync To VBlank enabled (which is default) then 60 FPS is probably to be expected. Because the framerate should be the same as your monitor; never higher.

Unfortunately with a few compiz/unity performance bugs pending and their fixes not available for testing yet, it's hard to tell what's what. And very difficult for anyone to identify which bug they're experiencing with certainty. It will get easier as more fixes are released...

Revision history for this message
Rocko (rockorequin) wrote :

Yes, that's true if I run glxspheres through the intel card, but running through optirun, the nvidia card doesn't respect the sync-to-vblank setting, so the expected result is a rate considerably higher than the 60 fps monitor. I get 150fps normally with the fixed unity/compiz, but it regressed down to around 70fps in this case.

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

Fix Released in oneiric: unity (4.28.0-0ubuntu1) oneiric-proposed; urgency=low

Changed in unity (Ubuntu Oneiric):
status: In Progress → Fix Released
Revision history for this message
Rocko (rockorequin) wrote :

fwiw I just upgraded to Precise, and glxspheres (just running through the intel card) now only gives me 1-2 frames per second. Is this a known issue? Sync-to-vblank makes no difference. I'm running compiz 1:0.9.7.0~bzr2995-0ubuntu5 and unity-common 5.4.0-0ubuntu2.

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

Sounds bad. Please log a new bug Rocko.

Revision history for this message
Rocko (rockorequin) wrote :

Should I log the new bug against unity or compiz?

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

If you can reproduce the slowness while you have the Unity plugin disabled in ccsm (unity not running) then log it against "compiz-core". If the slowness goes away while unity is disabled, then log it against unity.

If in doubt, log it against both.

Revision history for this message
Rocko (rockorequin) wrote :

OK, if I disable unity-plugin via ccsm it still runs slow so it looks like I should log it against compiz. The unity animations are still fast, btw.

Revision history for this message
Achim (ach1m) wrote :

I reported a new Bug #987304 because suddenly my 3D-Apps are running slow again with ubuntu 12.04 and unity.
Please let me know if you need more information.

Revision history for this message
Bernhard Kaindl (benkai) wrote :

Me too - slow fps with 12.04 and unity (even with Unity-5.14 from SRU-1), using Nouveau on NV44:

- Slow fps with compiz running with unity plugin
- Fast fps with compiz running without unity plugin (can be switched in ccsm when selecting the profile called "default")

Examples:
1) briquolo:
- Reference: The briquolo menu screen shows 90fps with Unity-6.2 packages from Quantal compiled on Precise.
- With Unity 0.14 packages, after fresh unity start it gives 50fps and after working a while on the desktop, it drops to around 20 fps.

2) Frozen Bubble (ancient 2D game, does not use OpenGL and isn't heavvy on the animation at all....):
- After working a while on the desktop, the balls in frozen bubble were so slow that they were falling in like with a Cinemal effect which is described as "slow motion" (lets say half or one third of the normal animation speed)

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

Bernhard,

This issue is now being tracked in bug 988079.

Displaying first 40 and last 40 comments. View all 130 comments or add a comment.
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.