High CPU usage after resizing a window

Bug #1337749 reported by Furkan
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Background:

Symptoms are 50-120% CPU usage when scrolling (especially Firefox), dragging around a window, resizing windows, basically any 2D graphics rendering on the desktop. This happens both in fglrx and the open source radeon driver. I started my debugging process by changing various settings, restarting, running "top" in a terminal, launching a Nautilus window, and quickly dragging it around with the mouse in circles while watching the CPU usage rise to around 50%. Resizing the window makes it jump to 100%+. Xorg and compiz are the culprits, with the CPU usage being split around 50/50 between them.

Reproducing the issue:

After a lot of searching I found some tips in the Arch Wiki article for the open source radeon driver, and I put together the following xorg.conf:

Section "Module"
 Load "dri2"
 Load "glamoregl"
EndSection

Section "Device"
    Identifier "Radeon 6670"
    Driver "radeon"
    Option "MigrationHeuristic" "greedy"
     Option "AccelMethod" "glamor"
EndSection

After applying these settings, launching Nautilus and dragging it around only resulted in about 4% CPU usage each for xorg and compiz. Then, resizing the window (click and hold a side, and just keep moving the mouse left and right) made Xorg jump to 70% and compiz 50%. After that, when I start dragging the window around, CPU usage is back to around what it was originally: About 25% for compiz and 15% for Xorg. This exact behaviour happens after each reboot: The CPU usage is initially low when dragging the window around, but resizing it somehow messes things up and it never goes back to normal after that.

I'm using a Radeon 6670 right now. I'll be receiving an R7 260X in about a week or so, so I won't be able to test with the exact same hardware, but I'm expecting at least similar behaviour since I also swapped in an R7 250 and was having the same issues.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: xorg 1:7.7+1ubuntu8
ProcVersionSignature: Ubuntu 3.13.0-30.54-generic 3.13.11.2
Uname: Linux 3.13.0-30-generic x86_64
.tmp.unity.support.test.0:

ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
Date: Fri Jul 4 03:52:17 2014
DistUpgraded: Fresh install
DistroCodename: trusty
DistroVariant: ubuntu
DkmsStatus:
 virtualbox, 4.3.10, 3.13.0-29-generic, x86_64: installed
 virtualbox, 4.3.10, 3.13.0-30-generic, x86_64: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] Turks XT [Radeon HD 6670/7670] [1002:6758] (prog-if 00 [VGA controller])
   Subsystem: Gigabyte Technology Co., Ltd Device [1458:2545]
InstallationDate: Installed on 2014-06-06 (27 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
MachineType: Gigabyte Technology Co., Ltd. GA-970A-D3
ProcEnviron:
 LANGUAGE=en_CA:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-30-generic root=UUID=d254b01f-2bf2-4b57-acdc-c796786f4c4c ro quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/03/2013
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F12
dmi.board.name: GA-970A-D3
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF12:bd09/03/2013:svnGigabyteTechnologyCo.,Ltd.:pnGA-970A-D3:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnGA-970A-D3:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: GA-970A-D3
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
version.compiz: compiz 1:0.9.11+14.04.20140423-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.52-1
version.libgl1-mesa-dri: libgl1-mesa-dri 10.1.3-0ubuntu0.1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.1.3-0ubuntu0.1
version.xserver-xorg-core: xserver-xorg-core 2:1.15.1-0ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.8.2-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.3.0-1ubuntu3.1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.910-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.10-1ubuntu2
xserver.bootTime: Fri Jul 4 03:38:17 2014
xserver.configfile: /etc/X11/xorg.conf
xserver.errors:

xserver.logfile: /var/log/Xorg.0.log
xserver.version: 2:1.15.1-0ubuntu2
xserver.video_driver: radeon

Revision history for this message
Furkan (falaca) wrote :
Revision history for this message
Furkan (falaca) wrote :

Update: I received my new card today (R7 260X). It isn't fully supported under the 3.13 kernel, so I had to go back to fglrx. The same problem still persists.

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
Furkan (falaca) wrote :

A further comment: I noticed this bug report here which seems to report a similar issue https://bugs.launchpad.net/compiz/+bug/1293384

I also figured out that even moving the mouse around causes high CPU usage. For example, launch Nautilus and move the mouse around inside it for 15-20 seconds or so. My CPU usage jumps to 25% for Xorg, 25% for nautilus, and 15% for compiz. Same thing happens with other programs like Firefox. So I searched around some more and found this bug report: https://bugs.launchpad.net/xorg-server/+bug/1250277

It seems that there's a chance all of these bug reports might be related. I will test on my office PC soon, which has an nvidia card, and report back.

Revision history for this message
Abhijit Navale (abhi-navale) wrote :

It also has something to do with firefox.
Chrome do not use this much CPU.

Revision history for this message
Furkan (falaca) wrote :

Abhijit, you're right scrolling in Chrome "only" uses around 40% or so. I noticed it doesn't have smooth scrolling enabled. After disabling smooth scrolling in Firefox (general.smoothScroll in about:config), CPU usage dropped to about the same level as Chrome. Still extremely high for just scrolling down a page, though.

I tested on the office computer today, which is a Core i7-920 w/ 6GB of RAM and an Nvidia GT 9400 with the proprietary driver installed. I can confirm that it suffers from the same problem (also running Ubuntu 14.04).

Revision history for this message
penalvch (penalvch) wrote :

Furkan Alaca, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal as it will automatically gather and attach updated debug information to this report:

apport-collect -p xorg 1337749

Please ensure you have xdiagnose installed, and that you click the Yes button for attaching additional debugging information.

As well, given the information from the prior release is already available, testing a release prior to the development one would not be helpful.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

tags: added: latest-bios-f12
Changed in xorg (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Furkan (falaca) wrote :

Cristopher,

After upgrading to xserver-xorg-lts-utopic (Xorg 1.16), the CPU usage for desktop animations is down by about half - presumably due to the new GLAMOR optimizations. I suspect it may be reduced even further with the improvements in Xorg 1.17.

With Catalyst, upgrading from Xorg 1.15 to 1.16 made no difference. But considering all the other problems I've had with Catalyst, I suspect that the poor 2D desktop performance is probably due to Catalyst itself, and not Xorg. So I would say that this bug report could be closed.

Revision history for this message
penalvch (penalvch) wrote :

Furkan Alaca, this bug report is being closed due to your last comment https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1337749/comments/8 regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in xorg (Ubuntu):
status: Incomplete → Invalid
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.