Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

what is sitting on USB device?

344 views
Skip to first unread message

Mark Copper

unread,
Oct 23, 2018, 12:10:04 PM10/23/18
to
Trying to connect to a device, I get this error message:

*** Error ***
An error occurred in the io-library ('Could not claim the USB
device'): Could not claim interface 0 (Device or resource busy). Make
sure no other program (gvfs-gphoto2-volume-monitor) or kernel module
(such as sdc2xx, stv680, spca50x) is using the device and you have
read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***

On general Linux principles, how does one go about what is keeping the
device busy? How does one distinguish between "busy" and a permissions
problem?

I can see that the system detects the device by, say, lsusb:
bus 001 device 007 ... Nikon

I haven't got anywhere with "lsof", but that at that point the
specifics of this system may come into play (Debian 9 installed as a
Crouton target on a chromebook).

Any suggestions off-hand?

Thanks.

to...@tuxteam.de

unread,
Oct 23, 2018, 12:20:05 PM10/23/18
to
On Tue, Oct 23, 2018 at 11:03:05AM -0500, Mark Copper wrote:
> Trying to connect to a device, I get this error message:

What are you trying to do while this error show up? How does it
show up (e.g. desktop pop up, some log file...)?

> *** Error ***
> An error occurred in the io-library ('Could not claim the USB
> device'): Could not claim interface 0 (Device or resource busy). Make
> sure no other program (gvfs-gphoto2-volume-monitor) or kernel module
> (such as sdc2xx, stv680, spca50x) is using the device and you have
> read/write access to the device.
> *** Error (-53: 'Could not claim the USB device') ***

Things to try:

- Issue (on a terminal, as root or sudo) "dmesg | tail", a short while
after having inserted the USB device.
- If the USB device poses as a storage device, issue "mount", to check
whether something on your box (your DE, perhaps) has mounted the
file system.
- Look in /var/log/messages and/or /var/log/syslog (or however these
things are called, should your init system be systemd: I'm not
qualified for that, others will chime in, I guess).
Note that USB devices can pose as different things "at the same
time".

HTH
-- tomás
signature.asc

Curt

unread,
Oct 23, 2018, 12:30:06 PM10/23/18
to
On 2018-10-23, Mark Copper <mco...@straitcity.com> wrote:
> Trying to connect to a device, I get this error message:
>
> *** Error ***
> An error occurred in the io-library ('Could not claim the USB
> device'): Could not claim interface 0 (Device or resource busy). Make
> sure no other program (gvfs-gphoto2-volume-monitor) or kernel module
> (such as sdc2xx, stv680, spca50x) is using the device and you have
> read/write access to the device.
> *** Error (-53: 'Could not claim the USB device') ***
>
> On general Linux principles, how does one go about what is keeping the
> device busy? How does one distinguish between "busy" and a permissions
> problem?

On the internets I glanced at a forum thread where someone opined that
'gvfs-gphoto2-volume-monitor' might get in the way of camera-like
thingamajiggers:

ps aux | grep gphoto

to see whether this theory is viable or not (and if it is, you know, close or stop
or kill that gvfs puppy maybe).


> I can see that the system detects the device by, say, lsusb:
> bus 001 device 007 ... Nikon
>
> I haven't got anywhere with "lsof", but that at that point the
> specifics of this system may come into play (Debian 9 installed as a
> Crouton target on a chromebook).
>
> Any suggestions off-hand?
>
> Thanks.
>
>


--
"Now she understood that Anna could not have been in lilac, and that her charm
was just that she always stood out against her attire, that her dress could
never be noticeable on her." Leo Tolstoy, Anna Karenina

Mark Copper

unread,
Oct 23, 2018, 12:40:05 PM10/23/18
to
The error is generated in response to this command:

$gphoto2 --summary

The camera is recognized properly in dmesg. But it might be relevant
that the Chrome OS sees it as a storage device, and it's important not
to treat the camera as a storage device if one wants to use the
computer to control the camera. However, I cannot see that the device
is actually mounted. (the output of "mount" has become so complicated
these days...)

I don't see either messages or syslog under the chroot.

Mark Copper

unread,
Oct 23, 2018, 12:50:04 PM10/23/18
to
On Tue, Oct 23, 2018 at 11:28 AM Curt <cu...@free.fr> wrote:
>
> On 2018-10-23, Mark Copper <mco...@straitcity.com> wrote:
> > Trying to connect to a device, I get this error message:
> >
> > *** Error ***
> > An error occurred in the io-library ('Could not claim the USB
> > device'): Could not claim interface 0 (Device or resource busy). Make
> > sure no other program (gvfs-gphoto2-volume-monitor) or kernel module
> > (such as sdc2xx, stv680, spca50x) is using the device and you have
> > read/write access to the device.
> > *** Error (-53: 'Could not claim the USB device') ***
> >
> > On general Linux principles, how does one go about what is keeping the
> > device busy? How does one distinguish between "busy" and a permissions
> > problem?
>
> On the internets I glanced at a forum thread where someone opined that
> 'gvfs-gphoto2-volume-monitor' might get in the way of camera-like
> thingamajiggers:
>
> ps aux | grep gphoto
>
> to see whether this theory is viable or not (and if it is, you know, close or stop
> or kill that gvfs puppy maybe).

yes, there is a gnome environment variable that can stifle the gvfs
monitors and I have done that. Nor do I see any trace of the modules
mentioned in the error message.

so I thought I'd try to go back to first principles and ask how one
might discover what is already using the device.

Cindy-Sue Causey

unread,
Oct 23, 2018, 12:50:05 PM10/23/18
to
You made me choke on my coffee from laughing.. and the coffee's not
even done perking yet. :D

On a whim, I tried "mount | grep sdb3" > IT WORKS!!

Grep's turning out to be handy that way in a lot of cases that don't
always immediately come to mind. In that line above, grep returned one
line that properly reported how my /dev/sdb3 partition is currently
mounted.

Cindy :)
--
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *

Curt

unread,
Oct 23, 2018, 2:00:05 PM10/23/18
to
On 2018-10-23, Mark Copper <mco...@straitcity.com> wrote:
>
> yes, there is a gnome environment variable that can stifle the gvfs
> monitors and I have done that. Nor do I see any trace of the modules
> mentioned in the error message.

I didn't know that you had done that.

> so I thought I'd try to go back to first principles and ask how one
> might discover what is already using the device.
>
>

If 'mount' is too confused, you might try 'lsblk'.

Patrick Bartek

unread,
Oct 24, 2018, 11:00:05 AM10/24/18
to
Use a usb card reader.

Linux has always had problems directly reading cameras. Most times a
driver that comes on the camera's software CD needs to be installed. A
driver that does not exist for Linux.

I've shot professionally for years with various makes and models of
digital cameras, Nikon included, and have never had a problem with
mounting/reading the camera's card when using a dedicated card
reader. I only mount a camera when it's required like changing some
custom settings, etc.

B

Mark Copper

unread,
Oct 25, 2018, 12:20:04 PM10/25/18
to
I haven't sorted all this out, but here are a couple things, probably
not said correctly:

Using MTP, "media transfer protocol", to access the camera, Chromium
OS never actually mounts the external device on the file system.

On boot Chromium OS launches an MTP daemon which claims the camera
when plugged in. By disabling this daemon, gphoto2 in Debian inside
Crouton chroot can access the camera. Whew!
0 new messages