Game performance is choppier with compiz enabled (not unity)

Bug #996343 reported by jhfhlkjlj on 2012-05-08
64
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Compiz
Undecided
Unassigned
Compiz Core
Undecided
Unassigned
compiz (Ubuntu)
Medium
Unassigned

Bug Description

When compiz is enabled, all of my games have a slight jag to them, skipping a few frames every second. This choppiness can range from merely annoying to headache-inducing, depending on the game. This is not Unity-specific as running a unity-less compiz session still presents the issue. Furthermore, this is not an Nvidia binary issue as the nouveau/intel drivers makes no difference. Disabling vsync or manually setting my refresh rate makes the issue worse. Also, desktop animations appear to be smooth with no problems (though they may just be too short to really notice). I have noticed that smooth scrolling with firefox also drops a few frames: not enough to notice the issue when using compiz but I noticed it when I found smooth scrolling to be butter smooth under unity2D.

Game performance is butter-smooth when I use Ubuntu 2D. Not a hiccup to be had.

For an example of the choppiness, please see the video. Watch the clouds. Since the video was recorded at only 15 fps, the choppiness is slightly higher than what I actually experience.

https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/996343/+attachment/3136325/+files/bug.ogv

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: compiz 1:0.9.7.8-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: nvidia
.proc.driver.nvidia.gpus.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 295.40 Thu Apr 5 21:37:00 PDT 2012
 GCC version: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
.tmp.unity.support.test.0:

ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
CompizPlugins: [core,composite,opengl,decor,commands,regex,winrules,compiztoolbox,animation,grid,vpswitch,snap,place,gnomecompat,resize,move,mousepoll,imgpng,workarounds,session,expo,wall,ezoom,fade,scale,unityshell]
CompositorRunning: compiz
Date: Tue May 8 01:12:21 2012
DistUpgraded: 2012-04-26 18:36:18,125 DEBUG enabling apt cron job
DistroCodename: precise
DistroVariant: ubuntu
DkmsStatus:
 nvidia-current, 295.40, 3.2.0-23-generic, x86_64: installed
 nvidia-current, 295.40, 3.2.0-24-generic, x86_64: installed
 nvidia-current-updates, 295.40, 3.2.0-23-generic, x86_64: installed
 nvidia-current-updates, 295.40, 3.2.0-24-generic, x86_64: installed
GraphicsCard:
 NVIDIA Corporation GF114 [GeForce GTX 560] [10de:1201] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: eVga.com. Corp. Device [3842:1461]
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
JockeyStatus:
 xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
 xorg:nvidia_current_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Enabled, In use)
MachineType: Gigabyte Technology Co., Ltd. P45T-ES3G
PackageArchitecture: all
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-24-generic root=UUID=d6e4b7ad-8812-4f12-9b1d-e9a5a51d7228 ro quiet splash vt.handoff=7
SourcePackage: compiz
UpgradeStatus: Upgraded to precise on 2012-04-26 (11 days ago)
XorgConf:
 Section "Device"
  Identifier "Default Device"
  Option "NoLogo" "True"
 EndSection
dmi.bios.date: 02/23/2011
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F1
dmi.board.name: P45T-ES3G
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF1:bd02/23/2011:svnGigabyteTechnologyCo.,Ltd.:pnP45T-ES3G:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnP45T-ES3G:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: P45T-ES3G
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
version.compiz: compiz 1:0.9.7.8-0ubuntu1
version.ia32-libs: ia32-libs 20090808ubuntu35
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.2-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.2-0ubuntu3
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu10.1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

I forgot to mention: Disabling vsync made the issue worse, and manually setting my refresh rate did nothing.

description: updated
description: updated
Launchpad Janitor (janitor) wrote :

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

