Bug 537584

Summary: X process eat 100% of CPU (KDE panel)
Product: [Fedora] Fedora Reporter: Sergei LITVINENKO <sergei.litvinenko>
Component: xorg-x11-serverAssignee: Ben Skeggs <bskeggs>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: airlied, ajax, awilliam, bskeggs, mcepl, mjr4077au, sergei.litvinenko, xgl-maint
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-27 18:11:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
log with nvidia proprietary driver
none
log with nouveau driver
none
xorg.conf for nvidia proprietary driver
none
startx > startx.log 2>&1
none
This patch speeds up a simple test app that maps a 1x1 ARGB window from 11 seconds to 0.005 seconds. none

Description Sergei LITVINENKO 2009-11-14 18:00:21 UTC
Description of problem:
Under KDE: left mouse click to KDE panel or some icons of applications on KDE panel (as example Device notifier) cause frosen the system on 5-10 seconds and 100% CPU is usage. So, X use 100% of CPU.

Version-Release number of selected component (if applicable):
xorg-x11-server-common-1.7.1-7.fc12.i686
xorg-x11-server-utils-7.4-13.fc12.i686
xorg-x11-server-Xorg-1.7.1-7.fc12.i686

How reproducible:
50%.
On eee901 with embedded intel video is like OK (may be there is, but short)
On desktop with GeForce 8800GTX (01:00.0 VGA compatible controller: nVidia Corporation G80 [GeForce 8800 GTX] (rev a2)) there is problem ("nouveau" and proprietary "nvidia" is tested, but with the same result).


Steps to Reproduce:
1. Run KDE
2. left mouse ckick on "Digital clock" applet or "Device Notifier" applet or "konsole" (from panel only, not from desktop).
3.
  
Actual results:
system is frose 5-10 seconds and after applet run as expected. This 5-10 second X server use 100% of CPU.

Expected results:
All work as usually.

Additional info:

== System before applet on KDE panel activation...
==================================================
top - 19:24:26 up 49 min,  5 users,  load average: 0.60, 0.32, 0.18
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.6%us,  0.2%sy,  0.0%ni, 97.7%id,  0.5%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   6192800k total,  2434844k used,  3757956k free,   263452k buffers      
Swap: 19454632k total,        0k used, 19454632k free,  1765408k cached       

PID   USER PR NI VIRT RES  SHR S %CPU %MEM TIME+   COMMAND
23124 root 20  0 812m 22m 6776 S  0.0  0.4 0:10.85 X

== Device Notofier is clicked. Konsole session is frosen too.
== After 5-10 second...
=============================================================
top - 19:24:32 up 49 min,  5 users,  load average: 0.55, 0.31, 0.18
Tasks:   1 total,   1 running,   0 sleeping,   0 stopped,   0 zombie
Cpu(s): 50.0%us,  0.0%sy,  0.0%ni, 49.2%id,  0.8%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   6192800k total,  2440812k used,  3751988k free,   263460k buffers      
Swap: 19454632k total,        0k used, 19454632k free,  1765428k cached       

PID   USER PR NI VIRT RES  SHR S %CPU %MEM  TIME+  COMMAND
23124 root 20  0 819m 27m 6776 R 99.9  0.5 0:14.25 X

top - 19:24:35 up 49 min,  5 users,  load average: 0.59, 0.33, 0.18
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
Cpu(s): 23.7%us,  0.8%sy,  0.0%ni, 75.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   6192800k total,  2435216k used,  3757584k free,   263460k buffers      
Swap: 19454632k total,        0k used, 19454632k free,  1765444k cached       

PID   USER  PR NI VIRT  RES  SHR S %CPU %MEM  TIME+   COMMAND
23124 root  20  0 812m  22m 6776 S 46.3  0.4  0:15.64 X
...

Here window of Device Notifier is opened and CPU is OK again...


PS: 
On Fedora-11 all is OK.
CPU is "Intel(R) Core(TM) 2 Duo CPU E6850 @3.00GHz"

Comment 1 Matěj Cepl 2009-11-15 14:00:38 UTC
Thanks for the bug report.  We have reviewed the information you have provided above, and there is some additional information we require that will be helpful in our diagnosis of this issue.

Please attach your X server config file (/etc/X11/xorg.conf, if available), output of the dmesg command, and X server log file (/var/log/Xorg.*.log) to the bug report as individual uncompressed file attachments using the bugzilla file attachment link below.

