Compiz CPU usage dramatically increased in Ubuntu 14.04

Bug #1293384 reported by Thomas Hellström
608
This bug affects 123 people
Affects Status Importance Assigned to Milestone
Compiz
Confirmed
Medium
Unassigned
compiz (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

It appears that the workload of low-level graphical operations used by compiz when, for example, moving windows has increased dramatically between Ubuntu 12.04 and Ubuntu 14.04.

This might not be that visible when using high-end gpus, but should be clearly visible when using compiz on llvmpipe and to some-extent invalidates the approach of using compiz on top of llvmpipe as a fallback when no GPU is available:

How to reproduce:
1) Use the unity-3d desktop in Ubuntu 14.04 on top of a non-accelerating Xorg driver like "modesetting". Move windows around. Note peak and average cpu-usage.

How to verify compiz is the culprit:
1) copy /usr/bin/compiz from a Ubuntu 12.04 installation. Drop it in as /usr/bin/compiz on 14.04. Reboot. Perform the same window movement. CPU-usage should be substantially lower.

This problem also affects VMs running on VMware ESX with a software-rendering GPU. Window movement becomes sluggish, which suggests that even with GPUs, compiz has increased the number of operations required to move windows.

Tags: compiz
Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :

You can force cpu fallback with LIBGL_ALWAYS_SOFTWARE=1, it's probably due to some effects being enabled on llvmpipe, like unity blur.

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
Thomas Hellström (thellstrom) wrote :

I'm not sure whether there's a way to raise the importance / severity of this bug, but according to VMwre QE, this severely affects the usability of Ubuntu 14.04 on ESX.

/Thomas

Revision history for this message
John Savanyo (jsavanyo) wrote :

It's disappointing that the Ubuntu 14.04 release has this regression and I'm assuming that a fix is not going to be included in the final 14.04 release due to lack of action on this bug report. So this brings up the following questions:

(1) What can be done to prevent new Ubuntu release regressions when running in a VMware virtual machine?? Could we (Canonical or VMware) found this problem earlier? Does Canonical do any testing of their future OS releases on VMware products before release?

(2) We reported this problem on 3/17, why couldn't we get a fix for this implemented in time for the final 14.04 release? What could we have done differently to get this resolved in a more timely way? Hypothetically, future Ubuntu releases could have similar problems, so we would like to know how to better coordinate fixing issues like this.

(3) Assuming fix will not get into 14.04, can Canonical release an errata patch for this fix or include it in 14.04.1?

Thanks,
John

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

This bug was escalated to the development team and they are looking into it.

Unity7 will turn off certain effects if the underlying hardware reports it does not support it. The initial finding is that mesa seems to be reporting support for many more effects but they are emulated in software.

Once a workaround is found we can work toward an SRU for it.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Unity is already disabling most of effects when using sw-rendering, we can check how to reduce this to the maximum, but I think that at unity level most of the elements have already been addressed.

The problem when moving the windows affects compiz also when unity is not loaded, so I don't think unity impacts much on that.

From what you say on description by the way, I believe that you were using unity-2d on that setup, at 12.04 times, but it has been deprecated since 12.10; so simple new compiz can't be compared with the one at 12.04.

Revision history for this message
Thomas Hellström (thellstrom) wrote :

Hi!

The 12.04 vs 14.04 compiz issue indeed seems fishy. I can't even get compiz from 12.04 to start on my 14.04 system. I'll double-check with VMware QE.

However, the issue is, according to our testers present when running in 3D mode on ESX (on a slow llvmpipe-based GPU), but I guess in that case, Unity has no way of detecting that the GPU is slow, and hence runs with all effects enabled?

/Thomas

Revision history for this message
Christopher Townsend (townsend) wrote :

Yeah, there is no way to just drop /usr/bin/compiz from 12.04 onto a 14.04 install. It simply will not work due to plugin mismatches, etc.

One way to see if 3d is enabled is to run /usr/lib/nux/unity_support_test -p and see the output. If it says "Not software rendered: no" then the effects are turned off.

I did an experiment by setting nomodeset=1 in the kernel command line for both 12.04 and 14.04. This enabled llvmpipe on the machine and in 12.04, the nice Unity2d was running, but as Marco said that was deprecated since 12.10. On 14.04, it's the software rendered Compiz+Unity3d which pales in comparison to Unity2d. This is because all of the OpenGL rendering is done in the CPU which is not very efficient at these tasks. When I ran this on 14.04 (bare metal mind you), I'm guessing the frame rate is ~20 fps w/ very high CPU usage when dragging a window around. Even scrolling up and down in Firefox produces lower frame rates and high CPU usage.

There really isn't anything we can do in Compiz and Unity3d to help this anymore than what we already do as Marco suggested. What would help is a VMWare kernel module that virtualizes the GPU in Linux.

Revision history for this message
Thomas Hellström (thellstrom) wrote :

Yes. we were aware of the Unity2D vs Unity3D difference.

However, there *is* 3D support on vmware (although sometimes slow) and part of the problem is that also with
3D enabled, Ubuntu 14.04 is slower than with 3D enabled on12.04,
although we haven't quantified that yet, and we assumed that any
improvements here could also be applied to Unity 3D in software mode....