Changed in compiz (Ubuntu):
status: New → Confirmed
Changed in compiz-core:
status: New → Confirmed
Changed in compiz (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
description: updated
Omega-xis (nieknooijens) wrote :

[quote]
I forgot to mention: Disabling vsync made the issue worse, and manually setting my refresh rate did nothing.
[/quote]

I've got the same thing, the lower you put the graphics quality the worse it gets....

description: updated
description: updated
Daniel van Vugt (vanvugt) wrote :

Chauncellor, do simple apps like glxgears show the same lack-of-smoothness?

Changed in compiz (Ubuntu):
status: Triaged → Confirmed

Yes, sir. Thinking back, this choppiness came into compiz when I started using your ppa during Oneiric (vv6 rings a bell but I'm not certain at all). I recall removing the ppa at one point to have my games work smoothly again.

Daniel van Vugt (vanvugt) wrote :

Interesting, because disabling vsync should, in theory, revert back to the older scheduling algorithm which apparently worked for you.

Daniel van Vugt (vanvugt) wrote :

Another idea: This could be the known problem with glFinish (in the default rendering path) slowing down rendering. glFinish was introduced to eliminate tearing. To work around it try CCSM > Workarounds > enable "Force full screen redraw (buffer swap) on repaint". That will use the simpler glXSwapBuffers code path which usually provides faster frame rates and much better smoothness. And without tearing.

We have several ideas in mind for ensuring the latter is enabled by default in 12.10 (see bug 901097). But some other code needs to be fixed before we can turn it on for all users.

Sadly, that didn't seem to help much. It made it feel a little different but the issue persisted.

Changed in compiz:
status: New → Confirmed
description: updated

I've read around and noticed that Xdamagereport seems to dramatically increase performance of compiz under 3D.

https://code.launchpad.net/~vanvugt/compiz/XDamageReport/+merge/108307

Does Daniel's PPA contain this fix? Would love to test it out and report back to see if it fixes the issue.

Daniel van Vugt (vanvugt) wrote :

That fix is not in any PPA and won't be for a while. First I found a theoretical problem with it, then I found it causes real regressions (occasional minor damage artefacts). So I removed it not long after it was committed. More work is required before users can or should test that change.

description: updated
Omega-xis (nieknooijens) wrote :

iloveubuntu gives the following info:
http://iloveubuntu.net/unity-512-released-improved-3d-apps-performance-ubuntu-1204

they claim it's fixed but I don't think so....

Daniel van Vugt (vanvugt) wrote :

I think that article is referring to unity update: 5.12-0ubuntu1.1, which contains a fix for bug 987304.

Nate Wiebe (natew) wrote :

This bug should have a high priority. With Valve wanting to put their chips into Ubuntu, Unity out of the box needs to be able to keep up with the others. Looking at these benchmarks: http://www.phoronix.com/scan.php?page=article&item=ubuntu_1210beta_desktops&num=1

This IS NOT the case. When running fullscreen opengl applications, there needs to be a way to disable desktop effects or something that will get the framerate to where it should be. Otherwise I could definitely see new users thinking, "I'll give Linux a try." use Ubuntu, have a terrible gaming experience (Due to low frames) and either go back to Windows, or buy an Apple PC.

I know I sound a bit crazy, but Linux's big chance is coming up, and we have to be ready if we want this to take off.

Nate Wiebe (natew) wrote :

Note: Especially with Unity 2D gone, which was what I used in order to play games at a reasonable framerate.

tags: added: performance
Omega-xis (nieknooijens) wrote :

this bug has become worse in 12.10!
even stepmania and wine-games are now affected!

j-stuffer (j-stuffer) wrote :

Hi, I hope this is the right bug report to comment on :)

For me several games still run really slowy in Unity, but run okay in Unity 2D or on a seperate X-server. Recent examples are Dustforce, Oil Rush and Jamestown. For example Oil Rush with ultra/high has 53 fps in the main window on a seperate X-server but only has 33 fps and very laggy mouse cursor under unity. Dustforce and Jamestown are not even 3D-games and have very simple graphics but are very slow in Unity. Both run really smoothly in Unity 2D or on a seperate X-server (ctrl+alt+f1, log in and then startx /usr/bin/ck-launch-session /opt/jamestown/Jamestown -- :1).
I also tested:
- Gnome Classic with effects: Same issue as with Unity 3D
- Gnome 3 Shell: No problems

The cause for the problem could also be the proprietary nvidia drivers. For example Jamestown and Dustforce on my main PC (Core 2 Duo 2.66 GHz, GeForce GTS 450) have performance problems with Unity. But on my laptop (Dell Studio 1558 i3 with ATI 5740, I think) both games run okay (didn't test Oilrush, as the download is very big). And that's a bit surprising, as my Desktop PC overall should provide a lot more gaming performance than my Laptop.

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

Duplicates of this bug

Other bug subscribers