Xorg uses 100% CPU after 5-10 minutes

Bug #261322 reported by Marty
4
Affects Status Importance Assigned to Milestone
xserver-xorg-driver-ati
Fix Released
Undecided
Unassigned
xserver-xorg-video-ati (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Intrepid that is up to date.

After logging in through gdm the system is usuable for 5 to 10 minutes before X becomes unresponsive.

I can still log in via ssh.

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 5679 root 20 0 680m 31m 5836 R 98.7 3.2 5:53.84 Xorg

Attached are Xorg.log, xorg.conf and lspci output showing card details.

Revision history for this message
Marty (marty-supine) wrote :
Revision history for this message
Marty (marty-supine) wrote :
Revision history for this message
Marty (marty-supine) wrote :
Revision history for this message
Marty (marty-supine) wrote :

I originally thought this was related to Firefox3 but I can reproduce without running Firefox.

Revision history for this message
Marty (marty-supine) wrote :

Strace output consists of only what's attached.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Hi, did you capture any earlier data with strace. What you've included isn't a lot of help on it's own because it is not possible to determine what device the file descriptor '9' corresponds to.

Thanks

Changed in xorg:
status: New → Incomplete
Revision history for this message
Marty (marty-supine) wrote :

I'm having trouble capturing an strace from early enough in the Xorg processes life to see what file descriptor '9' is.

Trying to strace the parent gdm process with -ffF causes X to crash immediately.

Trying with 'startx' from the console throws the error "xf86EnableIOPorts: failed to set IOPL" which I haven't been able to figure out in 10 minutes of Googling just now.

Any pointers on this?

Revision history for this message
Marty (marty-supine) wrote :

Right, so attacking this a different way.

$ sudo ls -l /proc/7102/fd/9
lrwx------ 1 root root 64 2008-08-28 11:41 /proc/7102/fd/9 -> /dev/dri/card0

I'll test disabling DRI.

Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati:
status: Incomplete → New
Revision history for this message
Bryce Harrington (bryce) wrote :

Regarding the error message "xf86EnableIOPorts: failed to set IOPL", that is probably a very strong clue. This error message occurs in ./hw/xfree86/os-support/linux/lnx_video.c in function xf86EnableIO(), line 566 due to a failure in this call:

        if (ioperm(0, 1024, 1) || iopl(3)) { ...

That's a pretty low level call... almost makes me wonder if it's a hardware issue?

Fwiw, *sometimes* high X resource loads can just be due to weird X client apps (like a panel applet you might have installed from somewhere). To rule out this possibility, could you burn and boot an Intrepid Alpha-4 LiveCD? If you can reproduce the issue there, it'll strengthen the case that this may be a hardware or kernel issue. If you can't, then we may want to look more closely at the software.

Changed in xserver-xorg-video-ati:
status: New → Incomplete
status: Incomplete → New
status: New → Incomplete
Revision history for this message
Marty (marty-supine) wrote :

Hi Bryce

"xf86EnableIOPorts: failed to set IOPL" only occurs if I try 'startx' as a non-root user, so it's probably a permissions issue.

I've burnt a LiveCD and am testing it now. The first boot seemed to freeze at the desktop, panels still blank. The mouse cursor could be moved around the screen but clicking did nothing and no keyboard input had any effect. The second boot got me to a working desktop but I've just gone to launch a terminal and it's frozen again, moving cursor but no other response.

Revision history for this message
Marty (marty-supine) wrote :

Ok, got it.

LiveCD Intrepid Alpha-4

Stracing Xorg
rt_sigreturn(0xe) = -1 EINTR (Interrupted system call)
ioctl(10, 0x40046457, 0x27d636c) = -1 EINTR (Interrupted system call)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe) = -1 EINTR (Interrupted system call)
ioctl(10, 0x40046457, 0x27d636c) = -1 EINTR (Interrupted system call)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe) = -1 EINTR (Interrupted system call)
ioctl(10, 0x40046457, 0x27d636c) = -1 EINTR (Interrupted system call)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe) = -1 EINTR (Interrupted system call)

root@ubuntu:~# ls -l /proc/6791/fd/10
lr-x------ 1 root root 64 2008-08-31 21:59 /proc/6791/fd/10 -> /dev/dri/card0

Revision history for this message
Marty (marty-supine) wrote :

Working my way through http://dri.freedesktop.org/wiki/DriTroubleshooting

'dmesg | grep drm' output has an error (attached) that I can't fathom, however Xorg.0.log claims "Direct rendering enabled" so it can't be too fatal.

The next two attachments are the standard output and standard error when running 'glxinfo'.

There are no more troubleshooting steps in that document. But running 'glxgears' freezes the system instantly, Xorg at 99% CPU. strace attaches to the Xorg process but then freezes itself.

Revision history for this message
Marty (marty-supine) wrote :
Revision history for this message
Marty (marty-supine) wrote :
Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati:
status: Incomplete → Triaged
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Marty,

Given that it sounds like it's DRI related, maybe a next step would be to experiment with different settings of AGPMode? This is a pretty common issue with the -ati driver.

In your /etc/X11/xorg.conf set AGPMode to various values like this:

Section "Device"
   ...
   Option "AGPMode" "2"
EndSection

Possible values include 1, 2, 4, 8. You can see what it's currently set to by looking in /var/log/Xorg.0.log. It's worthwhile to test all four values even once you find one that works. If this takes care of it for you, we may be able to establish a quirk to set it for your hardware combo, if you can provide the following data:

  * AGPMode value(s) that work
  * Make/Model of laptop or motherboard
  * Output of lspci -vvnn
  * Is the system all factory hardware, or have any parts been replaced?
  * Is there an AGP Mode in the system BIOS?
    - If so, is it set to the factory default?

For more details on this, please see the "ATI AGP Mode Quirk" section at https://wiki.ubuntu.com/X/Quirks

Bryce Harrington (bryce)
Changed in xserver-xorg-driver-ati:
status: New → Invalid
Revision history for this message
Marty (marty-supine) wrote :

Apologies for the delay in response. The card had been in a work PC and was swapped out for something more stable till I had time to revisit this.

The issue is no longer present with an up to date Intrepid install (only issue is occasional artefacts around the cursor), so I'll resolve this.

Changed in xserver-xorg-driver-ati:
status: Invalid → Fix Released
Changed in xserver-xorg-video-ati:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.