Ubuntu – What to do against game performance drop in 12.04 when using unity (3D)


I experience a huge drop in game performance since my fresh install of ubuntu 12.04

My PC consists of an Nvidia Geforce GTX 460, AMD Phenom II X4 965 CPU and 4GB of RAM and I use nvidias proprietary driver.

I mainly play Heroes of Newerth by using their linux client. I do this since ubuntu 9.10 and I had never experienced any performance issues when using the proprietary nvidia driver. My fps was always maxed to the vsync frame cap of 60.

Since I run ubuntu 12.04 I get around 30-45 fps and game experience in general is very laggy. I know that there are a lot of people having issues with nvidias 295.40 driver, which is sadly installed by default in ubuntu 12.04. So I manually installed the latest stable 295.49, latest beta 302.07 and even the older version 295.33 used in ubuntu 11.10 (where I never had any issues with performance). It was a waste of time since I was experiencing the same performance problems with all 4 driver versions.

When I use Unity 2D my fps is back to 60 and overall game performance is great.
So I only have those issues when running ubuntu 12.04's version of Unity.

I also tried to delete my .config and .compiz-1 folders in the home directory but still game performance is a mess when using unity.

I don't know what to try next…
Does anybody know how I can further debug the issue?
Maybe how I can provide more data to better analyse the problem?
Maybe try to fiddle with some compiz settings?

This performance regression is really frustrating and I am thinking of just downloading Heroes of Newerth's windows client and going back to dual boot since this is simply unacceptable.

Any help appreciated.

Best Answer

It's not a real solution, but at least it might be a (hopefully) useful workaround (apart from simply using Unity 2D).

Before you start a game, open up Nautilus (the file manager) and go to /usr/share/application. Open up a terminal, type metacity --replace, and press enter. Don't panick, the Unity interface will disappear, but this is my intention. Launch the game from the file manager (the launcher for the game should be in the folder I mentioned). After you finish playing your game, type unity --replace in the terminal window, and press enter. Your desktop is now restored to how it was.
This should work as it's probably Unity running in the background that's causing trouble.

Also, I'd report this as a bug. It's definitely something that needs to be fixed. If you submit a bug report, be sure to leave a link here so other people who are experiencing this problem can mark it as "affecting them", which will get it fixed sooner.

Related Question