Compiz slows down over time (usually one day is enough)

Bug #1387558 reported by Eduards Bezverhijs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Expired
Undecided
Unassigned
Unity
Expired
Undecided
Unassigned
unity (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I have had this problem for quite a long time tbh. And after each release I hope it will be fixed, but it doesn't happen.
A little intro: I'm using Ubuntu for work, I rarely shutdown the computer I rather put it to sleep mode, in worst case it's hibernate. I have loads of apps opened at the same time. I use external monitor as well. Computer is Dell XPS15 L521X, 16Gb RAM, 120GB SSD + 1TB HDD. As a graphics card I'm using builtin intel HD4000, I have GF GT640 as well but it's disabled using bbswitch.

Symptoms are that after some time compiz slows down a lot while using it. Usually it's no more than 2 days and it's slow again. When I restart Unity (setsid unity) it's back to full buttersmooth speed with the same apps opened which leads to conclusion that compiz can handle the load very well. Maybe it's mesa, maybe it's compiz or unity itself that slows it down - but I'm no pro to tell.

With 14.10 release I observed very interesting behaviour. I have FHD builtin monitor and FHD external monitor rotated counterclockwise. Let's say I started computer yesterday in the morning, it was working smooth with both monitors and single display, I suspended computer got home unsuspended and it seemed sluggish (only graphics part of course). I ran glxgears (I know I know...) and it showed ~ 50FPS which is slow, because running the same before suspend gives near 60FPS (refresh rate). Now I come back to work and run it on single builtin display - ~ 50 FPS, I connect second FHD dispplay and FPS are back to 60 and it's running buttersmooth again. So it seems that mesa/compiz/unity have some strange refresh rate problem detection maybe... 2 FHD displays seems to be twice the job compiz has to do over single display which is strangely slower...

Please advise how can I help solving this, do I need to run compiz debug version or what can I exactly help technically (applying a patch, compiling compiz myself, you name it...). I know the standard procedure of logs etc., I'm afraid that won't help much in this situation. I looked at logs and there's nothing suspicious, at least to me.

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

Now two full days are passed, now things get very choppy. The same glxgears output which perfectly indicate problem.:
151 frames in 5.0 seconds = 30.026 FPS
158 frames in 5.0 seconds = 31.443 FPS
158 frames in 5.0 seconds = 31.511 FPS
165 frames in 5.0 seconds = 32.784 FPS
280 frames in 5.0 seconds = 55.916 FPS
299 frames in 5.0 seconds = 59.659 FPS
299 frames in 5.0 seconds = 59.655 FPS
299 frames in 5.0 seconds = 59.662 FPS

See, when I attach second monitor, FPS increases and all is fine and buttersmooth.

creen 0: minimum 8 x 8, current 3000 x 1920, maximum 32767 x 32767
LVDS1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080 60.0*+ 59.9 40.0
   1680x1050 60.0 59.9
   1600x1024 60.2
   1400x1050 60.0
   1280x1024 60.0
   1440x900 59.9
   1280x960 60.0
   1360x768 59.8 60.0
   1152x864 60.0
   1024x768 60.0
   800x600 60.3 56.2
   640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1080x1920+1920+0 left (normal left inverted right x axis y axis) 510mm x 287mm
   1920x1080 60.0*+
   1280x1024 75.0 60.0
   1152x864 75.0
   1024x768 75.1 60.0
   800x600 75.0 60.3
   640x480 75.0 60.0
   720x400 70.1
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Package versions are stock.
I'll attach version file as well.

Should I need to run apport, will it really help?

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :
Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

lspci -k
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
 Subsystem: Dell Device 054f
 Kernel driver in use: i915
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 640M] (rev ff)

cat /proc/acpi/bbswitch
0000:01:00.0 OFF

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

I have done interesting experiment, I changed rotation for external monitor to "Normal" instead of "Counterclockwise" and performance is horrible:
137 frames in 5.0 seconds = 27.347 FPS
126 frames in 5.0 seconds = 25.135 FPS
135 frames in 5.0 seconds = 26.809 FPS
145 frames in 5.0 seconds = 28.856 FPS
186 frames in 5.0 seconds = 37.178 FPS
299 frames in 5.0 seconds = 59.658 FPS
299 frames in 5.0 seconds = 59.661 FPS

Again when I change it back to "Counterclockwise" performance is back and good.

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

Update: three full days, removed external monitor to discover that now it's extra choppy, all is stuttering really badly, even window movement is painfully slow and choppy, glxgears on single display shows:
98 frames in 5.1 seconds = 19.358 FPS
98 frames in 5.0 seconds = 19.418 FPS
99 frames in 5.0 seconds = 19.650 FPS

On the other hand openarena works like a charm. So doesn't seems to be driver or mesa issue. Looks like compiz/Unity, but again, I'm no pro to tell.

Will see how this degrades over next couple of days.

Revision history for this message
Stephen M. Webb (bregma) wrote :

So if I may summarize (lpease correct me if I'm wrong):

(1) you start Compiz (ie. log in to the system) with two displays (one built in and one external) and things work OK.
(2) you remove the external display and Compiz performance in terms of framerate degrades
(3) you re-add the external monitor and the framerate is restored

Is that correct? Is it true whether you put the machine to sleep, hibernate, or just leave it running?

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

With 14.10 it was almost like You said.

Full description:
1. power computer on - cold boot
2. log in, open programs, do work, etc.
3. connect second display (rotation is preset as "Counterclockwise", work for say 4 hours with both displays
4. remove external display (until this moment all was smooth)
5. observe choppy performance on laptop display
6. reattach the display - all is smooth again
7. suspend, go home, unsuspend, observe the same sluggishness with laptop display
8. suspend, go sleep :)
9. go to work, unsuspend, observe sluggishness
10. connect external monitor - all is smooth again
11. change rotation to "Normal" instead of "Counterclockwise" - sluggishness is back
12. change rotation to "Counterclockwise" - all is smooth again

The thing is tho, that I'm not able to work with such sluggishness so I removed 14.10 and reinstalled 14.04, so I will not be able to verify any patch or suggestion or anything.
So, if noone else is affected, this can be closed.

Revision history for this message
Andrea Azzarone (azzar1) wrote :

Can you check the value of memory (RAM) usage before and after you change rotation?

Changed in compiz:
status: New → Confirmed
Changed in unity:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in compiz:
status: Confirmed → Incomplete
Changed in unity:
status: Confirmed → Incomplete
Changed in unity (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

Hi, recently I tried installing 14.10 on the same machine on different partition and it seems that problem with rotation + slowdown is gone.
So as a next step was upgrading my trusty Trysty to Utopic. Right after upgrade (and before login) I deleted monitors.xml file from my working profile (user) and viola problem is gone.
So gar so good, I would like to say. So the problem was related to monitors.xml or updates between my last try and this one, or both.
Can't say whether slowdown is gone as I'm using the system for just about one day.
Will report back with the results.

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

[Expired for unity (Ubuntu) because there has been no activity for 60 days.]

Changed in unity (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Unity because there has been no activity for 60 days.]

Changed in unity:
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Compiz because there has been no activity for 60 days.]

Changed in compiz:
status: Incomplete → Expired
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.