Bug 12934 - USB-device prevents "radeon" from freezing system
Summary: USB-device prevents "radeon" from freezing system
Status: RESOLVED NOTOURBUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: 7.3 (2007.09)
Hardware: x86 (IA32) Linux (All)
: medium critical
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 7117 14892 15795 20014 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-25 13:40 UTC by Alex Hofbauer
Modified: 2010-05-05 00:33 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
The log of a freeze (38.06 KB, text/plain)
2007-11-21 08:28 UTC, Alex Hofbauer
no flags Details
AGPMode 4 (40.57 KB, text/plain)
2007-12-20 09:29 UTC, Alex Hofbauer
no flags Details

Description Alex Hofbauer 2007-10-25 13:40:28 UTC
Hi!

Below you can see the configuration for my Travelmate 4000 on up-to-date Debian Sid on kernel 2.6.23.


I've been trying for a few weeks now and am finally desparate enough to file a bugreport on the following issue:

"Normally", which means at home, I use a Logitech mouse, connected using a USB-Receiver. "Everything" works as expected.

As soon as I would unplug the USB Reveiver and start X it freezes. I can't predict when exactly -  sometimes I can even log on in gdm, but soon after that it freezes. Strange thing is: I can still move my mouse (up to one minute), clicking and keyboard don't work at this point anymore, but in the end the system hangs completely - with even SysRq-Magic doing nothing at all.


I don't know where to start debugging, because I can't imagine why an attached Logitech receiver prevents X from freezeing. I chose Input/evdev because synaptics and mouse both use evdev - hope this is right.

Below relevant hal-device output is attached.

Thanks in advance for your help.



Section "ServerLayout"
	Identifier	"Layout0"
	Screen 0	"Notebook"
EndSection

Section "Extensions"
	Option		"Composite"			"1"
EndSection

Section "ServerFlags"
	Option		"AIGLX"				"1"
	Option		"Allow Open Mouse Fail"		"1"
EndSection

Section "Device"
	Identifier	"Mobility Radeon 9700"
	Driver		"radeon"
	BusID		"PCI:1:0:0"
	Option "GARTSize"		"64"
	Option "AGPFastWrite"		"0"
	Option "EnablePageFlip"		"1"
	Option "AGPMode"		"4"
	Option "AccelMethod"		"XAA"
	Option "DynamicClocks"		"1"
	Option "EnableDepthMoves"	"1"
	Option "TripleBuffer"		"1"
	Option "ColorTiling"		"1"
	Option "DMAForXv"		"1"
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"
	EndSubSection
EndSection

Section "InputDevice"
        Identifier      "Synaptics"
        Driver          "synaptics"
        Option          "CorePointer"
        Option          "Device"                "/dev/input/synaptics"
        Option          "Protocol"              "event"
        Option          "RightEdge"             "5200"
        Option          "BottomEdge"            "4800"
        Option          "TopEdge"               "0"
        Option          "FingerLow"             "25"
        Option          "FingerHigh"            "30"
        Option          "MaxTapTime"            "300"
        Option          "MaxTapMove"            "220"
        Option          "VertScrollDelta"       "70"
        Option          "HorizScrollDelta"      "70"
        Option          "MinSpeed"              "0.12"
        Option          "MaxSpeed"              "0.22"
        Option          "AccelFactor"           "0.0010"
        Option          "SHMConfig"             "on"
        Option          "LeftRightScrolling"    "on"
        Option          "UpDownScrolling"       "on"
        Option          "PalmDetect"            "on"
        Option          "Repeater"              "/dev/ps2mouse"
        Option          "FastTabs"              "on"
EndSection

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

Section "InputDevice"
	Identifier	"Notebook Keyboard"
	Driver		"evdev"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"evdev"
	Option		"XkbLayout"	"de"
EndSection


------------


25: udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input'
  linux.device_file = '/dev/input/event4'  (string)
  input.product = 'SynPS/2 Synaptics TouchPad'  (string)
  info.capabilities = { 'input', 'input.touchpad' } (string list)
  info.udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input'  (string)
  linux.subsystem = 'input'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port'  (string)
  info.product = 'SynPS/2 Synaptics TouchPad'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.sysfs_path = '/sys/devices/platform/i8042/serio4/input/input4/event4'  (string)
  info.category = 'input'  (string)
  input.physical_device = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port'  (string)
  input.device = '/dev/input/event4'  (string)
  info.parent = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port'  (string)

1: udi = '/org/freedesktop/Hal/devices/usb_device_46d_c510_noserial_if0_logicaldev_input'
  linux.device_file = '/dev/input/event5'  (string)
  input.product = 'Logitech USB Receiver'  (string)
  info.capabilities = { 'input', 'input.mouse' } (string list)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_46d_c510_noserial_if0_logicaldev_input'  (string)
  linux.subsystem = 'input'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_46d_c510_noserial_if0'  (string)
  info.product = 'Logitech USB Receiver'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0/input/input5/event5'  (string)
Comment 1 Alex Hofbauer 2007-11-19 23:33:09 UTC
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.
Comment 2 Michel Dänzer 2007-11-19 23:48:21 UTC
Does it also happen if you comment out all the options in the radeon driver Device section?
Comment 3 Alex Hofbauer 2007-11-20 00:14:10 UTC
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
Comment 4 Michel Dänzer 2007-11-21 05:37:58 UTC
Please attach the full Xorg.0.log file from a freeze. Does it happen if you disable the DRI?
Comment 5 Alex Hofbauer 2007-11-21 08:28:11 UTC
Created attachment 12670 [details]
The log of a freeze
Comment 6 Alex Hofbauer 2007-11-21 08:30:05 UTC
(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.
Comment 7 Michel Dänzer 2007-11-22 03:45:07 UTC
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.
Comment 8 Alex Hofbauer 2007-11-25 14:49:53 UTC
(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
---------------
Comment 9 Michel Dänzer 2007-12-14 15:56:46 UTC
The current Git driver defaults to 1x again for non-v3 AGP cards.
Comment 10 Alex Hofbauer 2007-12-16 03:48:17 UTC
(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.
Comment 11 Roland Scheidegger 2007-12-16 18:00:14 UTC
(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.
Comment 12 Alex Hofbauer 2007-12-20 09:28:27 UTC
(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.
Comment 13 Alex Hofbauer 2007-12-20 09:29:28 UTC
Created attachment 13253 [details]
AGPMode 4
Comment 14 Michel Dänzer 2007-12-20 09:43:23 UTC
(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.
Comment 15 Alex Hofbauer 2007-12-20 10:03:23 UTC
(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...
Comment 16 Alex Deucher 2008-05-07 03:02:18 UTC
*** Bug 15795 has been marked as a duplicate of this bug. ***
Comment 17 Michel Dänzer 2008-05-08 03:03:46 UTC
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.
Comment 18 Alex Deucher 2008-05-21 21:57:23 UTC
*** Bug 14892 has been marked as a duplicate of this bug. ***
Comment 19 Sebastien Valette 2008-06-07 07:02:49 UTC
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?

Comment 20 Alex Hofbauer 2008-06-08 02:09:24 UTC
(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.
Comment 21 michael 2008-09-04 11:50:21 UTC
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.
Comment 22 Alex Deucher 2008-12-03 00:35:12 UTC
looks like a kernel issue.
Comment 23 Alex Deucher 2008-12-23 08:19:34 UTC
*** Bug 7117 has been marked as a duplicate of this bug. ***
Comment 24 Laurent Bigonville 2010-05-05 00:33:29 UTC
*** Bug 20014 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.