Xorg produces high CPU usage, slow gnome-terminal

Bug #1073372 reported by Ryan Finnie
66
This bug affects 15 people
Affects Status Importance Assigned to Milestone
cairo (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Thinkpad X220 (Intel video, chipsets, etc)

After a few days of uptime and usage on this laptop, the xorg process will start randomly (but consistently over time) producing high CPU usage, even with all applications closed. CPU according to top will vary between about 10% and 90%, and at high CPU times, the system fans will be running rather high. Also, the UIs will slow down and there will be a lot of latency on keypresses (sometimes up to 1 second), with the occasional loss of keypresses. In gnome-terminal, this has the effect of feeling like you're over a cellular modem, even on a local terminal.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: xorg 1:7.7+1ubuntu4
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
.tmp.unity.support.test.0:

ApportVersion: 2.6.1-0ubuntu3
Architecture: amd64
CompizPlugins: [core,composite,opengl,decor,vpswitch,move,gnomecompat,compiztoolbox,imgpng,mousepoll,regex,place,snap,unitymtgrabhandles,resize,grid,session,animation,workarounds,expo,wall,ezoom,fade,scale,unityshell]
CompositorRunning: compiz
Date: Tue Oct 30 16:30:09 2012
DistUpgraded: 2012-09-15 22:41:29,902 DEBUG enabling apt cron job
DistroCodename: quantal
DistroVariant: ubuntu
DkmsStatus: virtualbox, 4.1.18, 3.5.0-17-generic, x86_64: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:21da]
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
Lsusb:
 Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
 Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 003: ID 0a5c:217f Broadcom Corp. Bluetooth Controller
MachineType: LENOVO 4286CTO
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.5.0-17-generic root=/dev/mapper/hostname-root ro quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: Upgraded to quantal on 2012-09-16 (44 days ago)
dmi.bios.date: 04/25/2012
dmi.bios.vendor: LENOVO
dmi.bios.version: 8DET61WW (1.31 )
dmi.board.asset.tag: Not Available
dmi.board.name: 4286CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr8DET61WW(1.31):bd04/25/2012:svnLENOVO:pn4286CTO:pvrThinkPadX220:rvnLENOVO:rn4286CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 4286CTO
dmi.product.version: ThinkPad X220
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.8.4-0ubuntu3
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.39-0ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 9.0-0ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 9.0-0ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.13.0-0ubuntu6
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.3-0ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.99.99~git20120913.8637f772-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.20.9-0ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.2-0ubuntu3

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

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

Changed in xorg (Ubuntu):
status: New → Confirmed
Revision history for this message
shaniaki (shaniaki) wrote :

Same problem here on an HP xw6600 workstation.

Revision history for this message
Pirouette Cacahuète (lissyx) wrote :

Looks like the description matches my experience on ThinkPad T420s, with Intel card.

Revision history for this message
Pirouette Cacahuète (lissyx) wrote :

FYI I've reinstalled my distro just after my previous report. Until today, no reproducing. Today, it started to be reproduced, and it seems to be fixed when I kill telepathy and empathy processes.

Revision history for this message
Ryan Finnie (fo0bar) wrote :

Are you sure that's not a red herring? I don't use telepathy or empathy, and there was only the empathy indicator process which I killed, didn't change anything.

Revision history for this message
SweX (swexru) wrote :

randomly affects me too, usually while working in Eclipse IDE, restarting Eclipse fixing this for a while..

Revision history for this message
Pirouette Cacahuète (lissyx) wrote :

What do you mean by 'red herring' ? As far as I can tell, I reproduced the issue a couple of times since my latest comment, and each time I just had to kill the empathy process to get my system back.

Revision history for this message
Jason Slagle (jslagle) wrote :

Indeed. I kill empathy and the issue goes away here too. It's been happening since upgrading to 12.10.

empathy seems to be a resource hog period. It's regurally using WAY more memory than I would expect an IM client to use.

Revision history for this message
Ryan Finnie (fo0bar) wrote :

The bug you're describing appears to be different, I don't even run empathy. telepathy-indicator and /usr/lib/telepathy/mission-control-5 are running, but produce no load.

I did track down what appears to be my problem. Most of my problems happened when dealing with gnome-terminal, particularly when there's a lot of scrolling text. This bug appears to be relevant, though I have an Intel display, not Nvidia: https://bugs.freedesktop.org/show_bug.cgi?id=48395

Upgrading libcairo2 and libcairo-gobject2 to the version in raring (1.12.8-0ubuntu4) seems to fix the issue, and this was not present in precise, so I believe there's something in Cairo 1.12.2-1ubuntu2.1 (quantal).

affects: xorg (Ubuntu) → cairo (Ubuntu)
summary: - Xorg produces high CPU usage after a few days
+ Xorg produces high CPU usage, slow gnome-terminal
Revision history for this message
fldc (fldc) wrote :

Oh, at last i found this bug report and upgraded to cairo from raring, my desktop i silky smooth again :D

Revision history for this message
Igor Gnatenko (i-gnatenko-brain) wrote :

I'm have Ubuntu Raring, but I don't watch this bug.

Revision history for this message
Leonid Evdokimov (darkk) wrote :

