Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-25-10, 05:20 PM   #13
zbiggy
Registered User
 
Join Date: Sep 2002
Posts: 623
Default Re: Geforce 8200 users, I need your help with finding usb hanging issue

Use acpi=noirq or noapic kernel boot parameters. This will fix the bug. However you will be limited to only one cpu. Another workaround is to use external PCI/PCI-E card with usb connectors. This way you are not limited to only one cpu and you do not have to use any kernel boot parameters.

Remember that only ohci usb controller is broken in all MCP7x chipsets (all mainboards with Geforce8xxx/9xxx nForce7xx) which means: avoid plugging in USB 1.1 devices to mainboard. Use external PCI-/PCI-E card with usb connectors. If you have USB 2.0 devices you can use them with mainboard usb connectors. USB 2.0 is fully working.

I discovered the bug which causes hang of usb 1.1 devices is inside mcp7x chipset at ohci usb controller. I found it has problem with level triggered interrupt. Probably after interrupt service routine the ohci usb controller forgets to lower the interrupt line. This way Linux tries to service interrupt when there is none to service - so keeps waiting instead of working so usb hangs.
Possibly one resistor is missing/broken inside or around chipset which is responsible for auto pulling up/down of interrupt line level after the interrupt is serviced by kernel.

I made home made patch for kernel 2.6.33.3 which increases usb stability by about 80% (still not perfect but much better). I sent it to Nvidia Linux driver team on 08/05/2010 20:12 with detailed description. No response. Two months ago I was talking with Nvidia people about this bug. They told me they will set up Geforce 8200 mainboard and usb 1.1 device to reproduce the bug. I was told next day I will receive response from Nvidia about their findings. Since that day more then 2 months passed and no response.

Nvidia left chipset business recently so I doubt they will do something. This bug may be fixable using kernel patch. I still work on my solution hoping will reach 100% stability some day.
zbiggy is offline   Reply With Quote
Old 05-25-10, 08:28 PM   #14
gradinaruvasile
Registered User
 
gradinaruvasile's Avatar
 
Join Date: May 2008
Posts: 199
Default Re: Geforce 8200 users, I need your help with finding usb hanging issue

Hm. I have a M3N78-VM with nvidia 8200 too. I used it with Ubuntu 9.04 (2.6.28 kernel i think), 9.10 (2.6.31) and now with Debian Squeeze (2.6.32).
The 2.6.28/31 Ubuntu 9.04/9.10 kernel had a problem - on resuming i had to plug out and back in the USB keyboard i have. Other than that resuming worked fine.

With Debian i did not have this issue, i had another weirdness: I could suspend once per session - a second suspend suspended the comp, but instantly wake it up - but this behaviour gone away after installing the 195.36.24 drivers or some xorg/power management upgrades that came at the same time - so i am not sure about this.

Now it works just peechy (now i use the 256.25 drivers) - suspend/resume, VDPAU also works perfectly well. I have a USB keyboard+mouse and a USB webcam connected - never experienced problems except those i mentioned, but those are gone.
I have Athlon 3200+ single core processor, 2x1GB RAM, 3 HDDs +DVD/RW (1xIDE HDD, IDE DVD/RW, 2x SATA HDDs).
So, it very well be a distribution-specific bug (distros have different patches to their kernels) or caused by a certain USB device under specific conditions.
BTW i use 32-bit Debian.
gradinaruvasile is offline   Reply With Quote
Old 05-26-10, 01:42 PM   #15
zbiggy
Registered User
 
Join Date: Sep 2002
Posts: 623
Default Re: Geforce 8200 users, I need your help with finding usb hanging issue

