Bug 299870

Summary: Xorg uses 100% CPU when KTorrent window is shown
Product: [Plasma] kwin Reporter: Rune Jensen <jensrune>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: arthur
Priority: NOR Keywords: triaged
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Rune Jensen 2012-05-12 10:44:51 UTC
Xorg puts an unusual load on CPU whenever KTorrent's main window is displayed, something in the 50-100% range. 

Unloading all the plugins won't fix anything, but as soon as I minimize KT, Xorg soars down to 1% or less. 

Same problem with both Nvidia binary drivers, nv driver and AMD fglrx.
Problem specially noticeable when the Peers tab is populated and selected 

Reproducible: Always

Steps to Reproduce:
1.Start KTorrent and download a popular torrent. See Xorg process suck up all your CPU
2.
3.



rune@linux-rc3p:~> Xorg -version

X.Org X Server 1.10.4
Release Date: 2011-08-19
X Protocol Version 11, Revision 0
Build Operating System: openSUSE SUSE LINUX
Current Operating System: Linux linux-rc3p.site 3.1.10-1.9-desktop #1 SMP PREEMPT Thu Apr 5 18:48:38 UTC 2012 (4a97ec8) x86_64
Kernel command line: root=/dev/disk/by-id/ata-SAMSUNG_HM321HI_S25WJ9EB514841-part5 resume=/dev/disk/by-id/ata-SAMSUNG_HM321HI_S25WJ9EB514841-part6 splash=silent quiet vga=0x317
Build Date: 10 November 2011  03:34:36PM
 
Current version of pixman: 0.24.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.

KTorrent V4.1.2 KDE 4.7.2 "Release 5"

This problem has been there for ages :
See http://ktorrent.org/forum/viewtopic.php?p=12548 for how long this has been a problem
Comment 1 Joris Guisson 2012-05-13 10:49:08 UTC
What is the GUI update interval set to in the advanced settings ?
Comment 2 Rune Jensen 2012-05-13 13:15:25 UTC
Default 1000ms.
Increasing it to 5000ms to make it behave. But then the GUI isnt exactly responsive.
Comment 3 Joris Guisson 2012-05-14 16:28:25 UTC
I can't reproduce this problem, Xorg hardly uses any CPU with the peers tab shown.