But as you mention, the problem seems to be more complex due to the fact that many effects are already disabled in software mode...

Thanks,
/Thomas

Revision history for this message
Christopher Townsend (townsend) wrote :

Hi Thomas,

Ok, thanks for the additional info. The comment about "modesetting" confused me as this definitely enables llvmpipe and software rendering and no GPU acceleration on both 12.04 & 14.04. I didn't realize the issue is when using the virtualized GPU driver in ESX.

We could probably add the VMWare 3D driver to our list of drivers that should use low graphics mode. This will disable the blur effect along with some other effects. If you can get the output from /usr/lib/nux/unity_support_test -p when using the VMWare 3D driver, then I could probably put together a test Unity package for you to try.

Revision history for this message
Thomas Hellström (thellstrom) wrote :

Hi!

Thanks. I think we need to discuss this internally first. The reason is that sometimes the virtual GPU is backed by a fast physical GPU. Sometimes it's not, and it's only in the latter case there is a performance issue, in the fast case, we'd want all effects enabled.

And also when the GPU is not enabled at all and compiz-on-llvmpipe kicks in, but as you say there's not much to be done in that case.

Thanks a lot for your help. I'll get back to you next week.

/Thomas

Revision history for this message
Christopher Townsend (townsend) wrote :

Hi Thomas,

Ok, I'll keep an eye out for any updates.

I set the importance to Medium for now pending your response. We can adjust accordingly if/when needed.

Changed in compiz:
status: New → Triaged
Changed in compiz (Ubuntu):
status: Confirmed → Triaged
Changed in compiz:
importance: Undecided → Medium
Changed in compiz (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Thomas, one thing you can do to disable some of the unity effects when not running on sw-renderer, is to run unity with:
  COMPIZ_CONFIG_PROFILE=ubuntu UNITY_LOW_GFX_MODE=1 compiz --replace

Other optimizations we could do in that case are:
 1) Disabling the compiz live-resize (it shouldn't affect movement btw)
 2) Reduce the decorations shadows radius

You can actually try to see if these aspects might affect you without any code changes, but just hacking on compiz settings with:
 a) install compizconfig-settings-manager
 b) run ccsm and change these settings:
      To verify (1): resize plugin → General → Resize mode: Rectangle
      To verify (2): unity plugin → Decorations → Override Theme Settings: checked (then hack on config)

Revision history for this message
Thomas Hellström (thellstrom) wrote :

Thanks. I'm still investigating the impact when run on our ESX software-based GPU.
For the settings

COMPIZ_CONFIG_PROFILE=ubuntu UNITY_LOW_GFX_MODE=1 compiz --replace

Is it possible (for an average user) to easily make these part of the login procedure?

Thanks,
Thomas

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

We might include a setting to control this value, if requested, but for now the easier way to get this enabled at login time is:

sudo gedit /usr/share/gnome-session/sessions/ubuntu.session
Remove "compiz" from the RequiredComponents list

sudo gedit /usr/share/upstart/sessions/unity7.conf:

Add these lines after "export COMPIZ_CONFIG_PROFILE":
env UNITY_LOW_GFX_MODE="1"
export UNITY_LOW_GFX_MODE

Another option might be to just add `export UNITY_LOW_GFX_MODE="1"` to the ~/.profile file, but it didn't work here always.

Revision history for this message
SergeiS (sergei-redleafsoft) wrote :

I am running Ubuntu 14.04 on bare metal, and yet compiz is eating CPU and desktop effects are slow IF the cpu loaded with something, even if the load is niced. I've tried the UNITY_LOW_GFX_MODE=1 compiz setting above and it makes no difference.
I am running stock intel drivers on Haswell c/gpu. Why does it say my hardware is not supporting Unity? 12.04 had no problems with that.

$ compiz --replace

compiz (core) - Info: Loading plugin: core
compiz (core) - Info: Starting plugin: core
compiz (core) - Info: Loading plugin: ccp
compiz (core) - Info: Starting plugin: ccp
compizconfig - Info: Backend : gsettings
compizconfig - Info: Integration : true
compizconfig - Info: Profile : unity
compiz (core) - Info: Loading plugin: composite
compiz (core) - Info: Starting plugin: composite
compiz (core) - Info: Loading plugin: opengl
compiz (core) - Info: Unity is not supported by your hardware. Enabling software rendering instead (slow).
compiz (core) - Info: Unity is not supported by your hardware. Enabling software rendering instead (slow).

Revision history for this message
Thomas Hellström (thellstrom) wrote :

OK, So I've finally been able to do a bit of testing with Ubuntu 14.04

If run without 3d support on llvmpipe, it's very CPU-hungry. A bit more so than Ubuntu 13.04 AFAICT. For Ubuntu on VMware this becomes troublesome primarily on ESX, but the problems were introduced with the drop of Unity 2D. I haven't dug thoroughly into why it hurts so much on ESX. Could it perhaps be that Unity / Compiz is performing full-screen flips when only a part of the screen is updated?

Also we have severe performance problems when running fully 3D accelerated with workstation / fusion on multi-monitor setups. That's partly due to how the VMware device updates screens but Ubunut 14.04 stands out as particularly slow here. Also needs further investigation...