@gradinaruvasile you do not understand the problem. The usb hanging problem is with full speed usb 1.1 devices only (adsl modem (2 different devices), irda dongle, usb radio, usb audio card etc. Keyboard and mouse are usb 1.1 low speed devices - works great for everybody. Your webcam is usb 2.0 device - works great for everybody. That is why you will never see the problem. If you want to see the problem disable in bios setup usb 2.0 device and start using your web camera.
It will hang in few minutes time. The problem is reproducible on any distro 32/64bit: ubuntu,rhel,fedora,suse,mandrake,lunar. Lunar has no custom patches and uses official kernel. The bug exist in pure text mode so nvidia driver has nothing common with it .

The bug appears in usb stress moments like opening many tabs or checking many rss channels at once in case of usb adsl modem. Or copying many little files to/from usb drive. Or using irda usb dongle to sync your mobile. Another example is usb audio card/radio card with hi speed continuous audio stream.

Summary:
usb 1.1 low speed devices - always ok.
usb 1.1 full speed devices - always hangs after short stress use time < 10 minutes.
usb 2.0 any device - always ok.
zbiggy is offline   Reply With Quote
Old 07-01-10, 07:00 PM   #16
Krones
Registered User
 
Join Date: Jan 2009
Posts: 5
Default Re: Geforce 8200 users, I need your help with finding usb hanging issue

Hello,

I still have problems with USB on GF8200. Devices like pendrives work ok, but cellphones and cameras hang the USB system (can't be unmounted nor accessed, etc). I can't use the acpi=noirq option because my SATA HD won't start if I do so (also have to use pci=nomsi). I have a Phenom X3 Triple Core processor on a XFX GF8200 mobo and am running Debian on AMD64.

How can I fix that?

Thanks
Krones is offline   Reply With Quote
Old 07-02-10, 03:04 AM   #17
zbiggy
Registered User
 
Join Date: Sep 2002
Posts: 623
Default Re: Geforce 8200 users, I need your help with finding usb hanging issue

In my opinion there is hardware chipset bug at usb ohci silicon part in Nvidia MCP78S chipset (trade names: Geforce 8200, nForce 730a, probably all nforce7 family). Nvidia did not detect it at manufacturing time because they test chipsets only with windows which do not use hardware so efficiently like Linux. MCP78S ohci usb controller hiccups during transfer few times every 2 minutes. On Linux some of this hiccups hang usb. Windows is slower and dumber so only 1 second distortion can be heard when using usb 1.1 audio card and hang does not occur.

To fix this bug we have to make Linux slower and dumber like Windows when servicing usb ohci. I have done some initial work this way and I created patch which improves (but not fixes yet) usb on Geforce 8200. If you are able to compile kernel from sources I can send it here when I come back home (~15 hours counting since now).

On my machine usb hangs after few minutes of use. After applying patch after few hours or not at all if I will not overload usb with huge data transfers.
This makes working medium traffic devices (usb storages, adsl modems).
If you have problems with usb audio or movie camera the patch will not help because these devices put on usb continuous big transfer of data. Of course you can always try.
zbiggy is offline   Reply With Quote
Old 07-02-10, 11:09 AM   #18
Krones
Registered User
 
Join Date: Jan 2009
Posts: 5
Default Re: Geforce 8200 users, I need your help with finding usb hanging issue

Is there an official bug report on that? Maybe the kernel should provide a workaround for this specific chipset.
I don't get errors only when working with big data transfers. I have problems even with small data transfers - just a few kB are enough to kill it, and it won't go back till after a reboot. The error seems to be somewhat random: sometimes I can't even access some USB devices.

I'm using a USB-serial (FTDI) board to help me understand this problem. When plugged, it creates (correctly) /dev/ttyUSB0. Sometimes I can access it by echoing something directly to the device (echo 'text' >> /dev/ttyUSB0), and I can see the leds on the board blinking to signal the communication, which is all correct. Then eventually it stops working. Sometimes in a matter of minutes, sometimes I can't communicate with it at all. Any attempt to access the USB device after it has stopped (cat, echo, lsusb) hangs the terminal, and not even ctrl+c or a kill can stop the hanging command. When that happens, nothing is sent through the USB to the board.

That is as much as I know. I got mouse/keyboard on PS/2 to prevent them from hanging.

Thanks,
Krones
Krones is offline   Reply With Quote
Old 07-02-10, 05:59 PM   #19
zbiggy
Registered User
 
Join Date: Sep 2002
Posts: 623
Default [PATCH] Re: Geforce 8200 users, I need your help with finding usb hanging issue

My official bug report: https://bugzilla.kernel.org/show_bug.cgi?id=13405
Except my patch there is no any workaround. I have exactly the same bug as you.
I reported the bug to Nvidia and we had some information exchange about this bug.
I do not know if I'm allowed to talk about it so better ask someone from Nvidia Linux team about usb ohci hanging bug in MCP78S chipset. Maybe someone from Nvidia will say something here because this is growing problem as people upgrade their PCs to nForce 7xx family.

You will find my patch attached below.
It fixes:
+hang on usb plug in chance to avoid the bug: 99%
+hang during medium speed transfers (adsl usb modems, usb storages) 90% chance to avoid the bug
+hang during low speed transfers (usb keyboard and mouse) 98% chance to avoid the bug
It does not fixes:
-usb hang after few minutes of heavy and continuous usb traffic devices: usb 1.1 audio, movie cameras, usb radio.

This patch is experimental. Test it before use to make sure it does not break anything else.
Linux by default uses fasteoi interrupt handler. This patch switches to level interrupt handler to recreate windows behavior for interrupts. Slower but less hangs. I do not recommend using this patch. I use it since few months and except occasional hangs it works for me.

How to use the patch:
Patch kernel sources you have. I designed this patch for kernel 2.6.33.3 but it can be applied on 2.6.33.4 or any other 2.6 kernel with less or more modifications required. After patching, building and installing kernel add this option to kernel boot parameters: nofasteoiapic and reboot Linux.

How to see if the patch is active:
cat /proc/interrupts
If you see: IO-APIC-level patch is active.
If you see: IO-APIC-fasteoi or XT-PIC-XT it is not.


Recommended solution which workarounds the bug in 100%:
Buy and install external PCI/PCI-E card with usb ports. You can safely use mainboard usb connectors only for usb 2.0 devices. If you have usb 1.1 only devices - use connectors on PCI/PCI-E external usb card.
Attached Files
File Type: bz2 io_apic.patch.bz2 (1.1 KB, 60 views)
zbiggy is offline   Reply With Quote
Old 07-03-10, 02:53 PM   #20
mlord
Linux kernel hacker
 
Join Date: Feb 2009
Location: Ottawa, Canada
Posts: 173
Default Re: Geforce 8200 users, I need your help with finding usb hanging issue

Quote:
Originally Posted by Krones View Post
I'm using a USB-serial (FTDI) board to help me understand this problem. When plugged, it creates (correctly) /dev/ttyUSB0. Sometimes I can access it by echoing something directly to the device (echo 'text' >> /dev/ttyUSB0), and I can see the leds on the board blinking to signal the communication, which is all correct. Then eventually it stops working.
What does (1) dmesg (command) show after this?, and (2) what does /var/log/messages (or /var/log/kern.log or ...) show ?

Thanks
mlord is offline   Reply With Quote

Old 07-04-10, 05:48 AM   #21
zbiggy
Registered User
 
Join Date: Sep 2002
Posts: 623
Default Re: Geforce 8200 users, I need your help with finding usb hanging issue

When usb hang occurs there is always information that device timed out, that it is not responding.
zbiggy is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:49 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.