LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-06-2005, 10:03 AM   #1
nowatson
LQ Newbie
 
Registered: Sep 2005
Location: NI
Posts: 10

Rep: Reputation: 0
Lightbulb linux (FC4) freezes upon plugging in usb device


Hi,

The problem is that if I plug in a usb device at runtime the computer will freeze. This happens if I am in either the gnome GUI or in command line mode.

Problem can be reproduced using a number of usb devices including flash disks, digital cameras, web cams and mobile phone.

However if I have the USB device plugged in at boot time it is detected and can be used without any issue. For example the web cam can display pictures in gnomemeeting, extract pictures using gphoto2 on my digicam etc...

I am running kernal 2.6.11-1.1369_FC4.

My motherboard is a gigabyte GA-6VXC7-4X, with 384Mb RAM and intel PIII 700Mhz.

Code:
[root@aopen ~]# lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT82C693A/694x [Apollo PRO133x] (rev c4)
00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 22)
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 10)
00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 10)
00:07.4 SMBus: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 30)
00:0b.0 Ethernet controller: Accton Technology Corporation EN-1216 Ethernet Adapter (rev 11)
00:0d.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 08)
01:00.0 VGA compatible controller: nVidia Corporation NV15 [GeForce2 GTS/Pro] (rev a3)
Here is the lsusb output after a sucessful detection on bootup.

Code:
[root@aopen ~]# lsusb
Bus 001 Device 002: ID 0553:0202 STMicroelectronics Imaging Division (VLSI Visio n) Aiptek PenCam 1
Bus 001 Device 001: ID 0000:0000

And heres the appropriate sectiion from /var/log/messages stating it was detected

Code:
Sep  6 12:42:29 aopen kernel: USB Universal Host Controller Interface driver v2.2
Sep  6 12:42:29 aopen kernel: PCI: Found IRQ 11 for device 0000:00:07.2
Sep  6 12:42:29 aopen kernel: PCI: Sharing IRQ 11 with 0000:00:0b.0
Sep  6 12:42:29 aopen kernel: uhci_hcd 0000:00:07.2: UHCI Host Controller
Sep  6 12:42:29 aopen kernel: uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1
Sep  6 12:42:29 aopen kernel: uhci_hcd 0000:00:07.2: irq 11, io base 0x0000dc00
Sep  6 12:42:29 aopen kernel: hub 1-0:1.0: USB hub found
Sep  6 12:42:29 aopen kernel: hub 1-0:1.0: 2 ports detected
Sep  6 12:42:29 aopen kernel: usb 1-1: new full speed USB device using uhci_hcd and address 2
Sep  6 12:42:29 aopen kernel: eth0: Setting full-duplex based on MII#1 link partner capability of 45e1.
Sep  6 12:42:29 aopen kernel: NET: Registered protocol family 10
Sep  6 12:42:29 aopen kernel: Disabled Privacy Extensions on device c03e6820(lo)
Sep  6 12:42:29 aopen kernel: IPv6 over IPv4 tunneling driver
Sep  6 12:42:29 aopen kernel: Linux video capture interface: v1.00
Sep  6 12:42:30 aopen kernel: drivers/usb/media/stv680.c: [stv680_probe:1377] STV(i): STV0680 camera found.
Sep  6 12:42:30 aopen kernel: drivers/usb/media/stv680.c: [stv680_probe:1415] STV(i): registered new video device: video0
Sep  6 12:42:30 aopen kernel: usbcore: registered new driver stv680
Sep  6 12:42:30 aopen apmd[2584]: apmd 3.2.1 interfacing with apm driver 1.16ac and APM BIOS 1.2
Sep  6 12:42:30 aopen kernel: drivers/usb/media/stv680.c: [usb_stv680_init:1493] STV(i): usb camera driver version v0.25 registering
Sep  6 12:42:30 aopen kernel: drivers/usb/media/stv680.c: STV0680 USB Camera Driver v0.25

Here is the lsmod output