How many peers are being shown when this happens ?
Comment 4 Rune Jensen 2012-05-14 17:05:37 UTC
Its mostly independent of number of peers shown. One or two peers in the peers tab and Xorg goes to 100%. Switch to another empty tab like webseeds and Xorg uses 20-30% according to top. Minimize ktorrent to the system tray (not only minimize window) and Xorg pretty much disappears from top listing
Comment 5 Rune Jensen 2012-05-14 17:08:03 UTC
FYI :
[   15.107292] fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.
[   15.490285] [fglrx] Maximum main memory to use for locked dma buffers: 1496 MBytes.
[   15.491067] [fglrx]   vendor: 1002 device: 9804 count: 1
[   15.493778] [fglrx] ioport: bar 1, base 0x5000, size: 0x100
[   15.495463] [fglrx] Kernel PAT support is enabled
[   15.495518] [fglrx] module loaded - fglrx 8.93.4 [Dec  5 2011] with 1 minors
[   22.103718] boot.fglrxrebuild[683]: Check for rebuild the fglrx kernel module if necessary ...
[   22.125602] boot.fglrxrebuild[683]: The fglrx kernel module was already built.
[   22.128493] boot.fglrxrebuild[683]: Check for the fglrx kernel module is running...
[   22.138301] boot.fglrxrebuild[683]: The fglrx kernel module is loaded.
[   22.139653] boot.fglrxrebuild[683]: ..done
[   29.021071] [fglrx] ATIF platform detected with notification ID: 0x81
[   31.211231] fglrx_pci 0000:00:01.0: irq 44 for MSI/MSI-X
[   31.212460] [fglrx] Firegl kernel thread PID: 1339
[   31.212616] [fglrx] Firegl kernel thread PID: 1340
[   31.213173] [fglrx] Firegl kernel thread PID: 1341
[   31.213470] [fglrx] IRQ 44 Enabled
[   31.441904] [fglrx] Gart USWC size:504 M.
[   31.441913] [fglrx] Gart cacheable size:196 M.
[   31.441926] [fglrx] Reserved FB block: Shared offset:0, size:1000000 
[   31.441934] [fglrx] Reserved FB block: Unshared offset:fe6b000, size:195000 
[   31.441941] [fglrx] Reserved FB block: Unshared offset:17ff4000, size:c000 
[  730.809891] [fglrx] IRQ 44 Disabled
[  730.809998] [fglrx] Preparing suspend fglrx in kernel.
[  730.908172] [fglrx] Suspending fglrx in kernel completed.
[  730.908184] [fglrx] Power down the ASIC .
[  731.985258] fglrx_pci 0000:00:01.0: restoring config space at offset 0x1 (was 0x100007, writing 0x100403)
[  732.091659] fglrx_pci 0000:00:01.0: setting latency timer to 64
[  732.093373] [fglrx] Power up the ASIC
[  732.093488] [fglrx] Preparing resume fglrx in kernel.
[  732.118194] [fglrx] Resuming fglrx in kernel completed.
[  732.118291] [fglrx] IRQ 44 Enabled
Comment 7 Rune Jensen 2012-05-14 17:23:43 UTC
kcmshell4 kwincompositing
OpenGL vendor string:                   ATI Technologies Inc.
OpenGL renderer string:                 AMD Radeon HD 6310 Graphics 
OpenGL version string:                  1.4 (2.1 (4.2.11399 Compatibility Profile Context))
Driver:                                 Catalyst
Driver version:                         2.1
GPU class:                              EVERGREEN
OpenGL version:                         1.4
X server version:                       1.10.4
Linux kernel version:                   3.1.10
Direct rendering:                       no
Requires strict binding:                yes
GLSL shaders:                           no
Texture NPOT support:                   yes
OpenGL vendor string:                   ATI Technologies Inc.
OpenGL renderer string:                 AMD Radeon HD 6310 Graphics 
OpenGL version string:                  1.4 (2.1 (4.2.11399 Compatibility Profile Context))
Driver:                                 Catalyst
Driver version:                         2.1
GPU class:                              EVERGREEN
OpenGL version:                         1.4
X server version:                       1.10.4
Linux kernel version:                   3.1.10
Direct rendering:                       no
Requires strict binding:                yes
GLSL shaders:                           no
Texture NPOT support:                   yes
Comment 8 Joris Guisson 2012-06-14 09:29:51 UTC
There is nothing I can do about this problem, ktorrent doesn't do anything fancy GUI wise, it just uses standard Qt widgets. Maybe the kwin people have some idea what is going on, so reassigning to them.
Comment 9 Thomas Lübking 2012-06-14 09:59:55 UTC
sth. will likely repaint in a loop - what is an expensive operation on a composited desktop (requires damage event handling and pixmap -> texture conversion) but is neither "cheap" on an uncomposited desktop either.

a) press "shift+alt+f12" the compositor will suspend and the Xorg cou load should drop.
b) run "kcmshell4 kwincompositing" and in "all effects" activate "show paint"
(WARNING: this will cause colorful flicker on your screen, so do not do this if you suffer from epilepsy)
As result some region on the screen (inside the ktorrent window) will likely flicker a lot - that's the item with the high repaint frequency (probably some animated progressbars or so)
Comment 10 Martin Flöser 2013-01-17 16:11:21 UTC
what did the show paint effect indicate?
Comment 11 Andrew Crouthamel 2018-09-24 02:02:28 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Andrew Crouthamel 2018-10-27 04:22:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!