/Thomas

Revision history for this message
Jan Evert van Grootheest (j-e-van-grootheest) wrote :

Another environment where this happens is multi-seat using a USB-to-VGA display controllers.

Revision history for this message
Renne (renne) wrote :

I'm running 64-bit Ubuntu 14.04 Desktop on a Fujitsu Siemens Amilo Si 2636 notebook. Just in this moment Compiz eats up 150% of CPU (Core 2 DUO) with only one Firefox window and tab opened. I can only type one char per second. Scrolling down a website needs up to ONE minute. The Battery runtime has dropped from 3.5 hours to 1.5 hours. If this keeps going on I have to wipe Ubuntu 14.04 from my disk ...

Revision history for this message
Furkan (falaca) wrote :

Thomas, I'm also having Xorg/compiz CPU usage issues for which I submitted bug report, and I was wondering if you could follow the steps I outlined and see if you get similar results: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1337749

Basically on a fresh boot, launch "top" in a terminal to monitor CPU usage. Then launch a Nautilus window and start moving it around, noting CPU usage. Then resize the window, and try moving it around and see what happens with the CPU usage.

For me, CPU usage jumps from 4% to around 30-40% (before/after the resize) using the open source radeon driver. With fglrx it starts higher at around 15-20%, and jumps to 60-70% after resizing. Even just scrolling down a page in Firefox results in ~70% CPU usage.

Revision history for this message
Furkan (falaca) wrote :

OK I think the problem is much worse than I originally thought. Even moving around the mouse causes massive CPU usage.

For example, launch Nautilus, and move the mouse around inside it for 15-20 seconds or so. CPU usage jumps to 25% each for Xorg and nautilus, and 15% for compiz. Similar results occur for any other program like say Firefox.

I'm really getting horrible all-around lagginess out of Ubuntu 14.04 because of this out-of-control CPU usage. I don't understand why there aren't widespread complaints about this? Is it only affecting a small portion of users?

Revision history for this message
nikhil (nayaknyk-nn) wrote :

I've been running 14.04 for a few days now and the cpu usage at idle hovers between 22-45% ,about 95% with chromium open, 50% with nautilius, 90% WITH DASH for gods sake, 60% with compiz and about 85% with ubuntu tweak running. And the lag was so horrible i had to disable almost all animations and effects AND reduce all animation times to 50 ms AND animation time step to 2..

For a contrast idle cpu usage was 5% in 12.10 and 2% in windows xp..Ive tried almost everything,nothing works..
I use:
wipro little genius WLG7B1630V
core2duo @2 ghz
2 gb ddr2 ram @333mhz
512 mb SiS vga graphics with vesa: 6330 drivers

Any workarounds guys??

Revision history for this message
Duke (dwalker-memphis) wrote :

Not a power user here, but I know when my machine is stammering while silent. System monitor revealed 45% cpu usage idling on the desktop. Moving cursor pushes it to 100%. Ran 11.4 previously, but support ran out and things started to fall apart. 14.04 is only OS on drive that ran 11.4 and xp pretty well. Celeron M 1.7ghz. (Old inspiron 600m) 2gb ddr2 333mhz. If my registering this helps escalate the issue I have surpassed my stature in geekdom.

Revision history for this message
Marchello_Lippi (0509655493-4) wrote :

Everything worked fine in 12.04 TLS, now I can't view movies properly because of distortions (both online video and files from my drive), compiz uses about 40% of CPU. Any help?

Revision history for this message
Steve (stevx) wrote :

All was cool with 12.04. I should never have upgraded but there you. nice top shows compiz and Xorg with cpu utilization in the 30s. Very unusable. Grrrr!!!!

I have the following from the lshw command:

    description: Mini Tower Computer
    product: OptiPlex GX270

If any other details are required then please let me know.

Changed in compiz:
assignee: nobody → Ricardo Leinhos (leinhos)
assignee: Ricardo Leinhos (leinhos) → nobody
Revision history for this message
Steve (stevx) wrote :

I fumbled around with Nvidia drivers and this black screen issue for two days. And I fell into this pit because of the 14.04 upgrade from 12.04. Grrr!

The original issue I was trying to resolve was the high cpu utilization of firefox, compiz & Xorg which made the graphics fairly unusable. After attempting to resolve that issue by upgrading the Nvidia driver, all went south and the black screen of death ensued.

Here's some commands that speak to my desktop configuration in case that helps...

"lshw" command produces:

    description: Mini Tower Computer
    product: OptiPlex GX270

"lspci -vnn | grep -i VGA -A 12" command produces:

    VGA compatible controller [0300]: NVIDIA Corporation NV18 [GeForce4 MX 440 AGP 8x]

"wmctrl -m" command produces:

    Name: Metacity
    Class: N/A
    PID: N/A
    Window manager's "showing the desktop" mode: N/A

At the end of the day, I'm not 100% sure what worked as I fumbled around so much. Here's what I think did it.

Use the following to get rid of all Nvidia bits and rely on the default driver Nouveau.

    sudo apt-get purge "nvidia *"