I have installed following packages from 13.04 repos to my 12.10 box:
libcairo2_1.12.10-1ubuntu1_amd64.deb
libcairo2_1.12.10-1ubuntu1_i386.deb
libpixman-1-0_0.28.2-0ubuntu1_amd64.deb
libpixman-1-0_0.28.2-0ubuntu1_i386.deb

These packages fixed the bug for me.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I'm glad I found this bug report. I was having exactly the same issue after I installed Ubuntu 12.10 (Had no such problem with 12.04). I had to reboot the machine every day or two as the UI was becoming very unresponsive and Xorg was using a lot of CPU.

I also confirm that installing the libcairo2 (and libpixman-1) from the 13.04 repository solves the problem. Thanks to the reporter for this workaround solution.

Revision history for this message
Tanner Postert (tanner-postert) wrote :

I've been having the same issue, even after I recently upgraded to 13.04 repo. libcairo2 is at 1.12.14 and libpixman is at 0.28.2. and the problem still persists. Do I need to downgrade libcairo2 to 1.12.10?

Revision history for this message
Chris Wilson (ickle) wrote :

No. Just your Xorg.0.log and a profile (install perf and all debug symbols and then tell me which funtions are occupying the cpu -- perf record -f -g -a sleep 60 ; perf report -g | head -1500).

Revision history for this message
stianst (stianst) wrote :
Download full text (4.3 KiB)

I have this problem, especially when viewing webpages with video/flash in them. I ran the line from the previous comment, which indicates that it's caused by intel_drv.so. Attached the perf.data file.

Standard out:

# ========
# captured on: Thu May 2 15:39:02 2013
# hostname : .....
# os release : 3.8.0-19-generic
# perf version : 3.8.8
# arch : x86_64
# nrcpus online : 4
# nrcpus avail : 4
# cpudesc : Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
# cpuid : GenuineIntel,6,42,7
# total memory : 5997284 kB
# cmdline : /usr/bin/perf_3.8.0-19 record -f -g -a sleep 60
# event : name = cycles, type = 0, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, excl_host = 0, excl_guest = 1, precise_ip = 0, id = { 22, 23, 24, 25 }
# HEADER_CPU_TOPOLOGY info available, use -I to display
# HEADER_NUMA_TOPOLOGY info available, use -I to display
# pmu mappings: cpu = 4, software = 1, tracepoint = 2, uncore_cbox_0 = 6, uncore_cbox_1 = 7, breakpoint = 5
# ========
#
# Samples: 351K of event 'cycles'
# Event count (approx.): 217205974361
#
# Overhead Command Shared Object Symbol
# ........ ............... ............................... ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Read more...

Revision history for this message
Chris Wilson (ickle) wrote :

Debug symbols! (And perf.data.gz is useless beyond the system it is recorded upon unless one is able to exactly reconstruct the same binaries as it was recorded against).

The accompanying Xorg.0.log is useful for sanity checking hw state.

Please note that this bug is about gnome-terminal and not flash. flash is expected to generate a high load due its inefficient nature - it is hard to tell from that empty perf report whether or not it is abnormal behaviour.

Changed in cairo (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
saz (sprateek2-d) wrote :

I am using Ubuntu 13.04 64-bit and having the same problem. I have 4 cores and mission-control -5 is eating up the cpu one by one as I can see in CPU History of System Monitor. Below is the cpu usage of mission-control from the command "top"

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1847 gdm 20 0 77896 3792 3104 R 100.0 0.1 17:06.34 mission-control

Updating libcairo2 from precise version to raring version solved the problem for precise users. But I am already using Ubuntu raring and libcairo2 and libcairo-gobject2 are already in their newest version i.e. 1.12.14. Please help me fix it!

Revision history for this message
Chris Wilson (ickle) wrote :

Install debug symbols and perf (apt-get install linux-tools and all the appropriate *-dbg), then lot at where "sudo perf top" reports the time being spent.

Revision history for this message
Lance McKain (lgmckain) wrote :

Hi,
Attached is the perf logs and Xorg.0.log in logs.zip at a time I see what appears to be a similar issue. I appear to be missing some debug symbols, however, there might be enough information to determine whether this is the same issue or not. Within my environment I can see a slowness occurring typically within a day.

Revision history for this message
Chris Wilson (ickle) wrote :

I wouldn't say that was a particularly high Xorg CPU usage - all we see from X there is that is spending most of its time timestamping requests and wakeups. The surprising entry there is that it is gnome-panel that is spending the most time actually drawing anything.

From that glimpse I didn't see anything worrisome (from my driver/cairo perspective).

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Thank you for reporting this bug to Ubuntu. Ubuntu 13.04 reached End of Life in 2014.
See this document for currently supported Ubuntu releases: https://wiki.ubuntu.com/Releases

Please upgrade to Ubuntu 16.04 LTS and re-test. I apologize that we aren't always able to respond to bugs promptly.

Do feel free to report any other bugs you may find.

Changed in cairo (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
ELMX (elx-1) wrote :

Hi,

I'm on xubuntu 22.04.1 nvidia driver 515.65.01, nvidia on-demand profile lags ...

I saw xauth list defaults to display :0 , and according to nvidia-settings, nvidia on-demamd profile uses screen 256, not screen 0. So i tried this:

$ xauth add localhost:256 . $(xxd -l 16 -p /dev/urandom)

after above command:

xauth list, and the hexkey is there

But, i noticed no diff without these commands

Any idea??

Thank you

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.