Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #201555 > unrolled thread

what is sitting on USB device?

Started byMark Copper <mcopper@straitcity.com>
First post2018-10-23 18:10 +0200
Last post2018-10-24 17:00 +0200
Articles 9 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  what is sitting on USB device? Mark Copper <mcopper@straitcity.com> - 2018-10-23 18:10 +0200
    Re: what is sitting on USB device? <tomas@tuxteam.de> - 2018-10-23 18:20 +0200
      Re: what is sitting on USB device? Mark Copper <mcopper@straitcity.com> - 2018-10-23 18:40 +0200
        Re: what is sitting on USB device? Cindy-Sue Causey <butterflybytes@gmail.com> - 2018-10-23 18:50 +0200
    Re: what is sitting on USB device? Curt <curty@free.fr> - 2018-10-23 18:30 +0200
      Re: what is sitting on USB device? Mark Copper <mcopper@straitcity.com> - 2018-10-23 18:50 +0200
        Re: what is sitting on USB device? Curt <curty@free.fr> - 2018-10-23 20:00 +0200
          Re: what is sitting on USB device? Mark Copper <mcopper@straitcity.com> - 2018-10-25 18:20 +0200
    Re: what is sitting on USB device? Patrick Bartek <nemommxiv@gmail.com> - 2018-10-24 17:00 +0200

#201555 — what is sitting on USB device?

FromMark Copper <mcopper@straitcity.com>
Date2018-10-23 18:10 +0200
Subjectwhat is sitting on USB device?
Message-ID<wM7pL-7NH-5@gated-at.bofh.it>
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.

[toc] | [next] | [standalone]


#201557

From<tomas@tuxteam.de>
Date2018-10-23 18:20 +0200
Message-ID<wM7zs-7R2-7@gated-at.bofh.it>
In reply to#201555

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [prev] | [next] | [standalone]


#201560

FromMark Copper <mcopper@straitcity.com>
Date2018-10-23 18:40 +0200
Message-ID<wM7SO-7Xl-27@gated-at.bofh.it>
In reply to#201557
On Tue, Oct 23, 2018 at 11:13 AM <tomas@tuxteam.de> wrote:
>
> 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

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.

[toc] | [prev] | [next] | [standalone]


#201562

FromCindy-Sue Causey <butterflybytes@gmail.com>
Date2018-10-23 18:50 +0200
Message-ID<wM82t-81u-5@gated-at.bofh.it>
In reply to#201560
On 10/23/18, Mark Copper <mcopper@straitcity.com> wrote:
> On Tue, Oct 23, 2018 at 11:13 AM <tomas@tuxteam.de> wrote:
>>
>> 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
>
> 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...)


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 *

[toc] | [prev] | [next] | [standalone]


#201558

FromCurt <curty@free.fr>
Date2018-10-23 18:30 +0200
Message-ID<wM7J7-7U9-1@gated-at.bofh.it>
In reply to#201555
On 2018-10-23, Mark Copper <mcopper@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 

[toc] | [prev] | [next] | [standalone]


#201561

FromMark Copper <mcopper@straitcity.com>
Date2018-10-23 18:50 +0200
Message-ID<wM82t-81u-9@gated-at.bofh.it>
In reply to#201558
On Tue, Oct 23, 2018 at 11:28 AM Curt <curty@free.fr> wrote:
>
> On 2018-10-23, Mark Copper <mcopper@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.

[toc] | [prev] | [next] | [standalone]


#201565

FromCurt <curty@free.fr>
Date2018-10-23 20:00 +0200
Message-ID<wM98d-bc-5@gated-at.bofh.it>
In reply to#201561
On 2018-10-23, Mark Copper <mcopper@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'.

-- 
"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 

[toc] | [prev] | [next] | [standalone]


#201626

FromMark Copper <mcopper@straitcity.com>
Date2018-10-25 18:20 +0200
Message-ID<wMQwx-14x-1@gated-at.bofh.it>
In reply to#201565
On Tue, Oct 23, 2018 at 12:51 PM Curt <curty@free.fr> wrote:
>
> On 2018-10-23, Mark Copper <mcopper@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'.
>
> --
> "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

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!

[toc] | [prev] | [next] | [standalone]


#201592

FromPatrick Bartek <nemommxiv@gmail.com>
Date2018-10-24 17:00 +0200
Message-ID<wMsNz-3vm-11@gated-at.bofh.it>
In reply to#201555
On Tue, 23 Oct 2018 11:03:05 -0500
Mark Copper <mcopper@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?
> 
> 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?

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 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web