Then opt for using Metacity instead of Compiz. Those are the two salient changes I made and the result is a much improved graphics experience with acceptable cpu utilization when doing something such as video streaming from CNNx. Firefox still shows high cpu utilization in "nice top" but that doesn't seem to impact the graphics and especially the video streaming.

Revision history for this message
Alan Lord (theopensourcerer) wrote :

Since an update this morning all has been OK on 14.04. But this morning my load average is running at > 4 mostly and it's almost all compiz. System has become very slow.

Can I fallback to a simpler display system for the time being? - I need this for work...

Revision history for this message
Marchello_Lippi (0509655493-4) wrote :

 Actually I moved from Ubuntu Unity to Lubuntu (14.04.1 LTS) and it works just fine. Missing old version 12.04 LTS of Ubuntu Unity...

Revision history for this message
Thomas Hellström (thellstrom) wrote :

OK,

I did som investigation, and it seems like even for the slightest change in a window, like a cursor blink, compiz performs a fullscreen swapbuffer, and in the case of multiple monitors, compiz performs a swapbuffer that spans all the monitors.

I tried to install ccsm and disable all tweaks that could trigger this behaviour and revert to use GLX_MESA_copy_sub_buffer, but that didn't help much. Except if you start on a low resolution and change resolution to something higher. THEN compiz suddenly changes update and performs updates that are not quite that large. The only drawback is that those updates seem to cover also a number of unrelated areas that are not updated.

Now needless to say this becomes very suboptimal in remoted virtual environments, and also it appears very suboptimal if llvmpipe is used. Not to mention the combination of those two...

Revision history for this message
Peter Binney (peter-binney) wrote :

I assume this bug (or https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1268146 which sounds the same to me) is why I cannot use 14.04 on my (ancient) Dell Dimension 3000.

It used to run 12.04 fine but with 14.04 it is unusably slow. Compiz runs at least 25% of the CPU when nothing is being done (other than System Monitor showing this).

Revision history for this message
Alan Lord (theopensourcerer) wrote :

Nothing I've tried seems to resolve the issue.

I've now installed gnome-session-flashback and run the Metacity variant which is working fine.

When running Unity compiz eats > 100% cpu most of the time... Drag a window and it shoots up. Moving windows around the screen is unusable.

# sudo lshw -C video
  *-display
       description: VGA compatible controller
       product: Core Processor Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 12
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:41 memory:fc000000-fc3fffff memory:e0000000-efffffff ioport:1800(size=8)

All was fine on my laptop until some update around the beginning of September...

Revision history for this message
Anand (acpadhi-1) wrote :

Alan Lord : The trouble with using metacity is has window previews. I also do not like its Alt Tab behaviour of highlighting window borders of the current window in alt tab list.

That is the only reason why I am sticking with compiz.
I don't think is anything else out there which has Window Previews in Alt Tab. Please let me know if you know otherwise.

In my case, I face weird problems with Classic/Flashback which are :

When there are lot of windows open, after reaching around 10 to 15 windows, the mouse movement becomes quite sluggish. It actually becomes so bad that I feel like going back to 11.04

A quiting of docky and then compiz --replace works for some minutes and mouse movement is ok, but then after a few minutes it happens again. I have checked both TOP and memory and nothing seems to be a bottleneck.

Sometimes when the mouse movement sluggishness is on extreme side, doing a compiz --replace just blanks the screen forcing to use the reset key on the computer because, with the Nvidia Drivers, those CTRL F1 to CTRL F6 windows do not work.

On a side note can someone guide how to get those shortcuts to terminals working with the nvidia driver ?

If it was not the Alt Tab window previews, then I would have abandoned Ubuntu/Gnome Desktop completely and gone to XFCE.

Revision history for this message
Anand (acpadhi-1) wrote :

I meant Metacity does not have window previews available in Flashback. Sorry for the typo in previous message, could not edit it after posting.

Revision history for this message
Milton (miltonlaufer) wrote :

Same problem here, ubuntu 14.04

Revision history for this message
cycomatto (cycomatto) wrote :

affects me too, 14.04 LTS

Revision history for this message
Alan Winson (alan-winson) wrote :

Affects me too, 14.04

Revision history for this message
Ydalir Ullrsson (ydalir) wrote :

My Office PC (intel) is affected too,
Very slow since having 14.04 installed
nearly unusable.
Total CPU load about 80 - 90%
Compiz uses 20 - 50&
apt-check 20%

Revision history for this message
Achim (achim-breuer) wrote :

Affects me too (14.04 LTS running on VMWare Workstation 8.0.6.build-1035888)

Revision history for this message
V (vincentlu24) wrote :

Same here, on a desktop with 14.04 64 bit with default DE (Unity), using a gtx 260 with the recommended proprietary and tested driver, with all updates, using 2 external monitors.

I've tried turning off features/special effects in compiz to see if there was any change but the problem still persisted. It helped a bit but compiz was still eating abnormal amounts of cpu.

I've found 3 solutions thus far that solved problem but I'm not sure if it'll work for anyone else:

1. Switching to the open source driver (in my case, the nouveau driver because I'm using an nvidia card)
2. Switching the DE to something that isn't unity
3. Disabling my 2nd monitor

Obviously, the first option was ideal as everything just worked and I didn't have to sacrifice a monitor or switch DE's.

Revision history for this message
Harmen (harmen-launchpad-net) wrote :

I also have this problem, Ubuntu 14.04 64-bit, Unity, under a VirtualBox instance. Most of the time it runs acceptable, but when another process is running (which updates the screen, like a simple timer on PgAdmin3 while running a query), the memory+cpu usage goes through the roof.

Revision history for this message
Mike Thomas (ken-5) wrote :

Same problem here, dual 4-core xeon processors in 1u server... 50% CPU load on compiz with no windows open. Might switch away from Unity.

Revision history for this message
Mike Jones (c-mike-g) wrote :

Same problem on Parallels 10 with 3D acceleration off. Recent update broke 3D acceleration and I had to drop disable, now I have high CPU.

Revision history for this message
katu (katutxakurra) wrote :

Same problem here, ubuntu 14.04

Revision history for this message
D. Charles Pyle (dcharlespyle) wrote :

Similar problem here. Seeing 50% CPU when running Chromium. Using fglrx, because FOSS drivers gave horrid responsiveness and bad video corruption at login screen and while watching video. However, I am not using 14.04 LTS in a virtual machine. I am using it in a Wubi install, however, until I can buy a new computer next year.

$ sudo dmidecode | head -15

# dmidecode 2.12
SMBIOS 2.6 present.
48 structures occupying 1785 bytes.
Table at 0x0009F400.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
 Vendor: Dell Inc.
 Version: A06
 Release Date: 12/01/2010
 Address: 0xF0000
 Runtime Size: 64 kB
 ROM Size: 1024 kB
 Characteristics:
  PCI is supported

$ sudo lshw -C cpu

*-cpu
       description: CPU
       product: Pentium(R) Dual-Core CPU E6700 @ 3.20GHz
       vendor: Intel Corp.
       physical id: 4
       bus info: cpu@0
       version: Pentium(R) Dual-Core CPU E6700 @ 3.20GHz
       serial: To Be Filled By O.E.M.
       slot: CPU 1
       size: 3203MHz
       capacity: 3203MHz
       width: 64 bits
       clock: 266MHz
       capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dtherm tpr_shadow vnmi flexpriority cpufreq
       configuration: cores=2 enabledcores=2 threads=2

$ sudo lshw -C video

*-display
       description: VGA compatible controller
       product: Juniper PRO [Radeon HD 5750]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=fglrx_pci latency=0
       resources: irq:47 memory:d0000000-dfffffff memory:f7ee0000-f7efffff ioport:d000(size=256) memory:f7ec0000-f7edffff

$ /usr/lib/nux/unity_support_test -p
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon HD 5700 Series
OpenGL version string: 4.3.12798 Compatibility Profile Context 13.35.1005

Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: yes
GL npot or rect textures: yes
GL vertex program: yes
GL fragment program: yes
GL vertex buffer object: yes
GL framebuffer object: yes
GL version is 1.4+: yes

Unity 3D supported: yes

Revision history for this message
Pablo Catalina (xkill) wrote :

I have a similar problem, my enviroment:

$ /usr/lib/nux/unity_support_test -p
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD TURKS
OpenGL version string: 3.0 Mesa 10.1.3

Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: yes
GL npot or rect textures: yes
GL vertex program: yes
GL fragment program: yes
GL vertex buffer object: yes
GL framebuffer object: yes
GL version is 1.4+: yes

Unity 3D supported: yes

$ sudo lshw -C video -C cpu
  *-cpu
       description: CPU
       product: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
       vendor: Intel Corp.
       physical id: 0
       bus info: cpu@0
       version: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
       serial: To Be Filled By O.E.M.
       slot: U3E1
       size: 1200MHz
       capacity: 4GHz
       width: 64 bits
       clock: 100MHz
       capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms cpufreq
       configuration: cores=2 enabledcores=2 threads=4
  *-display
       description: VGA compatible controller
       product: Thames [Radeon HD 7550M/7570M/7650M]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:48 memory:c0000000-cfffffff memory:d4300000-d431ffff ioport:4000(size=256) memory:d4340000-d435ffff

I'm using the opensource driver "radeon"

$ uname -a
Linux pyro 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ dpkg -l unity compiz
[...]
ii compiz 1:0.9.11.3+14.04.20141104-0ubun all OpenGL window and compositing manager
ii unity 7.2.3+14.04.20140826-0ubuntu1 amd64 Interface designed for efficiency of space and interaction.

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Changing UNITY_LOW_GFX_MODE=1 helped in my specific case. I opened a new bug to give this a config option: https://bugs.launchpad.net/compiz/+bug/1412937

If you're just joining this bug, did https://bugs.launchpad.net/compiz/+bug/1293384/comments/15 help you?

Revision history for this message
Erik (erikspam) wrote :

Here is my two cents:

I had the same problem. I did what #15 ( https://bugs.launchpad.net/compiz/+bug/1293384/comments/15 ) suggested and, so far, I only have a spike periodically (primarily when I do anything with the windows and when I switch workspaces).

I did not do the part about editing the /usr/share/gnome-session/sessions/ubuntu.session file as that change removed my action bar (the bar on the left side with the ubuntu icon).

I think this might be a step in the correct direction, in terms of a work around.

Revision history for this message
Peter Goudman (pgoudman) wrote :

I am amazed, stunned and shocked....

I have been an Ubuntu fan and user for a long time now, as an I.T. contractor I use it for my day to day work. I also use the gnome desktop always. But since 14.04 my cpu's are running flat out...... and I am not really pushing my system. A quick look at top shows a process named compiz is consuming over 300%.

Seems its related to this 'unity' stuff that has always been buggy and will often lock up your desktop UI.

C'mon guys, I even donated a while ago, yet as we go forward with releases we go backwards in reliability and performance.

Perhaps you need a new release pipeline?

Allowing such a bug to be present in a release is well, disgraceful and will ruin any good name you have built up.

Unity is buggy, unreliable and deserves no place on a Linux system, perhaps you can port it to windows where they are used to such crap.

Goodbye gnome, hello XFCE.

Revision history for this message
Anand (acpadhi-1) wrote :

Weelll Said Peter Goudman.

Compiz Alone is destroying all the goodwill earned so far by Ubuntu. I am always ready to hit that reset button to get out of that black screen lockup happening quite often, specially when you have a lots of windows open. If you have any Docks(even plan is pretty bad these days). it is bound to happen more frequent. SO frustrating, that every now and then, I have to close Plank, then do a compiz --replace when the mouse starts getting sluggish. It is when the mouse starts getting Sluggish, that the BOD(Black Screen of Deatch) is coming soon to happen.

Every release of Ubuntu, comes with GUI glitches that are so disgusting in a day today work.

I think after version 11.04, almost everything is messed up with Ubuntu. It looks as if Compiz development is more geared towards keeping Unity Happy and careless about any other DE.

While XFCE is really great, Try Ubuntu Mate : I found it quite fast, sleek and awesome from the first look, and with at least 30+ including 25 odd Chrome(memory management sucks) windows, it was still rock stable, at least in my case.

https://ubuntu-mate.org/

Revision history for this message
Anand (acpadhi-1) wrote :

For Compiz Developers, I think there is some trouble with Window Previews. I am sure, there is something related to that which causes a BOD.

Revision history for this message
Erik (erikspam) wrote :

Does anyone know whether this might effect ubuntu-mate ? I am thinking about switching over to something else until this blows over.

Revision history for this message
William H.Scholtz (williamscholtz) wrote :

I only have a real compiz issue when I use Firefox. Nothing when I use Chrome.
I am pulling 3 * 32 inch Samsung monitors.

Revision history for this message
htmldeveloper@gmail.com (htmldeveloper) wrote :

 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 3388 tteikhua 20 0 1895044 345972 63084 S 106.7 0.0 20:06.68 compiz

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 3388 tteikhua 20 0 1895044 345972 63084 S 127.4 0.0 20:28.59 compiz

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 3388 tteikhua 20 0 1895044 345972 63084 S 126.1 0.0 20:51.58 compiz

It keeps hovering about 120% to 200++%, can I have a good explanation?

Revision history for this message
Laurent Gauthier (mr-l-gauthier) wrote :

This issue has been killing the battery of my laptop with 15.04 install.

Not only is compiz using way more CPU than it should, but it also causing Xorg to undergo a lot of activity totalling more than 100% of a CPU core on my Core i5 laptop. Needless to say that battery life was disastrous.

Now after a little time spent researching this I found a work-around that appears to work:

1. Install the "Compiz config settings manager"
2. Under the OpenGL section in this settings manager, uncheck the "Sync to VBlank" option
3. Log out
4. Log in

And the problem appears to be gone.

After being over 60% CPU at all times compiz is now consistently under 1% CPU. The same goes for Xorg.

Revision history for this message
Laszlo KREKACS (laszlo-krekacs-list) wrote :

@mr-l-gauthier: Thank you, it was exactly the culprit.

Will Cooke (willcooke)
tags: added: rls-w-incoming
Revision history for this message
DJDB (djdb-a) wrote :

I though i should share this here, since i was plagued with this bug on Ubuntu 15.04. No matter what i was doing, if i moved a window around, the cpu usage of xorg skyrocketed to 100%.

Nothing worked for me. But then i found a solution: Just go to compiz settings --> Windows Management --> Move Windows and ENABLE Lazy positioning. That's it, problem solved.

Hope this is helpful for you guys.

Revision history for this message
Lakshminarayanan Seshadri (lnarayanan-seshadri) wrote :

Just sharing my thoughts for those battling with compiz cpu and/or memory usage on Ubuntu 14.04:
Not only compiz in Ubuntu 14.04/Trusty consumes CPU it was also taking significant memory of the order of 150M on my low-end hw laptops.
For me Ubuntu 14.04.1+ gnome flashback session with metacity works fine on my low-end hw(2GB RAM+integrated Intel graphics chipset). Also For those on low-end hw laptops pls stay put on Ubuntu 14.04.1.(14.04.3 works better for latest hw)
Hope it helps for those with low-end hw wondering on compiz.

Revision history for this message
Lakshminarayanan Seshadri (lnarayanan-seshadri) wrote :

Forgot to add above: 160-200M compiz memory usage may not be significant on most laptops with 2G-4G RAM but if you are starved on memory i.e running some other critical apps etc this may be the case. CPU usage with some settings adjustments via compiz settings is ok (0.3%)

tags: added: rls-x-incoming
removed: rls-w-incoming
Will Cooke (willcooke)
Changed in compiz (Ubuntu):
milestone: none → ubuntu-16.04
tags: added: compiz
removed: rls-x-incoming
Revision history for this message
elichai2 (elichai2) wrote :

happened to me at 15.10 Wily

Revision history for this message
palinka (sergav) wrote :

after 15.10 ugrade I got this issue as well.. and seems nothing from above helps.

Revision history for this message
Graham Donohoe (graham-donohoe) wrote :

also new for me on 15.10, no problems on 15.04.
none of the workarounds help for me either

Revision history for this message
Graham Donohoe (graham-donohoe) wrote :

I tried the oibaf ppa drivers as this was mentioned as part of one of the many old workarounds

graham@OptiPlex-GX620:~$ sudo lshw -C video -C cpu
  *-cpu
       product: Intel(R) Pentium(R) 4 CPU 2.80GHz
       vendor: Intel Corp.
       physical id: 0
       bus info: cpu@0
       version: 15.4.1
       serial: 0000-0F41-0000-0000-0000-0000
       size: 2800MHz
       width: 64 bits
       capabilities: boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx x86-64 constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr
       configuration: id=1
     *-logicalcpu:0
          description: Logical CPU
          physical id: 1.1
          width: 64 bits
          capabilities: logical
     *-logicalcpu:1
          description: Logical CPU
          physical id: 1.2
          width: 64 bits
          capabilities: logical
  *-display:0
       description: VGA compatible controller
       product: 82945G/GZ Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 02
       width: 32 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:16 memory:feb00000-feb7ffff ioport:e898(size=8) memory:e0000000-efffffff memory:feac0000-feafffff
  *-display:1 UNCLAIMED
       description: Display controller
       product: 82945G/GZ Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2.1
       bus info: pci@0000:00:02.1
       version: 02
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list
       configuration: latency=0
       resources: memory:feb80000-febfffff

graham@OptiPlex-GX620:~$ /usr/lib/nux/unity_support_test -p
OpenGL vendor string: Mesa Project
OpenGL renderer string: Gallium 0.4 on i915 (chipset: 945G)
OpenGL version string: 2.1 Mesa 11.2.0-devel (git-e97b207 2015-12-17 wily-oibaf-ppa)

Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: yes
GL npot or rect textures: yes
GL vertex program: yes
GL fragment program: yes
GL vertex buffer object: yes
GL framebuffer object: yes
GL version is 1.4+: yes

Unity 3D supported: yes

Nikola (nikolasmiljanic)
Changed in compiz:
status: Triaged → Fix Released
Revision history for this message
Vladislav Rogovsky (vladislavrogovsky) wrote :

Any solution for ubuntu 15.10 ?

Revision history for this message
Vladislav Rogovsky (vladislavrogovsky) wrote :

Upgrade to oibaf drivers (as mentioned upper) slightly reduce problem.
To upgrade:
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update && sudo apt-get upgrade

Revision history for this message
pamzilla (pam-trauco) wrote :
Download full text (47.0 KiB)

Affects 16.04 as well
I paste my info:
pam@Pjira:~$ lspci -nnk | egrep -i '3d|aphics|display|nouveau|nvidia|radeon|trident|vesa|vga'; uname -a; Xorg -version; sudo apt-get update; sudo apt-get install mesa-utils hardinfo fbset nux-tools; sudo fbset -i; apt-cache show xserver-xorg | grep Version; xrandr; fglrxinfo; nvidia-settings -g |head -n 30 ; sudo lshw -short; sudo lshw -C display; dpkg -l | egrep -i 'fgl|intel|mesa|mesa-utils|nvidia|nouveau|radeon|trident|video-ati'; cat /etc/lsb-release; dmesg | egrep -i 'abort|ailed|bug|error|fail|fgl|GLX|GPU|intel|missing|nouveau|NVIDIA|radeon|segment|trident|VESA|VGA|wfb|\(EE\)|\(WW\)'; cat /proc/cpuinfo | grep -I model; cat /var/log/Xorg.0.log | egrep -i 'abort|ailed|bug|display|error|fail|fgl|GLX|GPU|intel|issing|nouveau|nvidia|radeon|segment|trident|VESA|VGA|wfb|\(EE\)|\(WW\)'; sudo dmidecode|egrep 'anufact|roduct|erial|elease'; cat /etc/X11/xorg.conf; /usr/lib/nux/unity_support_test -p; ubuntu-support-status ; sudo lsmod
00:02.0 VGA compatible controller [0300]: Intel Corporation Sky Lake Integrated Graphics [8086:1916] (rev 07)
Linux Pjira 4.3.0-5-generic #16-Ubuntu SMP Wed Dec 16 23:33:25 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

X.Org X Server 1.17.3
Release Date: 2015-10-26
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.19.0-33-generic x86_64 Ubuntu
Current Operating System: Linux Pjira 4.3.0-5-generic #16-Ubuntu SMP Wed Dec 16 23:33:25 UTC 2015 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-4.3.0-5-generic.efi.signed root=/dev/mapper/ubuntu--vg-root ro noprompt persistent quiet nomodeset
Build Date: 25 November 2015 04:17:13PM
xorg-server 2:1.17.3-2ubuntu2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.33.4
 Before reporting problems, check http://wiki.x.org
 to make sure that you have the latest version.
[sudo] password for pam:
Ign:1 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu xenial InRelease
Hit:2 http://se.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://se.archive.ubuntu.com/ubuntu xenial-updates InRelease
Ign:4 http://ppa.launchpad.net/me-davidsansome/clementine/ubuntu xenial InRelease
Hit:5 http://se.archive.ubuntu.com/ubuntu xenial-backports InRelease
Ign:6 http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu xenial InRelease
Hit:7 http://security.ubuntu.com/ubuntu xenial-security InRelease
Ign:8 http://ppa.launchpad.net/tomahawk/ppa/ubuntu xenial InRelease
Ign:9 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu xenial Release
Ign:10 http://ppa.launchpad.net/me-davidsansome/clementine/ubuntu xenial Release
Ign:11 http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu xenial Release
Ign:12 http://ppa.launchpad.net/tomahawk/ppa/ubuntu xenial Release
Ign:13 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu xenial/main amd64 Packages
Ign:14 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu xenial/main i386 Packages
Ign:15 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu xenial/main all Packages
Ign:16 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu xenial/main Translation-en_US
Ign:17 http://ppa.launchpad.net/hanipouspilot...

Revision history for this message
Will Cooke (willcooke) wrote :
tags: added: u7-trello-import
Changed in compiz:
status: Fix Released → Triaged
status: Triaged → Confirmed
tags: removed: u7-trello-import
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

Thank you all for the relevant information. Are you experiencing this problem with unity or with other desktop like mate as well? I am installing the affected Ubuntu versions on a vm to reproduce the issue and investigate the problems further.

Revision history for this message
Brian Mancuso (snidd111) wrote :

I do not get this issue when I run 14.04.3 within a VM on a new iMac. But when running it on an 8 year old home built server for LTSP I'm still experiencing the issue with all updates installed.

I'll be trying the drivers mentioned in #65 later today.

Revision history for this message
shay (shay-shay99) wrote :

on 14.04 with a high end nvidia GPU , since one of the latest updates , compiz goes to 100%, and my desktop goes black

losing all my work at least once a day , not fun at all!

such compiz issues has been plaguing ubuntu since version 10 , which is why i wait for the last minute to upgrade , but even that does not help, and somehow these major regressions are released pretty often.

even unity --reset is now deprecated, so the onyl option is to reboot and lose my work

Revision history for this message
komali2 (komali2) wrote :

I am having the exact issues described in Ubuntu 16.04 on a 2014 Macbook Pro (not in a VM).

Revision history for this message
Stéphane Verdy (sverdy) wrote : Re: [Bug 1293384] Re: Compiz CPU usage dramatically increased in Ubuntu 14.04

@komali2: have you tried enabling the low graphics mode? There are
instructions here: https://www.whizzy.org/2016/09/unity-7-low-graphics-mode/

Regards,
Stephane

On Thu, Apr 6, 2017 at 8:29 PM, komali2 <email address hidden> wrote:

> I am having the exact issues described in Ubuntu 16.04 on a 2014 Macbook
> Pro (not in a VM).
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1293384
>
> Title:
> Compiz CPU usage dramatically increased in Ubuntu 14.04
>
> Status in Compiz:
> Confirmed
> Status in compiz package in Ubuntu:
> Triaged
>
> Bug description:
> It appears that the workload of low-level graphical operations used by
> compiz when, for example, moving windows has increased dramatically
> between Ubuntu 12.04 and Ubuntu 14.04.
>
> This might not be that visible when using high-end gpus, but should be
> clearly visible when using compiz on llvmpipe and to some-extent
> invalidates the approach of using compiz on top of llvmpipe as a
> fallback when no GPU is available:
>
> How to reproduce:
> 1) Use the unity-3d desktop in Ubuntu 14.04 on top of a non-accelerating
> Xorg driver like "modesetting". Move windows around. Note peak and average
> cpu-usage.
>
> How to verify compiz is the culprit:
> 1) copy /usr/bin/compiz from a Ubuntu 12.04 installation. Drop it in as
> /usr/bin/compiz on 14.04. Reboot. Perform the same window movement.
> CPU-usage should be substantially lower.
>
> This problem also affects VMs running on VMware ESX with a software-
> rendering GPU. Window movement becomes sluggish, which suggests that
> even with GPUs, compiz has increased the number of operations required
> to move windows.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/compiz/+bug/1293384/+subscriptions
>

Revision history for this message
John Russell (jrussell-88) wrote :

Having the same problem on a late-2013 Macbook Retina Pro running Ubuntu 17.04 Zesty and previous versions.

Seem to have got a fix with:
1 CCSM General - OpenGL - 'uncheck the "Sync to VBlank" option' and
2 CCSM Desktop - Ubuntu Unity Plugin - check Enable Low Graphics Mode

Revision history for this message
christylea (c-norman) wrote :

I just updated from 14.04 to 16.04 on a spare laptop I keep around, and hit this.

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.