Bug 484054

Summary: Xorg consumes near 100% CPU....
Product: [Fedora] Fedora Reporter: Tom London <selinux>
Component: gnome-power-managerAssignee: Richard Hughes <richard>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: michal, notting, olivares14031, rhughes, richard, sangu.fedora, xgl-maint, yaneti, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-05 22:09:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Xorg.0.log when Xorg is maxing out CPU (~95%) none

Description Tom London 2009-02-04 15:13:33 UTC
Created attachment 330871 [details]
Xorg.0.log when Xorg is maxing out CPU (~95%)

Description of problem:
With recent rawhide updates, I'm noticing Xorg ramping up to 100% CPU usage:

 5827 root      20   0  553m 143m  16m R 92.1  3.8  13:26.95 Xorg               
 6581 tbl       20   0 1107m 185m  26m S  3.0  5.0   1:06.93 firefox            
 6440 tbl       20   0  817m  58m  24m S  1.7  1.6   0:31.13 rhythmbox          
 6264 tbl       20   0  159m 7668 4704 S  1.3  0.2   0:05.36 compiz             
 6266 tbl        9 -11  365m 6688 5388 S  1.3  0.2   0:14.21 pulseaudio 

I've notice immediately after gnome login that Xorg seems fine (<10%, for example).

I'm not sure what triggers this....

I don't see anything exceptional in Xorg.0.log (attached).

In ~/.xsession-errors, this is the only "new" message:

(gtk-window-decorator:6281): metacity-CRITICAL **: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed

(gtk-window-decorator:6281): metacity-CRITICAL **: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed

(gtk-window-decorator:6281): metacity-CRITICAL **: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed

(gtk-window-decorator:6281): metacity-CRITICAL **: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed

[I seem to have lost the title bars of my windows.  They went from blue with the title, to "transparent grey" without titles.]

My system is a Thinkpad X200, "Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller".

I run compiz (and no xorg.conf)

Version-Release number of selected component (if applicable):
[tbl@tlondon ~]$ rpm -qa xorg-x11-server\*
xorg-x11-server-utils-7.4-3.fc10.x86_64
xorg-x11-server-Xorg-1.5.99.902-2.fc11.x86_64
xorg-x11-server-common-1.5.99.902-2.fc11.x86_64
[tbl@tlondon ~]$ 

How reproducible:
Pretty much ever boot/login

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Antonio A. Olivares 2009-02-04 16:37:05 UTC
I have the same thing happening :(

[olivares@localhost ~]$ top

top - 10:35:59 up  1:58,  3 users,  load average: 2.35, 2.18, 2.11
Tasks: 144 total,   3 running, 140 sleeping,   0 stopped,   1 zombie
Cpu(s): 21.4%us, 77.3%sy,  1.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st
Mem:    752216k total,   717028k used,    35188k free,    73460k buffers
Swap:  3114416k total,    10152k used,  3104264k free,   306856k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 2620 root      20   0  201m  45m 8788 R 86.7  6.2 103:29.56 Xorg               
 3148 olivares  20   0  234m  75m  22m S  4.6 10.3   2:47.02 firefox            
 2866 olivares  20   0 25560 9848 7508 S  1.6  1.3   1:47.07 gkrellm            
 9161 olivares  20   0  2424 1084  832 R  1.6  0.1   0:00.15 top                
 3006 olivares  20   0  2424 1096  836 S  1.3  0.1   1:22.88 top                
 3061 olivares  20   0  114m  37m  22m S  1.3  5.0   0:45.63 konqueror          
 9173 root      39  19  4736 1268  884 S  0.7  0.2   0:00.02 awk                
 2873 olivares  20   0 22780 8848 5388 S  0.3  1.2   0:18.71 imsettings-appl    
 2893 root      20   0  4616 2268 1764 S  0.3  0.3   0:41.87 devkit-power-da    
 2973 olivares  20   0 60152  11m 8852 S  0.3  1.6   0:01.76 gnome-terminal     
 3004 olivares  20   0 11380 5248 2352 S  0.3  0.7   0:05.37 xterm              
 4590 root      39  19  5000 1336 1044 S  0.3  0.2   0:01.94 makewhatis         
    1 root      20   0  2012  624  564 S  0.0  0.1   0:02.35 init               
    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.01 kthreadd           
    3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0        
    4 root      15  -5     0    0    0 S  0.0  0.0   0:00.16 ksoftirqd/0        
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0         
[olivares@localhost ~]$ 

I have nvidia card:
[root@localhost ~]# lspci | grep 'VGA'
02:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] (rev a1)
[root@localhost ~]# 

