Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 325971 - x11-drivers/nvidia-drivers: High CPU utilization: 50-60 %
Summary: x11-drivers/nvidia-drivers: High CPU utilization: 50-60 %
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal with 1 vote (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-28 11:38 UTC by Eugene
Modified: 2010-09-26 06:09 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
My xorg.conf (xorg.conf,2.14 KB, text/plain)
2010-06-28 11:39 UTC, Eugene
Details
My xorg.0.log (Xorg.0.log,18.66 KB, text/plain)
2010-06-28 11:40 UTC, Eugene
Details
my emerge --info (emerge-info.txt,6.14 KB, text/plain)
2010-06-28 11:41 UTC, Eugene
Details
xorg.conf (xorg.conf,5.13 KB, text/plain)
2010-07-04 09:05 UTC, Etaoin Shrdlu
Details
Xorg log (Xorg.0.log,28.73 KB, text/plain)
2010-07-04 09:05 UTC, Etaoin Shrdlu
Details
My resulting xorg.conf (xorg.conf,1.33 KB, text/plain)
2010-09-26 06:07 UTC, Eugene
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene 2010-06-28 11:38:35 UTC
I have tried to use all last xorg-server versions, but always get same problem. :(.
My environment:
----------------
platform: x86 (Pentium 4)
xorg-server: 1.6.5, 1.7.6-r1, 1.8.1.902
kde: 4.4.3
драйвера nvidia: 190.42-r3, 190.42-r3
kernel: sys-kernel/zen-sources-2.6.33_p3, gentoo-sources-2.6.33-r2
all visual effects: disable;
composite mode: disable:
opengl direct rendering: yes
----------------
After some time (1-2 hours), system begin slow working:
1. Cursor breaks text in graphics text editors (kmail, kate, etc.)
2. Scrolling begin uneven in browsers and Eclipse etc.
3. Slow switch between virtual screens in KDE-4.4
4. All system begin very very slow.
5. xorg-server utilizes 50-60% CPU.

This is happens at my working PC. At home, my DELL inspiron 9400 (Core2 Duo) work OK (x86-64).

IMPORTANT: 
If I switch to other console (ex: Ctrl+Alt+2) and back in X, then performance has repaired!. But after several time same problem happens again.

May be problem with fonts rendering?

Reproducible: Always

Steps to Reproduce:
1.Enter in KDE-4.4
2.Intensive working with system (compiling, parking/uppacking arhieve)+ my memory (2G) loaded at 70%
3.System begin slow work.
4.Switch to other console (Ex.: Ctrl+Alt+2) 
5.Switch back in X
6.Performance has repaired
7.After 1-2 hours - see point 3 above. ;)

Actual Results:  
System slow work

Expected Results:  
System work very fast
Comment 1 Eugene 2010-06-28 11:39:52 UTC
Created attachment 236805 [details]
My xorg.conf
Comment 2 Eugene 2010-06-28 11:40:20 UTC
Created attachment 236807 [details]
My xorg.0.log
Comment 3 Eugene 2010-06-28 11:41:12 UTC
Created attachment 236809 [details]
my emerge --info
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-02 01:11:27 UTC
Please attach a debugger (gdb) to the X process and see what it's looping in.
Comment 5 Eugene 2010-07-02 06:29:14 UTC
How do I may connect gdb to working xorg ?
Comment 6 Oleh Kravchenko 2010-07-02 15:45:22 UTC
(In reply to comment #5)
> How do I may connect gdb to working xorg ?
> 

(In reply to comment #5)
> How do I may connect gdb to working xorg ?
> 

$ gdb program <PID_OF_XORG_SERVER>
Comment 7 Etaoin Shrdlu 2010-07-04 08:24:10 UTC
I might be seeing the same thing (or maybe not).
Basically, I'm seeing delays in X, with the system unresponsive, when doing just about anything. Each mini-freeze lasts usually around one second, during which the X process goes to 100% CPU.
If I strace X, I can clearly and constantly see the following sequence during the freezes (with nothing else happening in between):

rt_sigreturn(0xe)                       = 935
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 930
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 925
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 920
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 915
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 909
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 899
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 889
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 879
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 869
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 859
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 849
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 839
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 829
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 818
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 808
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 798
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 788
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 778
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 768
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 758
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 747
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 737
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 727
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 717
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 707
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 697
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 687
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 676
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 666
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 656
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 646
...snip other lines where the result decreases...
rt_sigreturn(0xe)                       = 169
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 158
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 148
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 138
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 128
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 118
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 108
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 98
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 87
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 77
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 67
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 57
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 47
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 37
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 27
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 16
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe)                       = 6

The numbers can vary slightly, but they always start from around 1000 and decrease to 0, at which point X unfreezes.

I also see sequences of lots and lots of these:

...
ioctl(11, 0xc0406429, 0x7fff9ef45380)   = 0
ioctl(11, 0xc010644d, 0x7fff9ef47770)   = 0
ioctl(11, 0xc0406429, 0x7fff9ef47650)   = 0
ioctl(11, 0xc010644d, 0x7fff9ef47900)   = 0
ioctl(11, 0xc0406429, 0x7fff9ef477e0)   = 0
ioctl(11, 0xc010644d, 0x7fff9ef47770)   = 0
...

but these might be unrelated. I'm not sure what to do now. I tried attaching to X with gdb, but I'm not able to see what it does; if I do

gdb /usr/sbin/X $(pidof X)

and then "continue", it doesn't show me what it's doing.
Comment 8 Etaoin Shrdlu 2010-07-04 08:24:59 UTC
# emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.11.2-r0, 2.6.33-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-r2-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-gentoo-1.12.13
Timestamp of tree: Sun, 04 Jul 2010 07:45:03 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -Os -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo                 http://ftp.snt.ipv6.utwente.nl/pub/os/linux/gentoo                 http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="64bit X a52 aalib acl acpi alsa amd64 arts avi berkdb branding bzip2 bzlib cairo caps cdr chm cracklib crypt curl dga dio djvu dlloader dri dvd dvdr dvdread encode exceptions exif fam ffmpeg font-server ftp gif glib gtk gtk2 handbook hddtemp idn imap imlib ipv6 jabber java jpeg kde kdehiddenvisibility kdexdeltas lock mad maildir mbox memlimit menu-plugin midi mime mmap mng motif mozbranding mp3 mpeg multilib musepack ncurses nls nntp nocd nptl nptlonly nsplugin offensive ogg oggvorbis opengl pam pcntl pcre pdf pdflib perl png pnp posix ps python qt qt3 qt3support qt4 rdesktop rdp readline sdl semantic-desktop session shared sharedmem sockets sqlite ssl startup-notification svg sysvipc tcl tcltk threads thunar tiff tk truetype truetype-fonts trusted type1-fonts unicode usb userlocales vnc vorbis wavelan wireshark wmf xcomposite xine xml xml2 xmlrpc xorg xpm xsl xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon vesa fbdev ati" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 Etaoin Shrdlu 2010-07-04 09:02:51 UTC
Sorry, I should probably add:

# eix -e xorg-server
[I] x11-base/xorg-server
     Available versions:  1.6.5-r1 1.7.6 ~1.7.7 ~1.8.0 ~1.8.1.901 ~1.8.1.902 {debug dmx doc hal ipv6 kdrive minimal nptl sdl static-libs tslib +udev xorg}
     Installed versions:  1.7.6(07:42:23 PM 07/03/2010)(ipv6 nptl sdl xorg -debug -dmx -hal -kdrive -minimal -tslib)
     Homepage:            http://xorg.freedesktop.org/
     Description:         X.Org X servers

# lspci | grep ATI
01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]

My xorg.conf uses the "ati" driver. I'm attaching it along with Xorg.0.log.
Comment 10 Etaoin Shrdlu 2010-07-04 09:05:33 UTC
Created attachment 237419 [details]
xorg.conf
Comment 11 Etaoin Shrdlu 2010-07-04 09:05:56 UTC
Created attachment 237421 [details]
Xorg log
Comment 12 Etaoin Shrdlu 2010-07-05 17:29:55 UTC
After some messing around I added the following options to the ati driver and performance is much better now:

    Option      "AGPMode" "8"
    Option      "AccelDFS"  "on"
    Option      "AccelMethod"   "XAA"
    Option      "EnablePageFlip" "on"
    Option      "ColorTiling" "on"
    Option      "FBTexPercent" "0"
    Option      "RenderAccel" "on"
    Option      "DepthBits" "16"
Comment 13 Eugene 2010-07-05 17:49:10 UTC
(In reply to comment #12)
> After some messing around I added the following options to the ati driver and
> performance is much better now:
> 
>     Option      "AGPMode" "8"
>     Option      "AccelDFS"  "on"
>     Option      "AccelMethod"   "XAA"
>     Option      "EnablePageFlip" "on"
>     Option      "ColorTiling" "on"
>     Option      "FBTexPercent" "0"
>     Option      "RenderAccel" "on"
>     Option      "DepthBits" "16"
> 

Do this parameters match  to Nvidia cards ?
Comment 14 Etaoin Shrdlu 2010-07-05 18:17:20 UTC
I think those are ati (radeon, really) driver specific.
For the nvidia binary driver, the only advice I can give you is to emerge nvidia-settings and configure it from there (and have it write out the changes in xorg.conf).
Comment 15 Eugene 2010-07-05 18:58:04 UTC
Does  anybody give optimal parameters for: xorg + nvidia + kde-4.4 ?!

Comment 16 Eugene 2010-07-06 14:14:34 UTC
I have reproduced this bug.
I have install kde-4.4.5. and updated all x11-* libraries.
----
1. I have entered into KDE-4.4.5.
2. Open ~100Kb text file in any editor (Krusader editor & Kate for me).
 (Xorg utilize CPU ~ 2%)
3. Push arrow down button - > scrolling work without yankes.
4. Push arrow right button - > cursor move without yankes.
5. Work several time in system. (10-15 m.)
6. Open the same text file in any KDE editor.
7. Push arrow down button - > scrolling work with sensible yankes!!! (Xorg 
  utilize CPU increase up to 60%)
8. Push arrow right button - > cursor move without sensible yankes!!! (Xorg 
  utilize CPU increase up to 60%)
9. Switch to other console (Ex.: Ctrl+Alt+2) 
10.Switch back in X
11. Push arrow down button - > scrolling work without yankes.
12. Push arrow right button - > cursor move without yankes.
 (Xorg utilize CPU decrease down to 2%)
13. Work several time in system. (10-15 m.)
14. Open the same text file in any KDE editor.
15. Push arrow down button - > scrolling work with sensible yankes!!!
16. Push arrow right button - > cursor move without sensible yankes!!!
 (Xorg utilize CPU increase up to 60%)
17. ...
---
I suppose this is critical bug. It very slow my work. :(
It may be bound with xorg-server, KDE, fonts etc.

This bug emerged in Gentoo&Calculate linux.



Comment 17 Tomáš Chvátal (RETIRED) gentoo-dev 2010-07-11 09:09:08 UTC
It is nvidia issue (at least i saw losts of people complaining). Just disable the composititng. Your cpu utilisation will be back to normal.
Comment 18 Eugene 2010-07-14 06:56:19 UTC
(In reply to comment #17)
> It is nvidia issue (at least i saw losts of people complaining). Just disable
> the composititng. Your cpu utilisation will be back to normal.
> 
Ok. I have installed nvidia-drivers-195.36.24 and this problem became less observable. Does Nvidia-driver deveplopers know about this problem ?
Comment 19 Rémi Cardona (RETIRED) gentoo-dev 2010-09-22 07:03:21 UTC
Reassigning to nvidia maintainers as per comment #18.

Cheers
Comment 20 Eugene 2010-09-26 06:05:51 UTC
I rebuild all qt-4.6.3  libraries with USE="raster" and my system work very quckly now. 
All slowness disappears.
Thank you for all.
I attach my result xorg.conf to this bug.

Comment 21 Eugene 2010-09-26 06:06:30 UTC
I forget, I install last version of cairo: 1.10.0 :)
(In reply to comment #20)
> I rebuild all qt-4.6.3  libraries with USE="raster" and my system work very
> quckly now. 
> All slowness disappears.
> Thank you for all.
> I attach my result xorg.conf to this bug.
> 

Comment 22 Eugene 2010-09-26 06:07:26 UTC
Created attachment 248646 [details]
My resulting xorg.conf
Comment 23 Eugene 2010-09-26 06:09:14 UTC
And I add this in autoload in KDE-4.5.1:

nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 &
XLIB_SKIP_ARGB_VISUALS=1