Code:
[root@aopen ~]# lsmod
Module                  Size  Used by
lp                     13001  0
autofs4                29253  2
rfcomm                 42333  0
l2cap                  30661  5 rfcomm
bluetooth              56133  4 rfcomm,l2cap
sunrpc                167813  1
ipt_REJECT              5569  1
ipt_state               1857  1
ip_conntrack           41497  1 ipt_state
iptable_filter          2881  1
ip_tables              19521  3 ipt_REJECT,ipt_state,iptable_filter
nvidia               3926908  12
stv680                 27469  0
videodev                9537  1 stv680
md5                     4033  1
ipv6                  268097  8
uhci_hcd               35152  0
parport_pc             28933  1
parport                40585  2 lp,parport_pc
i2c_viapro              8017  0
i2c_core               21569  1 i2c_viapro
snd_ens1371            31649  1
gameport               18633  1 snd_ens1371
snd_rawmidi            30305  1 snd_ens1371
snd_ac97_codec         75961  1 snd_ens1371
snd_seq_dummy           3653  0
snd_seq_oss            37057  0
snd_seq_midi_event      9153  1 snd_seq_oss
snd_seq                62289  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device          8781  4 snd_rawmidi,snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            51185  0
snd_mixer_oss          17857  2 snd_pcm_oss
snd_pcm               100169  3 snd_ens1371,snd_ac97_codec,snd_pcm_oss
snd_timer              33605  2 snd_seq,snd_pcm
snd                    57157  10 snd_ens1371,snd_rawmidi,snd_ac97_codec,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore              10913  2 snd
snd_page_alloc          9669  1 snd_pcm
tulip                  55393  0
floppy                 65269  0
dm_snapshot            17413  0
dm_zero                 2113  0
dm_mirror              26029  0
ext3                  132553  2
jbd                    86233  1 ext3
dm_mod                 58101  6 dm_snapshot,dm_zero,dm_mirror
Here is the /var/log/messages output as the device has been plugged in right before it freezes.

Code:
Sep  6 10:16:01 aopen kernel: usb 1-1: new full speed USB device using uhci_hcd and address 3
Sep  6 10:16:01 aopen kernel: drivers/usb/media/stv680.c: [stv680_probe:1377] STV(i): STV0680 camera found.
Sep  6 10:16:01 aopen kernel: drivers/usb/media/stv680.c: [stv680_probe:1415] STV(i): registered new video device: video0
So, has anyone any idea what could be causing this freeze. Or is there any way I can turn up the debug level on the kernal, and/or the hotplugging mechanism, to see what is happening.

All help is appreciated.

thanks,
 
Old 09-12-2005, 12:34 PM   #2
nowatson
LQ Newbie
 
Registered: Sep 2005
Location: NI
Posts: 10

Original Poster
Rep: Reputation: 0
I have got this problem resolved.

I believe it is a problem between the kernel and my motherboard.

To fix this I installed the 2.6.13.1 vanilla kernel and applied the following patch, and then compiled it.

This comes from the bugzilla pages of the main kernel archive, check out bug number 4944. The patch is attacted as Prevent UHCI auto-suspend. (Mabye someone can post the link, as I am not allowed to )

Code:
--- a/drivers/usb/host/uhci-hub.c       2005-07-08 16:40:09.000000000 -0400
+++ b/drivers/usb/host/uhci-hub.c       2005-07-29 16:31:06.000000000 -0400
@@ -40,6 +40,7 @@
 {
        int port;

+       return 1;
        for (port = 0; port < uhci->rh_numports; ++port) {
                if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) &
                                (USBPORTSC_CCS | RWC_BITS)) ||
 
Old 09-19-2005, 09:48 PM   #3
nowatson
LQ Newbie
 
Registered: Sep 2005
Location: NI
Posts: 10

Original Poster
Rep: Reputation: 0
Post

Some more information.

Setting acpi=force in the kernel command line seems to totally resolve the problem, as opposed to using the quick fix patch described above.

Still not really sure what is actually causing the freezes, just how to prevent them.
 