The other machines are alright but this one :(

Comment 2 Antonio A. Olivares 2009-02-04 16:41:15 UTC
Here's smolt profile in case it helps:

http://www.smolts.org/client/show/pub_1c85fd19-f980-41b9-89fe-621a59116838

Comment 3 Antonio A. Olivares 2009-02-04 19:18:50 UTC
Same thing happens on the other computer.  That makes 2 out of 3 with this problem :(

Profile is here:

To share your profile: 
	http://www.smolts.org/client/show/pub_8d2f9e12-da57-4655-8a8e-72226e741f0f (public)
[olivares@localhost ~]$ top

top - 13:16:57 up  4:41,  2 users,  load average: 1.16, 1.10, 1.03
Tasks: 149 total,   3 running, 145 sleeping,   0 stopped,   1 zombie
Cpu(s): 18.1%us, 42.3%sy,  0.0%ni, 39.5%id,  0.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    998496k total,   983440k used,    15056k free,    67616k buffers
Swap:  2031608k total,    19128k used,  2012480k free,   570724k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 2653 root      20   0  316m  36m  10m R 97.4  3.7 275:39.90 Xorg               
28871 olivares  20   0  230m  62m  22m R 18.7  6.4   0:19.99 firefox            
 3016 root      20   0  4692 2264 1708 S  1.0  0.2   1:12.04 devkit-power-da    
 3336 olivares  20   0 25904 8580 6240 S  1.0  0.9   2:36.96 gkrellm            
28890 olivares  20   0 62380  12m 9964 S  1.0  1.3   0:00.50 gnome-terminal     
28965 olivares  20   0  2428 1076  828 R  1.0  0.1   0:00.13 top                
  321 root      15  -5     0    0    0 S  0.3  0.0   0:02.58 kswapd0            
 2126 dbus      20   0 13536 1588  896 S  0.3  0.2   0:07.85 dbus-daemon        
 2398 haldaemo  20   0  7168 4024 3364 S  0.3  0.4   0:10.56 hald               
    1 root      20   0  2012  684  476 S  0.0  0.1   0:02.23 init               
    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.03 kthreadd           
    3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.01 migration/0        
    4 root      15  -5     0    0    0 S  0.0  0.0   0:02.19 ksoftirqd/0        
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0         
    6 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/1        
    7 root      15  -5     0    0    0 S  0.0  0.0   0:00.35 ksoftirqd/1        
    8 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1         
[olivares@localhost ~]$ top

top - 13:17:35 up  4:41,  2 users,  load average: 1.09, 1.09, 1.03
Tasks: 149 total,   3 running, 145 sleeping,   0 stopped,   1 zombie
Cpu(s):  9.4%us, 42.3%sy,  0.8%ni, 44.6%id,  2.9%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    998496k total,   984544k used,    13952k free,    67736k buffers
Swap:  2031608k total,    19128k used,  2012480k free,   568924k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 2653 root      20   0  316m  36m  10m R 96.6  3.8 276:16.08 Xorg               
28970 olivares  20   0  2424  976  732 R  5.6  0.1   0:00.06 top                
 3016 root      20   0  4692 2268 1708 S  3.7  0.2   1:12.30 devkit-power-da    
 2126 dbus      20   0 13536 1588  896 S  1.9  0.2   0:07.87 dbus-daemon        
28871 olivares  20   0  243m  65m  22m S  1.9  6.7   0:24.32 firefox            
    1 root      20   0  2012  684  476 S  0.0  0.1   0:02.23 init               
    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.03 kthreadd           
    3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.01 migration/0        
    4 root      15  -5     0    0    0 S  0.0  0.0   0:02.22 ksoftirqd/0        
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0         
    6 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/1        
    7 root      15  -5     0    0    0 S  0.0  0.0   0:00.36 ksoftirqd/1        
    8 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1         
    9 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 cpuset             
   10 root      15  -5     0    0    0 S  0.0  0.0   0:00.01 events/0           
   11 root      15  -5     0    0    0 S  0.0  0.0   0:00.05 events/1           
   12 root      15  -5     0    0    0 S  0.0  0.0   0:00.11 work_on_cpu/0      
[olivares@localhost ~]$ 

This happens with both KDE or GNOME. Since machine is dual core, only one of the CPU bars hovers to 100%, but this is not normal.

Comment 4 Yanko Kaneti 2009-02-04 21:15:53 UTC
Can you try 
$ killall devkit-power-daemon
# and so that it doesnt start again
$ yum remove Devicekit-power

Comment 5 Michal Jaegermann 2009-02-04 21:37:07 UTC
Hardware profiles do not seem to be relevant.  I am seeing the same thing on a single core x86_64 machine with a radeon graphics card.  Backing off to xorg-x11-server-Xorg-1.5.99.901-5.fc11 does not help.  Booting the previous kernel is also not effective.

That does not happen right away.  An X server runs for a while with loads which look reasonably normal and suddenly goes into an "eat CPU" mode.  This "quiet" period seems to be substantially longer if 'nomodeset' kernel parameter is used.  Also in this case loggin out of a session, which restarts X, makes the server to behave again for a while.  With 'nomodeset' absent the only way to break out of that was to reboot.

Yet another 'nomodeset' difference.  When in use I have to see yet an extreme CPU usage when sitting in a GDM login screen.  Without it I had situations when a login window background was not redrawn entirely or correctly after a logout from a session when an X CPU usage was closing to 100%.  Besides without 'nomodeset' it is practically guaranteed that my monitor will loose sync after a reboot and will have to be powered down to make it usable again.

Comment 6 Bill Nottingham 2009-02-04 21:51:46 UTC
I suspect downgrading to gnome-power-manager-2.25.2-1 will fix your problem.

Comment 7 Tom London 2009-02-04 22:13:13 UTC
Believe you're right.

After downgrading to gnome-power-manager-2.25.2-1.fc11.x86_64, Xorg seems to max at 20%, steady state <10%.

Comment 8 Michal Jaegermann 2009-02-04 22:18:35 UTC
re comment #4.

It looks like that devkit-power-daemon indeed could be a problem and without it
running CPU usage does not go that high.  OTOH a blank screen of a monitor which was not touched for a while pegged CPU at some 65% usage and making it do display
a normal desktop again dropped that to around 0%.  It looks like that something
if funny with a power managment in more general way.

Comment 9 Antonio A. Olivares 2009-02-04 22:20:41 UTC
[olivares@localhost ~]$ killall devkit-power-daemon
devkit-power-daemon(2893): Operation not permitted
devkit-power-daemon: no process killed
[olivares@localhost ~]$ su -
Password: 
[root@localhost ~]# killall devkit-power-daemon
[root@localhost ~]# yum remove Devicekit-power
Loaded plugins: dellsysidplugin2, refresh-packagekit, refresh-updatesd
Setting up Remove Process
No Match for argument: Devicekit-power
rawhide/metalink                                         | 7.0 kB     00:00     
adobe-linux-i386                                         |  951 B     00:00     
No package Devicekit-power available.
  * Maybe you meant: DeviceKit-power
No Packages marked for removal
[root@localhost ~]# 

Does not make a difference :(

Comment 10 Bill Nottingham 2009-02-04 22:40:11 UTC
This will be fixed in gnome-power-manager-2.25.3-2.fc11, when it's built.

Comment 11 Michal Jaegermann 2009-02-04 22:40:38 UTC
Re comment #7:
> Xorg seems to max at 20%, steady state <10%.

That seems high.  With gnome-power-manager-2.25.2-1.fc11, and when screensaver is not running, I have X hovering around 0%.  OTOH I still have that booted with
'nomodeset'.  Dunno ...

Comment 12 Yanko Kaneti 2009-02-04 22:52:19 UTC
FWIW it was indeed fixed for me by gnome-power-manager-2.25.3-2.fc11 built locally

Comment 13 Richard Hughes 2009-02-04 22:57:45 UTC
Yes, g-p-m triggering an xorg bug. I'll do a new rebuild tomorrow.

Comment 14 Antonio A. Olivares 2009-02-05 00:44:00 UTC
I opened KDE a second time, and CPU was hovering at 100% for a good while, but after approximately 2 minutes, things ran normal.  This happens in gnome only. 

What was taking the CPU high was a program called neopla?  that it was rebuilding something then it stopped.  

Thanks for looking at this.

Comment 15 Richard Hughes 2009-02-05 12:01:27 UTC
Built as https://koji.fedoraproject.org/koji/buildinfo?buildID=81670 -- works for me. Ajax is the legend for spotting the bug.

Comment 16 Zdenek Kabelac 2009-02-05 14:30:10 UTC
I've been experiencing same problem - the build 81670 solved the problem for me with Xorg eating 100% - but I still do not see power-manager icon on the panel as I used to, and I get its message written bellow the gnome footprint. Also I'm not quite sure what does devkit do that it needs to consume so much CPU now - it's quite noticable in the top - but I guess this is topic for a new bugzilla.

Comment 17 Tom London 2009-02-05 14:39:46 UTC
(In reply to comment #15)
> Built as https://koji.fedoraproject.org/koji/buildinfo?buildID=81670 -- works
> for me. Ajax is the legend for spotting the bug.

I can also confirm: gnome-power-manager-2.25.3-3.fc11.x86_64 works for me.

Points to Ajax!

Comment 18 Adam Jackson 2009-02-05 22:09:21 UTC
Fixed in rawhide, closing.  Thanks all for testing!