Announcement

Collapse
No announcement yet.

Xorg 100% CPU usage

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Xorg 100% CPU usage

    My kubuntu 8.04 always has problems these days:

    1. the texts in the screen sometimes disappear or displays wrong. Only I highlight the texts by selecting, the displaying could become right. But later, it may happen again. (very frequently)

    2. the system hangs from time to time, most time it lasts several seconds, but in the worst case, the whole system freezes. I had to ssh via another computer, use "top" to see that xorg takes 100% CPU.
    I have to "Kill -9" xorg, and lost everything in X.
    Code:
    Tasks: 157 total,  3 running, 153 sleeping,  0 stopped,  1 zombie
    Cpu(s): 50.2%us, 0.0%sy, 0.0%ni, 49.7%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
    Mem:  515532k total,  506016k used,   9516k free,   4756k buffers
    Swap:  979956k total,  317328k used,  662628k free,  165892k cached
    
     PID USER   PR NI VIRT RES SHR S %CPU %MEM  TIME+ COMMAND                             
     6190 root   20  0 135m 31m 2980 R 100 6.2 32:24.61 Xorg                              
      1 root   20  0 2844 452 448 S  0 0.1  0:01.36 init                              
      2 root   15 -5   0  0  0 S  0 0.0  0:00.00 kthreadd                            
      3 root   RT -5   0  0  0 S  0 0.0  0:00.00 migration/0                           
      4 root   15 -5   0  0  0 S  0 0.0  0:00.50 ksoftirqd/0                           
      5 root   RT -5   0  0  0 S  0 0.0  0:00.00 watchdog/0                           
      6 root   RT -5   0  0  0 S  0 0.0  0:00.00 migration/1                           
      7 root   15 -5   0  0  0 S  0 0.0  0:00.24 ksoftirqd/1                           
      8 root   RT -5   0  0  0 S  0 0.0  0:00.00 watchdog/1                           
      9 root   15 -5   0  0  0 S  0 0.0  0:00.18 events/0                            
      10 root   15 -5   0  0  0 S  0 0.0  0:00.10 events/1                            
      11 root   15 -5   0  0  0 S  0 0.0  0:00.00 khelper                             
      46 root   15 -5   0  0  0 S  0 0.0  0:00.14 kblockd/0                            
      47 root   15 -5   0  0  0 S  0 0.0  0:00.04 kblockd/1                            
      50 root   15 -5   0  0  0 S  0 0.0  0:00.00 kacpid                             
      51 root   15 -5   0  0  0 S  0 0.0  0:00.00 kacpi_notify                          
     122 root   15 -5   0  0  0 S  0 0.0  0:00.00 kseriod                             
     162 root   20  0   0  0  0 S  0 0.0  0:00.32 pdflush                             
     163 root   20  0   0  0  0 S  0 0.0  0:00.14 pdflush                             
     164 root   15 -5   0  0  0 S  0 0.0  0:02.18 kswapd0
    All these things may happen after a "apt-get upgrade", and I remember there were many packages upgraded that time. It should be about two or three weeks ago.

    What should I do to solve the problem? it really feels terrible.
    Thank you.

    #2
    Re: Xorg 100% CPU usage

    Definitely video problems of some kind. Maybe it is getting too hot and becoming unstable.

    What is the graphic chip? --
    Code:
    lspci -v
    will show it.

    Also, if you can post your /etc/X11/xorg.conf file, that might help.

    If you're up for an experiment, there have been major changes in the X server during development of 8.10. It would be interesting to see how an 8.10 Live CD runs on your machine. Make one from the daily build here:

    http://cdimage.ubuntu.com/kubuntu/daily-live/current/

    Comment


      #3
      Re: Xorg 100% CPU usage

      hi dibl,

      Here's my "lspci -v" and xorg.conf, thanks.
      Code:
      ~$ lspci -v
      00:00.0 Host bridge: Silicon Integrated Systems [SiS] 661FX/M661FX/M661MX Host (rev 11)
          Subsystem: Foxconn International, Inc. Unknown device 0c4c
          Flags: bus master, medium devsel, latency 32
          Memory at d0000000 (32-bit, non-prefetchable) [size=128M]
          Capabilities: <access denied>
      
      00:01.0 PCI bridge: Silicon Integrated Systems [SiS] SiS AGP Port (virtual PCI-to-PCI bridge) (prog-if 00 [Normal decode])
          Flags: bus master, 66MHz, fast devsel, latency 64
          Bus: primary=00, secondary=01, subordinate=01, sec-latency=32
          Memory behind bridge: e0000000-e1ffffff
          Prefetchable memory behind bridge: d8000000-dfffffff
      
      00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS964 [MuTIOL Media IO] (rev 36)
          Flags: bus master, medium devsel, latency 0
      
      00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev 01) (prog-if 80 [Master])
          Subsystem: Foxconn International, Inc. Unknown device 0c4c
          Flags: bus master, medium devsel, latency 128, IRQ 16
          I/O ports at 01f0 [size=8]
          I/O ports at 03f4 [size=1]
          I/O ports at 0170 [size=8]
          I/O ports at 0374 [size=1]
          I/O ports at 4000 [size=16]
          Capabilities: <access denied>
      
      00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] AC'97 Sound Controller (rev a0)
          Subsystem: Foxconn International, Inc. Unknown device 0c4c
          Flags: bus master, medium devsel, latency 32, IRQ 23
          I/O ports at d000 [size=256]
          I/O ports at d400 [size=128]
          Capabilities: <access denied>
      
      00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10 [OHCI])
          Subsystem: Foxconn International, Inc. Unknown device 0c4c
          Flags: bus master, medium devsel, latency 32, IRQ 18
          Memory at e3004000 (32-bit, non-prefetchable) [size=4K]
      
      00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10 [OHCI])
          Subsystem: Foxconn International, Inc. Unknown device 0c4c
          Flags: bus master, medium devsel, latency 32, IRQ 19
          Memory at e3000000 (32-bit, non-prefetchable) [size=4K]
      
      00:03.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10 [OHCI])
          Subsystem: Foxconn International, Inc. Unknown device 0c4c
          Flags: bus master, medium devsel, latency 32, IRQ 20
          Memory at e3001000 (32-bit, non-prefetchable) [size=4K]
      
      00:03.3 USB Controller: Silicon Integrated Systems [SiS] USB 2.0 Controller (prog-if 20 [EHCI])
          Subsystem: Foxconn International, Inc. Unknown device 0c4c
          Flags: bus master, medium devsel, latency 32, IRQ 21
          Memory at e3002000 (32-bit, non-prefetchable) [size=4K]
          Capabilities: <access denied>
      
      00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 91)
          Subsystem: Foxconn International, Inc. Unknown device 0c4c
          Flags: bus master, medium devsel, latency 32, IRQ 22
          I/O ports at d800 [size=256]
          Memory at e3003000 (32-bit, non-prefetchable) [size=4K]
          [virtual] Expansion ROM at 30000000 [disabled] [size=128K]
          Capabilities: <access denied>
      
      00:05.0 IDE interface: Silicon Integrated Systems [SiS] RAID bus controller 180 SATA/PATA [SiS] (rev 01) (prog-if 85 [Master SecO PriO])
          Subsystem: Foxconn International, Inc. Unknown device 0c4c
          Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 17
          I/O ports at dc00 [size=8]
          I/O ports at e000 [size=4]
          I/O ports at e400 [size=8]
          I/O ports at e800 [size=4]
          I/O ports at ec00 [size=16]
          I/O ports at <unassigned>
          Capabilities: <access denied>
      
      01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] (rev a1) (prog-if 00 [VGA controller])
          Flags: bus master, 66MHz, medium devsel, latency 248, IRQ 16
          Memory at e0000000 (32-bit, non-prefetchable) [size=16M]
          Memory at d8000000 (32-bit, prefetchable) [size=128M]
          [virtual] Expansion ROM at e1000000 [disabled] [size=128K]
          Capabilities: <access denied>
      Code:
      cat /etc/X11/xorg.conf
      # nvidia-xconfig: X configuration file generated by nvidia-xconfig
      # nvidia-xconfig: version 1.0 (buildmeister@builder57) Wed Apr 2 00:14:06 PST 2008
      
      
      Section "ServerLayout"
        Identifier   "Layout0"
        Screen   0 "Screen0" 0 0
        InputDevice  "Keyboard0" "CoreKeyboard"
        InputDevice  "Mouse0" "CorePointer"
      EndSection
      
      Section "Files"
        RgbPath     "/usr/X11R6/lib/X11/rgb"
      EndSection
      
      Section "Module"
        Load      "dbe"
        Load      "extmod"
        Load      "type1"
        Load      "freetype"
        Load      "glx"
      EndSection
      
      Section "InputDevice"
      
        # generated from default
        Identifier   "Mouse0"
        Driver     "mouse"
        Option     "Protocol" "auto"
        Option     "Device" "/dev/psaux"
        Option     "Emulate3Buttons" "no"
        Option     "ZAxisMapping" "4 5"
      EndSection
      
      Section "InputDevice"
      
        # generated from default
        Identifier   "Keyboard0"
        Driver     "kbd"
      EndSection
      
      Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Unknown"
        ModelName   "Unknown"
        HorizSync    30.0 - 110.0
        VertRefresh   50.0 - 150.0
        Option     "DPMS"
      EndSection
      
      Section "Device"
        Identifier   "Device0"
        Driver     "nvidia"
        VendorName   "NVIDIA Corporation"
      EndSection
      
      Section "Screen"
        Identifier   "Screen0"
        Device     "Device0"
        Monitor    "Monitor0"
        DefaultDepth  24
        SubSection   "Display"
          Depth    24
        EndSubSection
      EndSection
      If I have a chance to burn a 8.10 Live CD later some time, I'll report here how it works. Thanks for the information.

      Comment


        #4
        Re: Xorg 100% CPU usage

        For the 5200 FX, you should be using the 177.80 driver.

        Before you install it, you might try the following experiment (back up your existing xorg.conf file first):

        Where it says:

        Code:
        Section "Files"
          RgbPath     "/usr/X11R6/lib/X11/rgb"
        EndSection
        comment out the path, so it looks like:

        Code:
        Section "Files"
        #  RgbPath     "/usr/X11R6/lib/X11/rgb"
        EndSection
        and then restart the X server with Ctrl-Alt-Backspace.

        It may or may not make a difference, but there was a bug in the Nvidia installer that would cause trouble with that path on some systems, so it's worth a try to see if it helps. If it doesn't, I'd say try installing the packaged driver nvidia-glx-177. You might need to run
        Code:
        nvidia-xconfig
        after installing the package, to get a correct xorg.conf file.

        Comment


          #5
          Re: Xorg 100% CPU usage

          After I comment the "RgbPath" part, the problem still happens.

          I tried to install the latest 177.80 driver, but failed.
          Here's the log from /var/log/nvidia-installer.log

          Code:
          441   ld -m elf_i386 -r -m elf_i386 --build-id -o /tmp/selfgz7977/NVIDIA-Linux-
          442  x86-177.80-pkg1/usr/src/nv/nvidia.ko /tmp/selfgz7977/NVIDIA-Linux-x86-177.80
          443  -pkg1/usr/src/nv/nvidia.o /tmp/selfgz7977/NVIDIA-Linux-x86-177.80-pkg1/usr/s
          444  rc/nv/nvidia.mod.o
          445  NVIDIA: left KBUILD.
          446 -> done.
          447 -> Kernel module compilation complete.
          448 ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most
          449    frequently when this kernel module was built against the wrong or
          450    improperly configured kernel sources, with a version of gcc that differs
          451    from the one used to build the target kernel, or if a driver such as
          452    rivafb/nvidiafb is present and prevents the NVIDIA kernel module from
          453    obtaining ownership of the NVIDIA graphics device(s).
          454    
          455    Please see the log entries 'Kernel module load error' and 'Kernel
          456    messages' at the end of the file '/var/log/nvidia-installer.log' for
          457    more information.
          458 -> Kernel module load error: insmod: error inserting './usr/src/nv/nvidia.ko':
          459  -1 No such device
          460 -> Kernel messages:
          461  [ 2165.430801] NVRM: Xid (0001:00): 6, PE0000 0f2c ff2f2f2f 0000073c
          462  ff2f2f2f 00000000
          463  [ 2169.625302] NVRM: Xid (0001:00): 6, PE0000 1310 00131313 00006424
          464  00131313 00000000
          465  [ 2172.409612] agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0.
          466  [ 2172.409635] agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode
          467  [ 2172.409683] agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode
          468  [ 2172.901285] NVRM: Xid (0001:00): 6, PE0000 0020 ff202020 00000040
          469  ff202020 beef0201
          470  [ 2175.808456] NVRM: Xid (0001:00): 6, PE0000 1fdc fbffbd77 00000564
          471  e9e5ffdf 00000000
          472  [ 2180.983191] NVRM: Xid (0001:00): 6, PE0000 127c 003f075f 00005040
          473  003f075f 00000000
          474  [ 2180.999027] NVRM: Xid (0001:00): 2, CCMDs 00000000 0000307c 00000224
          475  00000000 00001000
          It can be seen from the ERROR part, which says "-1 No such device".

          But the current 173 driver seems OK.

          Is it really the problem with my graphic card? or the driver?

          Comment


            #6
            Re: Xorg 100% CPU usage

            I remove the 5200 FX, and use the mainboard integrated graphic card instead, the problem disapeers.
            Although the SiS integrated VGA Display Adapter is not good as the nvidia one, even without a official linux driver for debian/ubuntu, I still use it to avoid the annoying problems.

            Thank you dibl for all the help!

            Comment

            Working...
            X