Old 09-20-2005, 03:58 AM   #4
vick
LQ Newbie
 
Registered: Sep 2005
Location: Romania
Distribution: Fedora Core 6
Posts: 8

Rep: Reputation: 0
Hello nowatson,
I have experienced the same freezing problem on Red Hat 8.0, but when I unplug the usb drive...
Since I can't upgrade my kernel (licensed software compatibility problems), I think a good solution to the problem might be to work on the acpi settings, considering that when I want to shut down the system I eventually have to press the power button to do that.
Tell me please where do I find these acpi settings. Thanks.
 
Old 09-20-2005, 07:48 AM   #5
nowatson
LQ Newbie
 
Registered: Sep 2005
Location: NI
Posts: 10

Original Poster
Rep: Reputation: 0
Reboot your machine. If you are using grub bootloader, interrupt it before it loads a kernel. Select your kernel and press e to edit. Select the line that looks a *bit* like this

kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=/dev/VolGroup00/LogVol00

Hit e to edit this line and add "acpi=force" to the end so it will look like this, leaving the rest of the line intact.

kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=/dev/VolGroup00/LogVol00 acpiforce


Hit b to boot with the additional parameter.

If your ACPI is enabled by default then this will not make any difference, as all it does is force ACPI on. The reason I need this is because my motherboard was designed in 2000, and the cut off point set in my FC4 kernel for having for having a ACPI support is 2001.
 
Old 09-21-2005, 07:32 AM   #6
vick
LQ Newbie
 
Registered: Sep 2005
Location: Romania
Distribution: Fedora Core 6
Posts: 8

Rep: Reputation: 0
Doesn't work..., thanks anyway.
 
Old 09-21-2005, 10:11 AM   #7
nowatson
LQ Newbie
 
Registered: Sep 2005
Location: NI
Posts: 10

Original Poster
Rep: Reputation: 0
On my machine freezes only occured when I insert the first USB device. If I already had USB devices plugged in from boot time I could happily insert and remove without problem them, as long as 1 device was plugged into the hub at all times.

How many USB ports have you got? Does the freeze occur on all of them?

Have 2 devices plugged in, and try and remove one of them and see if it freezes. Im am assuming here that it is both your keyboard and mouse that are freezing. I have seen reports that sometimes USB mice may stop working when things are plugged into the USB ports.
 
Old 09-22-2005, 04:49 AM   #8
vick
LQ Newbie
 
Registered: Sep 2005
Location: Romania
Distribution: Fedora Core 6
Posts: 8

Rep: Reputation: 0
OK. Let's see. For starting, the problem occurs on a Red Hat 8.0 system, with a 2.4.18-14bigmem kernel and six usb ports. I tried enabling only 2 or 4 ports, but the problem persists.
As I said, the problem is that after I use "happily" my mounted usb memory and unmount it, all is well until I actually unplug it from the usb port. After that, my entire system freezes, not only (non usb) mouse&keyboard, and my floppy led remains lit.
I tried some combinations with a borrowed usb mouse and there was no problem plugging/unplugging it while the system works (with or without the usb memory). On the other hand the unplugging of the usb memory still crashes it. If this is a plug&play device why can't it be an unplug&be happy device as well???
This and the lit floppy led makes me think that the problem derives more probably from the system not being able to properly unmount the device. I mention that I tried unmounting it both by right-click on its desktop icon and by umount command in console; after these operations it is being reported as unmounted and I can no longer access it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mandrake 10.0 freezes with any USB device Liopia Mandriva 3 09-23-2004 02:24 PM
plugging a usb device hangs redhat9/nforce mobo raghugs Red Hat 0 06-28-2004 02:51 AM
SuSE 9.1 freezes when plugging in USB devices lorenzo123 Linux - Hardware 1 05-27-2004 09:24 AM
Plugging in USB devices freezes RH 7.3 jrapczak Linux - Hardware 1 10-28-2003 05:25 PM
Plugging USB device pabdom Linux - Hardware 4 08-30-2003 05:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration