Xgl consumes lots of CPU on Gutsy

Bug #146285 reported by Thomas Novin
2
Affects Status Importance Assigned to Milestone
xserver-xgl (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I upgraded to Gutsy today. I ran OK for a few hours but now it seems that the Xgl process is consuming lots of CPU and the system feels really slow.

If I open 'top' I can often see close to 100% cpu for Xgl.

I have tried to reboot but that had no effect, the system felt slow just after logging in.

Revision history for this message
Thomas Novin (thomasn80) wrote :

$ iostat -c 1
Linux 2.6.22-12-generic (pc-thnov-ubuntu) 09/28/2007

avg-cpu: %user %nice %system %iowait %steal %idle
          10.96 0.76 5.32 10.65 0.00 72.30

avg-cpu: %user %nice %system %iowait %steal %idle
          33.67 0.00 17.09 0.00 0.00 49.25

avg-cpu: %user %nice %system %iowait %steal %idle
          35.00 0.00 16.50 0.00 0.00 48.50

avg-cpu: %user %nice %system %iowait %steal %idle
          35.50 0.00 18.00 0.00 0.00 46.50

avg-cpu: %user %nice %system %iowait %steal %idle
          35.00 0.00 18.00 0.00 0.00 47.00

avg-cpu: %user %nice %system %iowait %steal %idle
          35.68 0.00 15.58 0.00 0.00 48.74

avg-cpu: %user %nice %system %iowait %steal %idle
          35.50 0.00 16.50 0.00 0.00 48.00

avg-cpu: %user %nice %system %iowait %steal %idle
          34.50 0.00 16.50 0.00 0.00 49.00

avg-cpu: %user %nice %system %iowait %steal %idle
          34.50 0.00 17.00 0.00 0.00 48.50

avg-cpu: %user %nice %system %iowait %steal %idle
          34.50 0.00 16.50 0.50 0.00 48.50

$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
stepping : 6
cpu MHz : 1000.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu 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 lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 3994.39
clflush size : 64

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
stepping : 6
cpu MHz : 1000.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu 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 lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 3990.03
clflush size : 64

Revision history for this message
Thomas Novin (thomasn80) wrote :

Interesting, for maybe 15 minutes the system was running just as fast as it normally does, then for no apparent reason it got slow again. For the last 3 hours the system has been running with high CPU usage except for those 15 minutes.

I can also hear that my fans are spinning all the time.

Can I stop using Xgl to workaround this problem?

Revision history for this message
Thomas Novin (thomasn80) wrote :

I have now done some investigating. I have found out that this problem arose after I disabled desktop effects. When a while ago switched from disabled to normal in desktop effects, the cpu usage instantly got normal again.

I got other problems with the graphics driver though. I tried to logout and then re-login but then my resolution was totally screwed. Normally I used 1280x1024 at work (docked) and 1680x1050 at home (un-docked). Now I got some 17??x???? resolution. And it was REALLY slow. You could see a window being rendered as if it was a serial console.

I went into screens and graphic and noticed that I was using the vesa driver. Before in Feisty I used fglrx/ATI. I switched to fglrx and rebooted as instructed.

Now the desktop didn't start at all but I got a window telling me I was in a safe mode. I tried switching from all possible resolutions and tried to go back to vesa but I was unable to start my desktop. I stopped gdm, copied my last known working Feisty xorg.conf to the current one and re-started gdm again. Now everything worked good! No high CPU usage either. I'm attaching my Feisty-xorg.conf and my Gutsy-generated xorg.conf.

Revision history for this message
Thomas Novin (thomasn80) wrote :

This doesn't look normal:

$ xrandr
X Error of failed request: BadRequest (invalid request code or no such operation)
  Major opcode of failed request: 151 (RANDR)
  Minor opcode of failed request: 6 ()
  Serial number of failed request: 9
  Current serial number in output stream: 9

Revision history for this message
Pavel Rojtberg (rojtberg) wrote :

Xgl is not meant for running without a compositing manager, thus it is much slower without compiz. (desktop effects) If you dont want to run compiz I would suggest disabeling Xgl alltogether. "touch ~/.config/xserver-xgl/disable"

Revision history for this message
Thomas Novin (thomasn80) wrote :

Ok, but then we have found an issue. The only thing I did was to enable and then disable desktop effects. As a user I sho not be required to manually disabling Xgl.

Thanks for the workaround though :)

Revision history for this message
Tormod Volden (tormodvolden) wrote :

You have manually installed xgl-server yourself, right?

Revision history for this message
Thomas Novin (thomasn80) wrote :

This is not an issue any more so I guess it has been fixed. I'm now on Hardy instead of Gutsy.

Changed in xserver-xgl:
status: New → Fix Released
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.