Stuck in an infinite loop when no usb devices connected

Bug #301937 reported by Laurent Bigonville
4
Affects Status Importance Assigned to Milestone
X.Org X server
Won't Fix
Critical
xorg-server (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: xserver-xorg-core

Maybe same bug as #276518, but I was asked to open a new bug because the causes seems different

Hi,

If I unplug my usb mouse from my laptop when using the radeon driver I get X server lockup.

Please see attached backtrace created using xorg-edgers ppa package.

Backtrace:
0: /usr/X11R6/bin/X(xorg_backtrace+0x3b) [0x813165b]
1: /usr/X11R6/bin/X(mieqEnqueue+0x289) [0x8110c39]
2: /usr/X11R6/bin/X(xf86PostMotionEventP+0xc2) [0x80daea2]
3: /usr/X11R6/bin/X(xf86PostMotionEvent+0x68) [0x80db008]
4: /usr/lib/xorg/modules/input//synaptics_drv.so [0xb79cc426]
5: /usr/lib/xorg/modules/input//synaptics_drv.so [0xb79ceae9]
6: /usr/X11R6/bin/X [0x80c37b7]
7: /usr/X11R6/bin/X [0x80b32bc]
8: [0xb7ee4400]
9: /usr/lib/libdrm.so.2(drmCommandNone+0x2a) [0xb79b932a]
10: /usr/lib/xorg/modules/drivers//radeon_drv.so [0xb7955fc4]
11: /usr/lib/xorg/modules//libxaa.so(XAAComposite+0x358) [0xb7747288]
12: /usr/lib/xorg/modules//libxaa.so [0xb77644a1]
13: /usr/X11R6/bin/X [0x8177aea]
14: /usr/X11R6/bin/X(CompositePicture+0x19a) [0x816057a]
15: /usr/X11R6/bin/X [0x8166445]
16: /usr/X11R6/bin/X [0x8163165]
17: /usr/X11R6/bin/X(Dispatch+0x34f) [0x808c8ef]
18: /usr/X11R6/bin/X(main+0x47d) [0x8071d6d]
19: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7af9775]
20: /usr/X11R6/bin/X [0x8071151]

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller [8086:3580] (rev 02)
     Subsystem: Acer Incorporated [ALI] Device [1025:0051]
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10] [1002:4e50]
     Subsystem: Acer Incorporated [ALI] Device [1025:0051]

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

Short update.

I recently installed ATIs completely unstable alpha release "8.42.3" for various reasons (in fact I believed the "supports AIGLX" slogan). Besides the fact that it crashes lots of times - because of not supporting xserver 7.3, I guess - it did one magical thing to my system: It solved the bug mentioned above.

I just checked a few times because I could not believe it. Unplugged the USB-receiver, used r300 os driver - system freezes after 2 minutes. Restarted, receiver plugged, no freeze.

Then I changed the driver to "fglrx" and could not make it freeze at all (trying several days now).

I hope assigning this bug to Driver/Radeon makes sense in this case.
Please, tell me what to do to help you resolving this issue.

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

Does it also happen if you comment out all the options in the radeon driver Device section?

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

Yes, checked 2 times now.

Here's the xorg.conf that freezes the system:

Section "ServerLayout"
 Identifier "Layout0"
 Screen 0 "Notebook" 0 0
 InputDevice "Synaptics"
 InputDevice "Logitech"
EndSection

Section "Extensions"
 Option "Composite" "0"
EndSection

Section "ServerFlags"
 Option "AIGLX" "0"
 Option "Allow Open Mouse Fail" "1"
 Option "AllowEmptyInput" "1"
 Option "IgnoreABI" "0"
EndSection

Section "Device"
 Identifier "Mobility Radeon 9700"
 Driver "radeon"
 BusID "PCI:1:0:0"
EndSection

Section "Monitor"
 Identifier "LCD"
 Option "DPMS" "1"
 Gamma 0.90
EndSection

Section "Screen"
 Identifier "Notebook"
 Device "Mobility Radeon 9700"
 Monitor "LCD"
 DefaultDepth 24
 SubSection "Display"
  Depth 24
  Modes "1024x768" "1280x1024"
 EndSubSection
EndSection

Section "InputDevice"
        Identifier "Synaptics"
        Driver "synaptics"
        Option "CorePointer"
        Option "Device" "/dev/input/synaptics"
        Option "Protocol" "event"
        [...]
