How can I hard reset a USB device?

Posted by Cory on Ask Ubuntu See other posts from Ask Ubuntu or by Cory
Published on 2010-08-16T10:31:32Z Indexed on 2011/01/29 23:33 UTC
Read the original article Hit count: 358

Filed under:
|
|
|

I have a USB device (a modem) that is really finicky. Sometimes it works fine, but other times it refuses to connect. The only solution I have found to fix it once it gets into a bad state is to physically unplug the device and plug it back in. However, I don't always have physical access to the machine it is plugged in on, so I'm looking for a way to do this through the command line.

This post suggests running:

sudo modprobe -w -r usb_storage; sudo modprobe usb_storage

However I get an "unknown option -w" output. This slightly modified command:

sudo modprobe -r usb_storage

Fails with the message FATAL: Module usb_storage is in use. If I try to kill -9 the processes marked [usb-storage] before running they refuse to die (I think because they are deeply tied to the kernel).

Anyone know of a way to do this?

NOTE: I cross-posted this on superuser.com as I didn't know which was more appropriate. I will delete and/or link whichever one is answered first.

© Ask Ubuntu or respective owner

Related posts about 10.04

  • An increase to 3 Gig of RAM slows down Ubuntu 10.04 LTS

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I have Ubuntu 10.04 running from an external hard drive (installed on an enclosure) connected via USB port. Like a month or so ago, I increased RAM on my pc from 2 Gigs to 3 Gigs. This resulted on extremely long boot times and slow application loads. While I was understanding the nature of my problem… >>> More

  • Default /etc/apt/sources.list?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I need default source list for ubuntu 10.04. Can anybody help me? Here is Mine:--- Ubuntu supported packages deb http://archive.ubuntu.com/ubuntu/ lucid main restricted multiverse universe deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse deb http://archive… >>> More

  • SSH main process ended

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I have a running ubuntu server 10.04.1. When I tried to login to the server via ssh, I could not. Instead, I got connection refused error. I tried to ping the machine and I got reply! So, the clear reason is that SSH daemon is stopped. After reboot, I was able to login to my server via ssh. After… >>> More

  • PPA causing 404 error?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I need default source list for ubuntu 10.04. Can anybody help me? Here is Mine:--- Ubuntu supported packages deb http://archive.ubuntu.com/ubuntu/ lucid main restricted multiverse universe deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse deb http://archive… >>> More

  • Postgresql fails to start on Ubuntu 10.04.4 LTS

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I installed postgresql 9.2 from add-apt-repository ppa:pitti/postgresql using apt-get install postgresql-9.2 At the end of the install and every time I try to launch postgresql by using the following command /etc/init.d/postgresql start or service postgresql start I get this error: Error:… >>> More

Related posts about usb