We will review this issue again once you've had a chance to attach this information.

Thanks in advance.

Comment 2 Sergei LITVINENKO 2009-11-15 15:12:11 UTC
Created attachment 369599 [details]
log with nvidia proprietary driver

Comment 3 Sergei LITVINENKO 2009-11-15 15:13:07 UTC
Created attachment 369600 [details]
log with nouveau driver

Comment 4 Sergei LITVINENKO 2009-11-15 15:14:17 UTC
Created attachment 369601 [details]
xorg.conf for nvidia proprietary driver

Comment 5 Sergei LITVINENKO 2009-11-15 15:23:20 UTC
Also:
1. It is tested with old and new user profile (new user is created for test) - the same result.
2. It is tested in runlevel=5 and runlevel=3 - the same result.
3. For testing "nouveau" driver /etc/X11/xorg.conf was disabled (renamed).

Comment 6 Sergei LITVINENKO 2009-11-15 18:27:28 UTC
Created attachment 369615 [details]
startx > startx.log 2>&1

Some add info (all startx session). May be it can be usefull.

Environment:
===========================================================
1. Runlevel 3
2. xorg.conf
---
# Xorg configuration created by livna-config-display

Section "Files"
        ModulePath   "/usr/lib/xorg/modules/extensions/nvidia"
        ModulePath   "/usr/lib/xorg/modules"
EndSection

Section "ServerFlags"
        Option      "AIGLX" "on"
EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "nvidia"
        Option      "AddARGBGLXVisuals" "True"
EndSection

Section "Extensions"
        Option      "Composite" "Enable"
EndSection
---
3. `startx > startx.log 2>&1`

Comment 7 Sergei LITVINENKO 2009-11-15 21:31:23 UTC
Some add:

Problem is not for all aplications on KDE panel.

It is affected for "Digital clock" (result of left mouse click is Calendar), for Device Notifier (result of left mouse click is list of connected devices), for "konsole profiles choice" (result of left mouse click is list of profiles).

It is not affected for "keyboard switch" (it just change flag), for "Show Desktop", for "Application Launcher Menu", kmix.

Maybe there is some function of KDE panel, which activate this problem, but this function is used not for all applications.

Comment 8 Sergei LITVINENKO 2009-11-15 21:34:53 UTC
Also it is affeced for KDE panel settings (unlock widgets, change KDE panel settings)...

Comment 9 Sergei LITVINENKO 2009-11-20 06:38:30 UTC
IMHO, bug is not in nouveau driver. I think, it is in xorg core. 

Bug is triggered after migration to nvidia proprietary driver. IMHO, nvidia provide function, which is used in xorg not enough accurate. 

Hmmm, how can I debug xorg core?
:)

Comment 10 Sergei LITVINENKO 2009-11-20 19:47:04 UTC
Maybe, this bug is like
https://bugzilla.redhat.com/show_bug.cgi?id=533620

Comment 11 Sergei LITVINENKO 2009-11-21 16:18:23 UTC
Created attachment 372757 [details]
This patch speeds up a simple test app that maps a 1x1 ARGB window from 11 seconds to 0.005 seconds.

I think, I found solution. In any case I have used this patch and it solve my problem... http://lists.x.org/archives/xorg-devel/2009-November/003569.html

Comment 12 Sergei LITVINENKO 2009-11-21 16:26:06 UTC
I just copy/paste it and add Email data, because git do not like plain text patch.

less xorg-x11-server.spec
...
Patch6051: xserver-1.7.1-gamma-kdm-fix.patch
Patch6052: xserver-1.7.1-z-fb_read_back.patch
...


[sergeil@homedesk SOURCES]$ rpm -qa | grep xorg-x11-server
---
xorg-x11-server-Xnest-1.7.1-7.fc12SL.i686
xorg-x11-server-devel-1.7.1-7.fc12SL.i686
xorg-x11-server-Xvfb-1.7.1-7.fc12SL.i686
xorg-x11-server-Xephyr-1.7.1-7.fc12SL.i686
xorg-x11-server-debuginfo-1.7.1-7.fc12SL.i686
xorg-x11-server-Xorg-1.7.1-7.fc12SL.i686
xorg-x11-server-utils-7.4-13.fc12.i686
xorg-x11-server-Xdmx-1.7.1-7.fc12SL.i686
xorg-x11-server-common-1.7.1-7.fc12SL.i686

Comment 14 Sergei LITVINENKO 2009-11-21 16:52:28 UTC
[sergeil@homedesk SOURCES]$ glxinfo
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
...

[sergeil@homedesk SOURCES]$ rpm -qa | grep nvidia
kmod-nvidia-2.6.31.5-127.fc12.i686.PAE-190.42-1.fc12.4.i686
xorg-x11-drv-nvidia-libs-190.42-2.fc12.i686
xorg-x11-drv-nvidia-190.42-2.fc12.i686
kmod-nvidia-PAE-190.42-1.fc12.4.i686

[sergeil@homedesk SOURCES]$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: nVidia Corporation G80 [GeForce 8800 GTX] (rev a2)

[sergeil@homedesk SOURCES]$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
73091 frames in 5.0 seconds = 14618.042 FPS
73483 frames in 5.0 seconds = 14696.497 FPS
73534 frames in 5.0 seconds = 14706.765 FPS
73530 frames in 5.0 seconds = 14705.933 FPS

[sergeil@homedesk SOURCES]$ cat /etc/X11/xorg.conf
# Xorg configuration created by livna-config-display

Section "Files"
        ModulePath   "/usr/lib/xorg/modules/extensions/nvidia"
        ModulePath   "/usr/lib/xorg/modules"
EndSection

Section "ServerFlags"
        Option      "AIGLX" "on"
EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "nvidia"
        Option      "AddARGBGLXVisuals" "True"
EndSection

Section "Extensions"
        Option      "Composite" "Enable"
EndSection

[sergeil@homedesk SOURCES]$ lsmod | grep nvidia
nvidia               8865932  38
i2c_core               23160  3 nvidia,videodev,i2c_i801

[sergeil@homedesk SOURCES]$ modinfo nvidia
filename:       /lib/modules/2.6.31.5-127.fc12.i686.PAE/extra/nvidia/nvidia.ko
license:        NVIDIA
alias:          char-major-195-*
alias:          pci:v000010DEd00000AA3sv*sd*bc0Bsc40i00*
alias:          pci:v000010DEd00000E00sv*sd*bc04sc80i00*
alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
depends:        i2c-core
vermagic:       2.6.31.5-127.fc12.i686.PAE SMP mod_unload 686
parm:           NVreg_EnableVia4x:int
parm:           NVreg_EnableALiAGP:int
parm:           NVreg_ReqAGPRate:int
parm:           NVreg_EnableAGPSBA:int
parm:           NVreg_EnableAGPFW:int
parm:           NVreg_Mobile:int
parm:           NVreg_ResmanDebugLevel:int
parm:           NVreg_RmLogonRC:int
parm:           NVreg_ModifyDeviceFiles:int
parm:           NVreg_DeviceFileUID:int
parm:           NVreg_DeviceFileGID:int
parm:           NVreg_DeviceFileMode:int
parm:           NVreg_RemapLimit:int
parm:           NVreg_UpdateMemoryTypes:int
parm:           NVreg_UseVBios:int
parm:           NVreg_RMEdgeIntrCheck:int
parm:           NVreg_UsePageAttributeTable:int
parm:           NVreg_EnableMSI:int
parm:           NVreg_MapRegistersEarly:int
parm:           NVreg_RegistryDwords:charp
parm:           NVreg_NvAGP:int

Comment 15 Sergei LITVINENKO 2009-11-24 06:22:10 UTC
Patched version of xorg-x11-server is applicable for intel embedded video too.
In any case on eee901 it work good. Maybe, a little faster (IMHO),as standard.

[sergeil@eee901 ~]$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)

Comment 16 Sergei LITVINENKO 2009-11-25 06:31:35 UTC
Is nobody care?

Comment 17 Sergei LITVINENKO 2009-11-27 06:24:17 UTC
OK, you do not like to use proposed solution - no problem...

But I need to know which solution do you plan to use (by KDE, by X-server, etc...) and how quick (deadlines). Bug is in the list of Fedora-12 bugs.
https://fedoraproject.org/wiki/Common_F12_bugs#Problems_when_using_the_proprietary_NVIDIA_graphics_driver_.28especially_with_KDE.29

PS: I do not understand how you (RedHat) can ignore it... I can not recommend for my friends to migrate to F12 till it do not fixed.

Comment 18 Adam Williamson 2009-11-27 18:11:32 UTC

*** This bug has been marked as a duplicate of bug 533620 ***