EndSection

Section "InputDevice"
 Identifier "Logitech"
 Driver "evdev"
 Option "Device" "/dev/input/cclick"
 Option "SendCoreEvents"
 Option "HWHEELRelativeAxisButtons" "7 6"
EndSection

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

Please attach the full Xorg.0.log file from a freeze. Does it happen if you disable the DRI?

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

Created an attachment (id=12670)
The log of a freeze

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

(In reply to comment #4)
> Please attach the full Xorg.0.log file from a freeze. Does it happen if you
> disable the DRI?
>

No, surprisingly it doesn't with »Option "DRI" "0"« in the device section.

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

Does Option "AGPMode" "1" (or "2") make a difference? If not, it could be IRQ related, please attach /proc/interrupts from while the X server is running before the freeze.

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

(In reply to comment #7)
> Does Option "AGPMode" "1"...
No, unlike "AGPMode" "2", "1" does not freeze the system. Again, with USB-Receiver it stays stable.

Anyway here's /proc/interrupts before manually entering runlevel 5:
---------------
           CPU0
  0: 29205 XT-PIC-XT timer
  1: 800 XT-PIC-XT i8042
  2: 0 XT-PIC-XT cascade
  6: 0 XT-PIC-XT uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3, eth
  9: 96883 XT-PIC-XT acpi
 10: 23709 XT-PIC-XT ehci_hcd:usb4, firewire_ohci, ipw2200, Intel 82801DB-ICH4
 12: 132 XT-PIC-XT i8042
 14: 3070 XT-PIC-XT ide0
 15: 2774 XT-PIC-XT ide1
NMI: 0
ERR: 0
---------------

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

The current Git driver defaults to 1x again for non-v3 AGP cards.

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

(In reply to comment #9)
> The current Git driver defaults to 1x again for non-v3 AGP cards.
>

Sorry, I didn't get the point. Is that a solution to my problem? As far as I know, "Radeon Mobility 9600(9700)" is a V2 device. And, there is still the oddity, that AGPMode 2 doesn't make my system freeze.

Again: Sorry, if I misunderstood something.

Revision history for this message
In , Sroland-vmware (sroland-vmware) wrote :

(In reply to comment #10)
> (In reply to comment #9)
> > The current Git driver defaults to 1x again for non-v3 AGP cards.
> >
>
> Sorry, I didn't get the point. Is that a solution to my problem? As far as I
> know, "Radeon Mobility 9600(9700)" is a V2 device. And, there is still the
> oddity, that AGPMode 2 doesn't make my system freeze.
There are 3 AGP versions: V1 (3.3V signaling, 1x, 2x data rates), V2 (1.5V signaling, 1x, 2x, 4x rates), V3 (some difference in signaling to V2, but in contrast to V1 cards physically keyed the same as V2 cards, 4x, 8x rates).
You can't switch the AGP version after bootup, but you can change the rate. The moibility 9600 is a v3 device, but your chipset is v2 so the chip operates in v2 mode. So yes defaulting to 1x rate (which is all what AGPmode does) should fix your problem.

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

(In reply to comment #11)
So yes defaulting to 1x rate (which is all what AGPmode does) should
> fix your problem.

Unfortunately it does not fix my problem in any way. The chip and mainboard should and do support agp 4x as far as I know and did so in the past. As you can see above, not using "AGPMode 4" freezes the system within several minutes at best.

BUT, I can use AGPx4 with not even one stability issue using the already too many times mentioned USB-Receiver (consider the Device-section removed from xorg.conf). I did "stress" tests and the system is still up and running. The fun part is, if I remove the receiver the screen goes blank immediately and system is gone.

So my conclusion is that not even calling the new default behaviour a workaround really helps me.

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

Created an attachment (id=13253)
AGPMode 4

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

(In reply to comment #12)
> The chip and mainboard should and do support agp 4x as far as I know and did
> so in the past.

Unfortunately, AGP is such a black art that the only thing we can hope for is to find a default configuration that works everywhere or at least on as many systems as possible. The evidence so far seems pretty clear that 1x is most stable on setups that support it. (Also, FWIW, you'll probably have a hard time measuring any significant performance differences at higher rates)

> As you can see above, not using "AGPMode 4" freezes the system within several
> minutes at best.

Now I'm confused - I took comment #8 to mean that Option "AGPMode" "1" makes it stable under all circumstances. If that's not the case, please elaborate.

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

(In reply to comment #14)
> Unfortunately, AGP is such a black art
I already got such an impression. ;-)

> Now I'm confused - I took comment #8 to mean that Option "AGPMode" "1" makes it
> stable under all circumstances. If that's not the case, please elaborate.

That was some kind of Freudian slip. Indeed "AGPMode 1" makes the system very
unstable in only one condition: 3d, meaning that using compiz (which I didn't
want to notice here because it should be considered an extra, not a must-have)
only works for about 2 to 2 minutes. Please ignore the "not" nevertheless.

With my current configuration, "AGPMode 4", I'm running compiz for some time
now.

I could live with the current situation and having to check if the USB-Receiver
is plugged does not really make a notebook unusable. Anyways, I just can't live
with tha fact, that one simple USB device influences AGP in such a way...

Revision history for this message
In , agd5f (agd5f) wrote :

*** Bug 15795 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

According to http://bugs.freedesktop.org/show_bug.cgi?id=15795#c7 this could be related to some change between Linux 2.6.22 and 2.6.23. Looking at the DRM changes between them, nothing jumps out as being likely related. It could be helpful to bisect the kernel commit triggering the change in behaviour.

Revision history for this message
In , agd5f (agd5f) wrote :

*** Bug 14892 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Sébastien Valette (sebastien-valette) wrote :

OK, just a small reference to:
http://ubuntuforums.org/showpost.php?p=4963984&postcount=24

in my case, booting the kernel with options:
nohz=off irqpoll

seems to solve the issue (I don't need AGP parameter in xorg.conf nor USB mouse anymore)

These options solve my freeze problems for both radeon and fglrx drivers. Maybe this helps?

Revision history for this message
In , AlexHofbauer (alex-derhofbauer) wrote :

(In reply to comment #19)
> nohz=off irqpoll

First option stops the touchpad from working properly, but the second one does the trick. After running X in AGP mode 4 for half an hour I can say that "irqpoll" definitely is a workaround.

But (as always?) there is a caveat:
I can attach a USB mouse but when I remove the receiver the system freezes immediately.

Revision history for this message
In , sid (miste78) wrote :

I have the same problem.

Just updated to xorg-server-1.4.99.906 and xf86-video-ati-6.9.0 but Xserver still freezes without usb-mouse plugged in. I'm using kernel-2.6.26.3 with ArchLinux patches.

Booting the kernel with nohz=off or disabling DRI in xorg.conf solve it for me.

Revision history for this message
Laurent Bigonville (bigon) wrote : Stuck in an infinite loop when removing usb mouse

Binary package hint: xserver-xorg-core

Maybe same bug as #276518, but I was asked to open a new bug because the causes seems different

Hi,

If I unplug my usb mouse from my laptop when using the radeon driver I get X server lockup.

Please see attached backtrace created using xorg-edgers ppa package.

Revision history for this message
Laurent Bigonville (bigon) wrote :

I use ubuntu intrepid on i386

Revision history for this message
Laurent Bigonville (bigon) wrote :
Revision history for this message
Laurent Bigonville (bigon) wrote :
Revision history for this message
In , agd5f (agd5f) wrote :

looks like a kernel issue.

Revision history for this message
Laurent Bigonville (bigon) wrote : Re: Stuck in an infinite loop when removing usb mouse

Same issue with jaunty

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Laurent,

Please collect a full backtrace on this issue - see http://wiki.ubuntu.com/X/Backtracing for directions.

description: updated
Changed in xorg-server:
status: New → Incomplete
Revision history for this message
In , agd5f (agd5f) wrote :

*** Bug 7117 has been marked as a duplicate of this bug. ***

Revision history for this message
Laurent Bigonville (bigon) wrote : Re: Stuck in an infinite loop when removing usb mouse

Here the backtrace (which looks different)

Revision history for this message
Laurent Bigonville (bigon) wrote :

Actually the issue doesn't happen if there is at least one usb device connected (external HD, bluetooth dongle..) This is quite confusing

Revision history for this message
Laurent Bigonville (bigon) wrote :

Here another backtrace with the radeon driver comming from debian experimental (1:6.9.0.91-1)

Revision history for this message
Laurent Bigonville (bigon) wrote :

NoAccel = yes workaround the issue

libdrm2 (2.4.1-0ubuntu8)
mesa (7.2+git20081209.a0d5c3cf-0ubuntu4)
xserver-xorg (1:7.4~5ubuntu9)
xserver-xorg-video-radeon (1:6.9.0.91-1)

Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automated message]

Hi bigon,

Please attach the output of `lspci -vvnn` too.

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

This is sort of feeling more like an xserver error than a radeon issue in general, I'm dropping the -ati task for now.

Changed in xserver-xorg-video-ati:
status: Incomplete → Confirmed
status: Confirmed → Invalid
Changed in xorg-server:
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Laurent Bigonville (bigon) wrote :

Well actually, the problem doesn't seem to happen when using vesa driver instead of radeon

Changed in xorg-server:
status: Unknown → Confirmed
Bryce Harrington (bryce)
description: updated
Revision history for this message
Sergio Callegari (callegar) wrote :

Hi,

same issue here on a PC with AMD Athlon and Intrepid 32 bit, Radeon 9600XT and radeon driver.

Screen freezes, only the mouse cursor moves. Keyboard is dead.

System is alive, though. Only X is locked up.

Ssh-ing from another host I can see the Xlog. It mentions "out of order events" and Xorg having probably entered an infinite loop.
Message is repeated many many times.

Xorg only terminates with a hard kill signal (term is not enough).
As it is restarted everything looks fine.

I am experiencing this both with XAA and EXA.
I was not experiencing any problem with the fglrx driver (apart from the fact that support for my card is now being dropped).

Seems to have nothing to do with unplugging or plugging the mouse (at least it happens even leaving it nicely in place).

Seems to affect also REDHAT:
https://bugzilla.redhat.com/show_bug.cgi?id=472634
And Mandriva
http://wiki.mandriva.com/en/2009.0_Errata#Periodic_freeze_of_the_graphical_system
https://qa.mandriva.com/show_bug.cgi?id=42833

Very nasty bug, as _you loose all what you were doing when killing Xorg_.

Bryce Harrington (bryce)
tags: added: edgers
Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automatic notification.]

Hi Laurent,

This bug was reported against an earlier version of Ubuntu, can you
test if it still occurs on Lucid?

Please note we also provide technical support for older versions of
Ubuntu, but not in the bug tracker. Instead, to raise the issue through
normal support channels, please see:

    http://www.ubuntu.com/support

If you are the original reporter and can still reproduce the issue on
Lucid, please run the following command to refresh the report:

  apport-collect 301937

If you are not the original reporter, please file a new bug report, so
we can work with you as the original reporter instead (you can reference
bug 301937 in your report if you think it may be related):

  ubuntu-bug xorg

If by chance you can no longer reproduce the issue on Lucid or if you
feel it is no longer relevant, please mark the bug report 'Fix Released'
or 'Invalid' as appropriate, at the following URL:

  https://bugs.launchpad.net/ubuntu/+bug/301937

Changed in xorg-server (Ubuntu):
status: Confirmed → Incomplete
tags: added: needs-retested-on-lucid-by-june
Revision history for this message
In , Laurent Bigonville (bigon) wrote :

*** Bug 20014 has been marked as a duplicate of this bug. ***

Revision history for this message
Laurent Bigonville (bigon) wrote :

Well I'm not using the laptop that was impacted by this bug.

A workaround could be

highres=off nohz=off irqpoll

(see: http://ubuntuforums.org/showpost.php?p=4963984&postcount=24)

Bryce Harrington (bryce)
tags: added: hardy
Bryce Harrington (bryce)
tags: added: intrepid
Changed in xorg-server:
importance: Unknown → Critical
status: Confirmed → Won't Fix
Changed in xorg-server:
importance: Critical → Unknown
Changed in xorg-server:
importance: Unknown → Critical
Bryce Harrington (bryce)
Changed in xorg-server (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Laurent Bigonville, this bug report is being closed due to your last comment https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/301937/comments/41 regarding you are no longer using the original hardware. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

no longer affects: xserver-xorg-video-ati (Ubuntu)
tags: removed: needs-retested-on-lucid-by-june
Changed in xorg-server (Ubuntu):
status: Confirmed → Invalid
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.