All of lore.kernel.org
 help / color / mirror / Atom feed
* Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
@ 2012-06-30 19:21 Frederik Himpe
  2012-07-01  2:12 ` Alan Stern
  0 siblings, 1 reply; 13+ messages in thread
From: Frederik Himpe @ 2012-06-30 19:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-uvc-devel, linux-usb

Hello,

I've got a Logitech HD Webcam C525 using the uvcvideo module and I use
Linux 3.5 RC4. When this camera is connected to a USB2 port, it does not
work most of the time. However it does work fine when connected to a USB
3 port. In Windows it works on both ports.

To test the webcam, I use this command with mplayer2:
$ mplayer tv:// -tv driver=v4l2:width=1280:height=720:device=/dev/video0

When connected to the USB 3 port, the webcam image is shown correctly,
but on a USB 2 port, this output is shown most of the time:

MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.

Playing tv://.
Detected file format: TV
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: unable to open '/dev/video0': Device or resource busy
v4l2: ioctl set mute failed: Bad file descriptor
v4l2: 0 frames successfully processed, 0 frames dropped.
Opening as detected format "TV" failed.
Failed to recognize file format.


Exiting... (End of file)

When connected to the USB 2 port, lsusb -v only shows this information
about this webcam:

Bus 001 Device 007: ID 046d:0826 Logitech, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x046d Logitech, Inc.
  idProduct          0x0826 
  bcdDevice            0.10
  iManufacturer           0 
  iProduct                2 
  iSerial                 1 
  bNumConfigurations      1

Much more info is given by lsusb -v when it's connected to the USB 3
port.

Sometimes mplayer does work when connected to the USB 2 port, but after
a few seconds, the image starts freezing, and these errors are shown on
the console:
v4l2: select timeout

Here is a uvcvideo trace from a failed attempt in opening the webcam
with mplayer2 (is it expected that the USB device appears to disconnect
and connect when starting mplayer? I definitely did not disconnect the
device when this was logged).

[ 1878.994588] uvcvideo: uvc_v4l2_open
[ 1879.195761] usb 1-1.2: USB disconnect, device number 15
[ 1879.275132] usb 1-1.2: new full-speed USB device number 16 using
ehci_hcd
[ 1879.346932] usb 1-1.2: device descriptor read/64, error -32
[ 1879.466715] hub 1-1:1.0: unable to enumerate USB device on port 2
[ 1879.666018] usb 1-1.2: new high-speed USB device number 17 using
ehci_hcd
[ 1880.024364] usb 1-1.2: New USB device found, idVendor=046d,
idProduct=0826
[ 1880.024373] usb 1-1.2: New USB device strings: Mfr=0, Product=2,
SerialNumber=1
[ 1880.024377] usb 1-1.2: Product: HD Webcam C525
[ 1880.024380] usb 1-1.2: SerialNumber: 1E83E9D0
[ 1880.291007] uvcvideo: Probing generic UVC device 1.2
[ 1880.291019] uvcvideo: Found format YUV 4:2:2 (YUYV).
[ 1880.291022] uvcvideo: - 640x480 (30.0 fps)
[ 1880.291025] uvcvideo: - 160x120 (30.0 fps)
[ 1880.291027] uvcvideo: - 176x144 (30.0 fps)
[ 1880.291030] uvcvideo: - 320x176 (30.0 fps)
[ 1880.291032] uvcvideo: - 320x240 (30.0 fps)
[ 1880.291034] uvcvideo: - 432x240 (30.0 fps)
[ 1880.291037] uvcvideo: - 352x288 (30.0 fps)
[ 1880.291039] uvcvideo: - 544x288 (30.0 fps)
[ 1880.291042] uvcvideo: - 640x360 (30.0 fps)
[ 1880.291044] uvcvideo: - 752x416 (24.0 fps)
[ 1880.291046] uvcvideo: - 800x448 (24.0 fps)
[ 1880.291048] uvcvideo: - 864x480 (20.0 fps)
[ 1880.291051] uvcvideo: - 960x544 (20.0 fps)
[ 1880.291053] uvcvideo: - 1024x576 (15.0 fps)
[ 1880.291055] uvcvideo: - 800x600 (24.0 fps)
[ 1880.291058] uvcvideo: - 1184x656 (15.0 fps)
[ 1880.291060] uvcvideo: - 960x720 (15.0 fps)
[ 1880.291062] uvcvideo: - 1280x720 (10.0 fps)
[ 1880.291065] uvcvideo: - 1392x768 (10.0 fps)
[ 1880.291067] uvcvideo: - 1504x832 (7.5 fps)
[ 1880.291070] uvcvideo: - 1600x896 (7.5 fps)
[ 1880.291072] uvcvideo: - 1280x960 (7.5 fps)
[ 1880.291074] uvcvideo: - 1712x960 (5.0 fps)
[ 1880.291077] uvcvideo: - 1792x1008 (5.0 fps)
[ 1880.291079] uvcvideo: - 1920x1080 (5.0 fps)
[ 1880.291081] uvcvideo: Found format MJPEG.
[ 1880.291084] uvcvideo: - 640x480 (30.0 fps)
[ 1880.291086] uvcvideo: - 160x120 (30.0 fps)
[ 1880.291088] uvcvideo: - 176x144 (30.0 fps)
[ 1880.291091] uvcvideo: - 320x176 (30.0 fps)
[ 1880.291093] uvcvideo: - 320x240 (30.0 fps)
[ 1880.291096] uvcvideo: - 432x240 (30.0 fps)
[ 1880.291098] uvcvideo: - 352x288 (30.0 fps)
[ 1880.291100] uvcvideo: - 544x288 (30.0 fps)
[ 1880.291103] uvcvideo: - 640x360 (30.0 fps)
[ 1880.291105] uvcvideo: - 752x416 (30.0 fps)
[ 1880.291107] uvcvideo: - 800x448 (30.0 fps)
[ 1880.291110] uvcvideo: - 864x480 (30.0 fps)
[ 1880.291112] uvcvideo: - 960x544 (30.0 fps)
[ 1880.291114] uvcvideo: - 1024x576 (30.0 fps)
[ 1880.291117] uvcvideo: - 800x600 (30.0 fps)
[ 1880.291120] uvcvideo: - 1184x656 (30.0 fps)
[ 1880.291123] uvcvideo: - 960x720 (30.0 fps)
[ 1880.291125] uvcvideo: - 1280x720 (30.0 fps)
[ 1880.291127] uvcvideo: - 1392x768 (30.0 fps)
[ 1880.291130] uvcvideo: - 1504x832 (30.0 fps)
[ 1880.291263] uvcvideo: - 1600x896 (30.0 fps)
[ 1880.291265] uvcvideo: - 1280x960 (30.0 fps)
[ 1880.291267] uvcvideo: - 1712x960 (30.0 fps)
[ 1880.291270] uvcvideo: - 1792x1008 (30.0 fps)
[ 1880.291272] uvcvideo: - 1920x1080 (30.0 fps)
[ 1880.291280] uvcvideo: Found a Status endpoint (addr 87).
[ 1880.291283] uvcvideo: Found UVC 1.00 device HD Webcam C525
(046d:0826)
[ 1880.291399] uvcvideo: Added control
00000000-0000-0000-0000-000000000001/2 to device 1.2 entity 1
[ 1880.291409] uvcvideo: Adding mapping 'Exposure, Auto' to control
00000000-0000-0000-0000-000000000001/2.
[ 1880.291414] uvcvideo: Added control
00000000-0000-0000-0000-000000000001/3 to device 1.2 entity 1
[ 1880.291418] uvcvideo: Adding mapping 'Exposure, Auto Priority' to
control 00000000-0000-0000-0000-000000000001/3.
[ 1880.291422] uvcvideo: Added control
00000000-0000-0000-0000-000000000001/4 to device 1.2 entity 1
[ 1880.291426] uvcvideo: Adding mapping 'Exposure (Absolute)' to control
00000000-0000-0000-0000-000000000001/4.
[ 1880.291430] uvcvideo: Added control
00000000-0000-0000-0000-000000000001/6 to device 1.2 entity 1
[ 1880.291434] uvcvideo: Adding mapping 'Focus (absolute)' to control
00000000-0000-0000-0000-000000000001/6.
[ 1880.291438] uvcvideo: Added control
00000000-0000-0000-0000-000000000001/11 to device 1.2 entity 1
[ 1880.291442] uvcvideo: Adding mapping 'Zoom, Absolute' to control
00000000-0000-0000-0000-000000000001/11.
[ 1880.291447] uvcvideo: Added control
00000000-0000-0000-0000-000000000001/13 to device 1.2 entity 1
[ 1880.291450] uvcvideo: Adding mapping 'Pan (Absolute)' to control
00000000-0000-0000-0000-000000000001/13.
[ 1880.291453] uvcvideo: Adding mapping 'Tilt (Absolute)' to control
00000000-0000-0000-0000-000000000001/13.
[ 1880.291458] uvcvideo: Added control
00000000-0000-0000-0000-000000000001/8 to device 1.2 entity 1
[ 1880.291461] uvcvideo: Adding mapping 'Focus, Auto' to control
00000000-0000-0000-0000-000000000001/8.
[ 1880.291465] uvcvideo: Added control
00000000-0000-0000-0000-000000000101/2 to device 1.2 entity 2
[ 1880.291468] uvcvideo: Adding mapping 'Brightness' to control
00000000-0000-0000-0000-000000000101/2.
[ 1880.291473] uvcvideo: Added control
00000000-0000-0000-0000-000000000101/3 to device 1.2 entity 2
[ 1880.291476] uvcvideo: Adding mapping 'Contrast' to control
00000000-0000-0000-0000-000000000101/3.
[ 1880.291480] uvcvideo: Added control
00000000-0000-0000-0000-000000000101/7 to device 1.2 entity 2
[ 1880.291483] uvcvideo: Adding mapping 'Saturation' to control
00000000-0000-0000-0000-000000000101/7.
[ 1880.291487] uvcvideo: Added control
00000000-0000-0000-0000-000000000101/8 to device 1.2 entity 2
[ 1880.291490] uvcvideo: Adding mapping 'Sharpness' to control
00000000-0000-0000-0000-000000000101/8.
[ 1880.291494] uvcvideo: Added control
00000000-0000-0000-0000-000000000101/10 to device 1.2 entity 2
[ 1880.291497] uvcvideo: Adding mapping 'White Balance Temperature' to
control 00000000-0000-0000-0000-000000000101/10.
[ 1880.291501] uvcvideo: Added control
00000000-0000-0000-0000-000000000101/1 to device 1.2 entity 2
[ 1880.291504] uvcvideo: Adding mapping 'Backlight Compensation' to
control 00000000-0000-0000-0000-000000000101/1.
[ 1880.291508] uvcvideo: Added control
00000000-0000-0000-0000-000000000101/4 to device 1.2 entity 2
[ 1880.291511] uvcvideo: Adding mapping 'Gain' to control
00000000-0000-0000-0000-000000000101/4.
[ 1880.291516] uvcvideo: Added control
00000000-0000-0000-0000-000000000101/5 to device 1.2 entity 2
[ 1880.291519] uvcvideo: Adding mapping 'Power Line Frequency' to
control 00000000-0000-0000-0000-000000000101/5.
[ 1880.291523] uvcvideo: Added control
00000000-0000-0000-0000-000000000101/11 to device 1.2 entity 2
[ 1880.291526] uvcvideo: Adding mapping 'White Balance Temperature,
Auto' to control 00000000-0000-0000-0000-000000000101/11.
[ 1880.291535] uvcvideo: Scanning UVC chain: OT 3 <- XU 5 <- IT 1
[ 1880.291541]  (-> XU 6 XU 7 XU 8)
[ 1880.291541] uvcvideo: Found a valid video chain (1 -> 3).
[ 1880.303768] input: HD Webcam C525
as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.2/input/input33
[ 1880.303859] uvcvideo: UVC device initialized.
[ 1880.311922] uvcvideo: uvc_v4l2_open
[ 1880.312022] uvcvideo: uvc_v4l2_ioctl(VIDIOC_QUERYCAP)
[ 1880.312059] uvcvideo: uvc_v4l2_release

Motherboard is an Asrock H77 Pro4/MVP.

Complete dmesg and lsusb -v output about a failed attempt (on USB 2
port) and a succeeded attempt (on USB 3) can be found on
http://artipc10.vub.ac.be/~frederik/webcam/

-- 
Frederik Himpe


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-06-30 19:21 Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3 Frederik Himpe
@ 2012-07-01  2:12 ` Alan Stern
  2012-07-01 12:34   ` Frederik Himpe
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Stern @ 2012-07-01  2:12 UTC (permalink / raw)
  To: Frederik Himpe; +Cc: linux-kernel, linux-uvc-devel, linux-usb

On Sat, 30 Jun 2012, Frederik Himpe wrote:

> Hello,
> 
> I've got a Logitech HD Webcam C525 using the uvcvideo module and I use
> Linux 3.5 RC4. When this camera is connected to a USB2 port, it does not
> work most of the time. However it does work fine when connected to a USB
> 3 port. In Windows it works on both ports.

...

> Complete dmesg and lsusb -v output about a failed attempt (on USB 2
> port) and a succeeded attempt (on USB 3) can be found on
> http://artipc10.vub.ac.be/~frederik/webcam/

A usbmon trace would be more helpful.  Or perhaps a pair of traces, one 
for the USB-2 port and one for the USB-3 port.  See the instructions in 
Documentation/usb/usbmon.txt.

Those disconnections in your dmesg logs are not normal.  They could be 
caused by a hardware incompatibility or by a software problem -- 
although if it were software then I would expect the same thing to 
happen with the USB-3 port.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-01  2:12 ` Alan Stern
@ 2012-07-01 12:34   ` Frederik Himpe
  2012-07-01 15:54     ` Alan Stern
  0 siblings, 1 reply; 13+ messages in thread
From: Frederik Himpe @ 2012-07-01 12:34 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-kernel, linux-usb

On Sat, 2012-06-30 at 22:12 -0400, Alan Stern wrote:
> On Sat, 30 Jun 2012, Frederik Himpe wrote:
> 
> > Hello,
> > 
> > I've got a Logitech HD Webcam C525 using the uvcvideo module and I use
> > Linux 3.5 RC4. When this camera is connected to a USB2 port, it does not
> > work most of the time. However it does work fine when connected to a USB
> > 3 port. In Windows it works on both ports.
> 
> ...
> 
> > Complete dmesg and lsusb -v output about a failed attempt (on USB 2
> > port) and a succeeded attempt (on USB 3) can be found on
> > http://artipc10.vub.ac.be/~frederik/webcam/
> 
> A usbmon trace would be more helpful.  Or perhaps a pair of traces, one 
> for the USB-2 port and one for the USB-3 port.  See the instructions in 
> Documentation/usb/usbmon.txt.

OK, I created a usbmon trace both from the USB-2 port as the USB-3 port.
During the trace, I connected the USB webcam to the USB port and started
mplayer, which failed on USB-2 but worked fine on USB-3.

The two traces can be found here:
http://artipc10.vub.ac.be/~frederik/webcam/

Thanks!
-- 
Frederik Himpe <fhimpe@telenet.be>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-01 12:34   ` Frederik Himpe
@ 2012-07-01 15:54     ` Alan Stern
  2012-07-02 20:12       ` Frederik Himpe
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Stern @ 2012-07-01 15:54 UTC (permalink / raw)
  To: Frederik Himpe; +Cc: linux-kernel, linux-usb

On Sun, 1 Jul 2012, Frederik Himpe wrote:

> > A usbmon trace would be more helpful.  Or perhaps a pair of traces, one 
> > for the USB-2 port and one for the USB-3 port.  See the instructions in 
> > Documentation/usb/usbmon.txt.
> 
> OK, I created a usbmon trace both from the USB-2 port as the USB-3 port.
> During the trace, I connected the USB webcam to the USB port and started
> mplayer, which failed on USB-2 but worked fine on USB-3.
> 
> The two traces can be found here:
> http://artipc10.vub.ac.be/~frederik/webcam/

There are two significant differences between the USB-2 and USB-3 
traces, although I don't know what to make of them.

Initially it looks like the driver writes a bunch of values to the 
webcam and asks it to repeat them back.  That's what happens in the 
USB-3 trace, anyway.  The USB-2 trace shows the values being written, 
but when asked to repeat them back the webcam sends nothing.

For example, with USB-3:

ffff8804085042c0 470397794 S Co:3:003:0 s 22 01 0100 0086 0003 3 = 803e00
ffff8804085042c0 470399896 C Co:3:003:0 0 3 >
ffff8804085042c0 470400004 S Ci:3:003:0 s a2 81 0100 0086 0003 3 <
ffff8804085042c0 470401270 C Ci:3:003:0 0 3 = 803e00

The 803e00 values get sent and then received.  The analogous part of
the USB-2 trace shows:

ffff88040cc1f5c0 208122798 S Co:1:006:0 s 22 01 0100 0086 0003 3 = 803e00
ffff88040cc1f5c0 208124781 C Co:1:006:0 0 3 >
ffff88040cc1f5c0 208124818 S Ci:1:006:0 s a2 81 0100 0086 0003 3 <
ffff88040cc1f5c0 208126156 C Ci:1:006:0 0 0

Exactly the same values are sent and the request is the same, but no 
data gets returned.  I have no idea what that means.

Secondly, both traces show that the webcam stopped being used for a
short time and was suspended.  A few seconds later, when it was resumed
again, it worked okay in the USB-3 trace.  But in the USB-2 trace, it
didn't.  After the resume it failed to reply to the first packet sent
(a Get-Device-Status request), and thus it had to be re-enumerated.

Have you tried using the webcam on a different computer?

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-01 15:54     ` Alan Stern
@ 2012-07-02 20:12       ` Frederik Himpe
  2012-07-03  0:40         ` Alan Stern
  0 siblings, 1 reply; 13+ messages in thread
From: Frederik Himpe @ 2012-07-02 20:12 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-kernel, linux-usb, linux-uvc-devel

On Sun, 2012-07-01 at 11:54 -0400, Alan Stern wrote:
> On Sun, 1 Jul 2012, Frederik Himpe wrote:
> 
> > > A usbmon trace would be more helpful.  Or perhaps a pair of traces, one 
> > > for the USB-2 port and one for the USB-3 port.  See the instructions in 
> > > Documentation/usb/usbmon.txt.
> > 
> > OK, I created a usbmon trace both from the USB-2 port as the USB-3 port.
> > During the trace, I connected the USB webcam to the USB port and started
> > mplayer, which failed on USB-2 but worked fine on USB-3.
> > 
> > The two traces can be found here:
> > http://artipc10.vub.ac.be/~frederik/webcam/
> 
> There are two significant differences between the USB-2 and USB-3 
> traces, although I don't know what to make of them.
> 
> Initially it looks like the driver writes a bunch of values to the 
> webcam and asks it to repeat them back.  That's what happens in the 
> USB-3 trace, anyway.  The USB-2 trace shows the values being written, 
> but when asked to repeat them back the webcam sends nothing.
> 
> For example, with USB-3:
> 
> ffff8804085042c0 470397794 S Co:3:003:0 s 22 01 0100 0086 0003 3 = 803e00
> ffff8804085042c0 470399896 C Co:3:003:0 0 3 >
> ffff8804085042c0 470400004 S Ci:3:003:0 s a2 81 0100 0086 0003 3 <
> ffff8804085042c0 470401270 C Ci:3:003:0 0 3 = 803e00
> 
> The 803e00 values get sent and then received.  The analogous part of
> the USB-2 trace shows:
> 
> ffff88040cc1f5c0 208122798 S Co:1:006:0 s 22 01 0100 0086 0003 3 = 803e00
> ffff88040cc1f5c0 208124781 C Co:1:006:0 0 3 >
> ffff88040cc1f5c0 208124818 S Ci:1:006:0 s a2 81 0100 0086 0003 3 <
> ffff88040cc1f5c0 208126156 C Ci:1:006:0 0 0
> 
> Exactly the same values are sent and the request is the same, but no 
> data gets returned.  I have no idea what that means.
> 
> Secondly, both traces show that the webcam stopped being used for a
> short time and was suspended.  A few seconds later, when it was resumed
> again, it worked okay in the USB-3 trace.  But in the USB-2 trace, it
> didn't.  After the resume it failed to reply to the first packet sent
> (a Get-Device-Status request), and thus it had to be re-enumerated.
> 
> Have you tried using the webcam on a different computer?

I just tried it on a different system (Dell Latitude E6400), and it
worked fine on the USB2 ports (kernel version was 3.4.1 on that system,
though). The webcam also works fine on the affected system and USB2
ports in Windows.

-- 
Frederik Himpe <fhimpe@telenet.be>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-02 20:12       ` Frederik Himpe
@ 2012-07-03  0:40         ` Alan Stern
  2012-07-04 18:21           ` Frederik Himpe
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Stern @ 2012-07-03  0:40 UTC (permalink / raw)
  To: Frederik Himpe; +Cc: linux-kernel, linux-usb, linux-uvc-devel

On Mon, 2 Jul 2012, Frederik Himpe wrote:

> > Have you tried using the webcam on a different computer?
> 
> I just tried it on a different system (Dell Latitude E6400), and it
> worked fine on the USB2 ports (kernel version was 3.4.1 on that system,
> though). The webcam also works fine on the affected system and USB2
> ports in Windows.

What happens if you disable USB runtime suspend on the affected system?  
Windows tends not to use it.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-03  0:40         ` Alan Stern
@ 2012-07-04 18:21           ` Frederik Himpe
  2012-07-04 18:42             ` Alan Stern
  0 siblings, 1 reply; 13+ messages in thread
From: Frederik Himpe @ 2012-07-04 18:21 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-kernel, linux-usb, linux-uvc-devel

On Mon, 2012-07-02 at 20:40 -0400, Alan Stern wrote:
> On Mon, 2 Jul 2012, Frederik Himpe wrote:
> 
> > > Have you tried using the webcam on a different computer?
> > 
> > I just tried it on a different system (Dell Latitude E6400), and it
> > worked fine on the USB2 ports (kernel version was 3.4.1 on that system,
> > though). The webcam also works fine on the affected system and USB2
> > ports in Windows.
> 
> What happens if you disable USB runtime suspend on the affected system?  
> Windows tends not to use it.

It appears to make a difference, but it still does not work perfectly.

I disabled autosuspend like this:
root@piranha:/sys# for i in $(find -name autosuspend); do echo 0 > $i; done

Then I started usbmon, connected the camera, and tried different times
to run mplayer. All failed again:
http://artipc10.vub.ac.be/~frederik/webcam/usb2-no-autosupend.mon.out

I stopped usbmon. I Tried again starting mplayer, and then 1 in 2 cases,
I got a working image now. However, after a few seconds, the image
starts to lag, stutter and freeze, just like it cannot keep up with the
image from the camera.

I started usbmon again, and made a trace of this image freezing
happening after a few seconds:
http://artipc10.vub.ac.be/~frederik/webcam/usb2-no-autosupend.mon.out2

I also don't know whether this is related, but when it's connected to
the usb3 port, the Cheese webcam application tends to freeze when
starting a recording. kernel logs contain these errors when it's
connected to USB3:
[ 1970.959798] usb 3-2: new high-speed USB device number 3 using xhci_hcd
[ 1971.244188] usb 3-2: New USB device found, idVendor=046d, idProduct=0826
[ 1971.244198] usb 3-2: New USB device strings: Mfr=0, Product=2, SerialNumber=1
[ 1971.244202] usb 3-2: Product: HD Webcam C525
[ 1971.244205] usb 3-2: SerialNumber: 1E83E9D0
[ 1971.511718] uvcvideo: Found UVC 1.00 device HD Webcam C525 (046d:0826)
[ 1971.524373] input: HD Webcam C525 as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2/input/input68
[ 1971.524608] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 14 with no TDs queued?
[ 1971.524617] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 1971.673352] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 14 with no TDs queued?
[ 1971.673364] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 1971.805117] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 14 with no TDs queued?
[ 1971.805128] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 1971.961869] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 1972.096266] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 14 with no TDs queued?
[ 1972.096276] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 1972.227921] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 14 with no TDs queued?
[ 1972.227931] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 1972.359564] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 14 with no TDs queued?
[ 1972.359574] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 1972.491529] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 14 with no TDs queued?
[ 1972.491542] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 1972.631005] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 14 with no TDs queued?
[ 1972.631016] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 2013.465947] xhci_queue_intr_tx: 53 callbacks suppressed
[ 2018.555341] xhci_queue_intr_tx: 34 callbacks suppressed
[ 2023.565002] xhci_queue_intr_tx: 38 callbacks suppressed
[ 2026.437417] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 2051.915715] xhci_queue_intr_tx: 12 callbacks suppressed
[ 2058.361261] xhci_queue_intr_tx: 58 callbacks suppressed
[ 2120.614792] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
[ 2137.622105] xhci_queue_intr_tx: 29 callbacks suppressed
[ 2142.839167] xhci_queue_intr_tx: 31 callbacks suppressed
[ 2156.751270] xhci_queue_intr_tx: 22 callbacks suppressed
[ 2163.164907] xhci_queue_intr_tx: 33 callbacks suppressed
[ 2165.447345] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?

But at least mplayer works fine when it's connected to USB3.

-- 
Frederik Himpe <fhimpe@telenet.be>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-04 18:21           ` Frederik Himpe
@ 2012-07-04 18:42             ` Alan Stern
  2012-07-04 20:19               ` Frederik Himpe
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Stern @ 2012-07-04 18:42 UTC (permalink / raw)
  To: Frederik Himpe; +Cc: linux-kernel, linux-usb, linux-uvc-devel

On Wed, 4 Jul 2012, Frederik Himpe wrote:

> > What happens if you disable USB runtime suspend on the affected system?  
> > Windows tends not to use it.
> 
> It appears to make a difference, but it still does not work perfectly.
> 
> I disabled autosuspend like this:
> root@piranha:/sys# for i in $(find -name autosuspend); do echo 0 > $i; done

That doesn't disable autosuspend.  The proper way is:

	echo on >/sys/bus/usb/devices/.../power/control

where you fill in the "..." with the directory name for the webcam.

> Then I started usbmon, connected the camera, and tried different times
> to run mplayer. All failed again:
> http://artipc10.vub.ac.be/~frederik/webcam/usb2-no-autosupend.mon.out

This failed for the same reason as before: The webcam autosuspended.

> I stopped usbmon. I Tried again starting mplayer, and then 1 in 2 cases,
> I got a working image now. However, after a few seconds, the image
> starts to lag, stutter and freeze, just like it cannot keep up with the
> image from the camera.
> 
> I started usbmon again, and made a trace of this image freezing
> happening after a few seconds:
> http://artipc10.vub.ac.be/~frederik/webcam/usb2-no-autosupend.mon.out2

This log also has an autosuspend failure.  In addition, it shows the 
image freezing because of a Set-Interface request that was sent while 
the program was running.  I have no idea why that request was sent.

> I also don't know whether this is related, but when it's connected to
> the usb3 port, the Cheese webcam application tends to freeze when
> starting a recording. kernel logs contain these errors when it's
> connected to USB3:
> [ 1970.959798] usb 3-2: new high-speed USB device number 3 using xhci_hcd
> [ 1971.244188] usb 3-2: New USB device found, idVendor=046d, idProduct=0826
> [ 1971.244198] usb 3-2: New USB device strings: Mfr=0, Product=2, SerialNumber=1
> [ 1971.244202] usb 3-2: Product: HD Webcam C525
> [ 1971.244205] usb 3-2: SerialNumber: 1E83E9D0
> [ 1971.511718] uvcvideo: Found UVC 1.00 device HD Webcam C525 (046d:0826)
> [ 1971.524373] input: HD Webcam C525 as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2/input/input68
> [ 1971.524608] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 14 with no TDs queued?
> [ 1971.524617] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 0 with no TDs queued?
...

An unrelated problem, I think.

> But at least mplayer works fine when it's connected to USB3.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-04 18:42             ` Alan Stern
@ 2012-07-04 20:19               ` Frederik Himpe
  2012-07-05  1:20                 ` Alan Stern
  0 siblings, 1 reply; 13+ messages in thread
From: Frederik Himpe @ 2012-07-04 20:19 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-kernel, linux-usb, linux-uvc-devel

On Wed, 2012-07-04 at 14:42 -0400, Alan Stern wrote:
> On Wed, 4 Jul 2012, Frederik Himpe wrote:
> 
> > > What happens if you disable USB runtime suspend on the affected system?  
> > > Windows tends not to use it.
> > 
> > It appears to make a difference, but it still does not work perfectly.
> > 
> > I disabled autosuspend like this:
> > root@piranha:/sys# for i in $(find -name autosuspend); do echo 0 > $i; done
> 
> That doesn't disable autosuspend.  The proper way is:
> 
> 	echo on >/sys/bus/usb/devices/.../power/control
> 
> where you fill in the "..." with the directory name for the webcam.

usb trace from trying mplayer a few times after disabling autosuspend:

ffff880415761ec0 897158138 S Ii:1:081:7 -115:128 16 <
ffff8803c49ec800 897158252 S Co:1:081:0 s 21 01 0100 0003 001a 26 = 01000101 15160500 00000000 00000000 00000000 00000000 0000
ffff8803c49ec800 897162252 C Co:1:081:0 -71 0
ffff8803c49ec800 897162388 S Co:1:081:0 s 01 0b 0000 0003 0000 0
ffff8803c49ec800 897166377 C Co:1:081:0 -71 0
ffff880415761ec0 897166486 C Ii:1:081:7 -2:128 0
ffff880415761ec0 897844606 S Ii:1:081:7 -115:128 16 <
ffff8803c49ec800 897844749 S Co:1:081:0 s 21 01 0100 0003 001a 26 = 01000101 15160500 00000000 00000000 00000000 00000000 0000
ffff8803c49ec800 897848746 C Co:1:081:0 -71 0
ffff8803c49ec800 897848879 S Co:1:081:0 s 01 0b 0000 0003 0000 0
ffff8803c49ec800 897852873 C Co:1:081:0 -71 0
ffff880415761ec0 897852965 C Ii:1:081:7 -2:128 16 = 0000e83f 335dbc5f f438be84 08004500
ffff880415761ec0 898444380 S Ii:1:081:7 -115:128 16 <
ffff8803c49ecd40 898444471 S Co:1:081:0 s 21 01 0100 0003 001a 26 = 01000101 15160500 00000000 00000000 00000000 00000000 0000
ffff8803c49ecd40 898448507 C Co:1:081:0 -71 0
ffff8803c49ecd40 898448639 S Co:1:081:0 s 01 0b 0000 0003 0000 0
ffff8803c49ecd40 898452616 C Co:1:081:0 -71 0
ffff880415761ec0 898452722 C Ii:1:081:7 -2:128 0
ffff880415761ec0 899007841 S Ii:1:081:7 -115:128 16 <
ffff8803c49ec800 899007939 S Co:1:081:0 s 21 01 0100 0003 001a 26 = 01000101 15160500 00000000 00000000 00000000 00000000 0000
ffff8803c49ec800 899011863 C Co:1:081:0 -71 0
ffff8803c49ec800 899012005 S Co:1:081:0 s 01 0b 0000 0003 0000 0
ffff8803c49ec800 899015986 C Co:1:081:0 -71 0
ffff880415761ec0 899016082 C Ii:1:081:7 -2:128 0

dmesg contains:
[ 9146.620398] uvcvideo: Failed to set UVC probe control : -71 (exp. 26).

-- 
Frederik Himpe <fhimpe@telenet.be>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-04 20:19               ` Frederik Himpe
@ 2012-07-05  1:20                 ` Alan Stern
  2012-07-05 19:35                   ` Frederik Himpe
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Stern @ 2012-07-05  1:20 UTC (permalink / raw)
  To: Frederik Himpe; +Cc: Kernel development list, USB list

On Wed, 4 Jul 2012, Frederik Himpe wrote:

> > That doesn't disable autosuspend.  The proper way is:
> > 
> > 	echo on >/sys/bus/usb/devices/.../power/control
> > 
> > where you fill in the "..." with the directory name for the webcam.
> 
> usb trace from trying mplayer a few times after disabling autosuspend:
> 
> ffff880415761ec0 897158138 S Ii:1:081:7 -115:128 16 <
> ffff8803c49ec800 897158252 S Co:1:081:0 s 21 01 0100 0003 001a 26 = 01000101 15160500 00000000 00000000 00000000 00000000 0000
> ffff8803c49ec800 897162252 C Co:1:081:0 -71 0

This is already too late.  The -71 error code indicates that the webcam 
has crashed.  We need to see what happens before the crash, in order to 
determine what causes it.

Did you use the right path for the webcam device?  According to your
logs, it should be 1-1.2 -- assuming you plug the webcam into the same
port as before.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-05  1:20                 ` Alan Stern
@ 2012-07-05 19:35                   ` Frederik Himpe
  2012-07-05 21:24                     ` Alan Stern
  0 siblings, 1 reply; 13+ messages in thread
From: Frederik Himpe @ 2012-07-05 19:35 UTC (permalink / raw)
  To: Alan Stern; +Cc: Kernel development list, USB list

On Wed, 2012-07-04 at 21:20 -0400, Alan Stern wrote:
> On Wed, 4 Jul 2012, Frederik Himpe wrote:
> 
> > > That doesn't disable autosuspend.  The proper way is:
> > > 
> > > 	echo on >/sys/bus/usb/devices/.../power/control
> > > 
> > > where you fill in the "..." with the directory name for the webcam.
> > 
> > usb trace from trying mplayer a few times after disabling autosuspend:
> > 
> > ffff880415761ec0 897158138 S Ii:1:081:7 -115:128 16 <
> > ffff8803c49ec800 897158252 S Co:1:081:0 s 21 01 0100 0003 001a 26 = 01000101 15160500 00000000 00000000 00000000 00000000 0000
> > ffff8803c49ec800 897162252 C Co:1:081:0 -71 0
> 
> This is already too late.  The -71 error code indicates that the webcam 
> has crashed.  We need to see what happens before the crash, in order to 
> determine what causes it.
> 
> Did you use the right path for the webcam device?  According to your
> logs, it should be 1-1.2 -- assuming you plug the webcam into the same
> port as before.

OK, new attempt.

I plug in webcam:

Jul  5 21:19:02 piranha kernel: [ 9611.555849] usb 1-1.2: new high-speed USB device number 5 using ehci_hcd
Jul  5 21:19:03 piranha kernel: [ 9611.913815] usb 1-1.2: New USB device found, idVendor=046d, idProduct=0826
Jul  5 21:19:03 piranha kernel: [ 9611.913827] usb 1-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=1
Jul  5 21:19:03 piranha kernel: [ 9611.913832] usb 1-1.2: Product: HD Webcam C525
Jul  5 21:19:03 piranha kernel: [ 9611.913835] usb 1-1.2: SerialNumber: 1E83E9D0
Jul  5 21:19:03 piranha kernel: [ 9612.180813] uvcvideo: Found UVC 1.00 device HD Webcam C525 (046d:0826)
Jul  5 21:19:03 piranha kernel: [ 9612.193342] input: HD Webcam C525 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.2/input/input27

I run:
# cat /sys/bus/usb/devices/1-1.2/power/control
auto
# echo on > /sys/bus/usb/devices/1-1.2/power/control

At this moment, the device disconnects and reconnects, according to the
logs:
Jul  5 21:20:40 piranha kernel: [ 9709.169304] usb 1-1.2: USB disconnect, device number 5
Jul  5 21:20:40 piranha kernel: [ 9709.416109] usb 1-1.2: new high-speed USB device number 6 using ehci_hcd
Jul  5 21:20:41 piranha kernel: [ 9709.774203] usb 1-1.2: New USB device found, idVendor=046d, idProduct=0826
Jul  5 21:20:41 piranha kernel: [ 9709.774215] usb 1-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=1
Jul  5 21:20:41 piranha kernel: [ 9709.774219] usb 1-1.2: Product: HD Webcam C525
Jul  5 21:20:41 piranha kernel: [ 9709.774222] usb 1-1.2: SerialNumber: 1E83E9D0
Jul  5 21:20:41 piranha kernel: [ 9710.040969] uvcvideo: Found UVC 1.00 device HD Webcam C525 (046d:0826)
Jul  5 21:20:41 piranha kernel: [ 9710.053472] input: HD Webcam C525 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.2/input/input28

And it's back to auto:
# cat /sys/bus/usb/devices/1-1.2/power/control
auto

I tried setting to on again, and then this appears in the logs:
Jul  5 21:21:59 piranha kernel: [ 9788.223118] usb 1-1.2: USB disconnect, device number 6
Jul  5 21:22:00 piranha kernel: [ 9788.330415] usb 1-1.2: new full-speed USB device number 7 using ehci_hcd
Jul  5 21:22:00 piranha kernel: [ 9788.402207] usb 1-1.2: device descriptor read/64, error -32
Jul  5 21:22:00 piranha kernel: [ 9788.577706] usb 1-1.2: device descriptor read/64, error -32
Jul  5 21:22:00 piranha kernel: [ 9788.753203] usb 1-1.2: new full-speed USB device number 8 using ehci_hcd
Jul  5 21:22:00 piranha kernel: [ 9788.824996] usb 1-1.2: device descriptor read/64, error -32
Jul  5 21:22:00 piranha kernel: [ 9789.000493] usb 1-1.2: device descriptor read/64, error -32
Jul  5 21:22:00 piranha kernel: [ 9789.175991] usb 1-1.2: new full-speed USB device number 9 using ehci_hcd
Jul  5 21:22:01 piranha kernel: [ 9789.582701] usb 1-1.2: device not accepting address 9, error -32
Jul  5 21:22:01 piranha kernel: [ 9789.654621] usb 1-1.2: new full-speed USB device number 10 using ehci_hcd
Jul  5 21:22:01 piranha kernel: [ 9790.061329] usb 1-1.2: device not accepting address 10, error -32
Jul  5 21:22:01 piranha kernel: [ 9790.061467] hub 1-1:1.0: unable to enumerate USB device on port 2

I reproduced this with usbmon running:
http://artipc10.vub.ac.be/~frederik/webcam/usbmon.1u

# cat /sys/kernel/debug/usb/usbmon/1u > /tmp/usbmon.1u
Plug in webcam
# cat /sys/bus/usb/devices/1-1.2/power/control
auto
# echo on > /sys/bus/usb/devices/1-1.2/power/control
[device disconnects and reconnects, according to log]
# echo on > /sys/bus/usb/devices/1-1.2/power/control
[this time the device disconnects and reconnects again]

-- 
Frederik Himpe <fhimpe@telenet.be>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-05 19:35                   ` Frederik Himpe
@ 2012-07-05 21:24                     ` Alan Stern
  2012-07-11  6:11                       ` Heinz Diehl
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Stern @ 2012-07-05 21:24 UTC (permalink / raw)
  To: Frederik Himpe; +Cc: Kernel development list, USB list

On Thu, 5 Jul 2012, Frederik Himpe wrote:

> OK, new attempt.
> 
> I plug in webcam:
> 
> Jul  5 21:19:02 piranha kernel: [ 9611.555849] usb 1-1.2: new high-speed USB device number 5 using ehci_hcd
> Jul  5 21:19:03 piranha kernel: [ 9611.913815] usb 1-1.2: New USB device found, idVendor=046d, idProduct=0826
> Jul  5 21:19:03 piranha kernel: [ 9611.913827] usb 1-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=1
> Jul  5 21:19:03 piranha kernel: [ 9611.913832] usb 1-1.2: Product: HD Webcam C525
> Jul  5 21:19:03 piranha kernel: [ 9611.913835] usb 1-1.2: SerialNumber: 1E83E9D0
> Jul  5 21:19:03 piranha kernel: [ 9612.180813] uvcvideo: Found UVC 1.00 device HD Webcam C525 (046d:0826)
> Jul  5 21:19:03 piranha kernel: [ 9612.193342] input: HD Webcam C525 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.2/input/input27
> 
> I run:
> # cat /sys/bus/usb/devices/1-1.2/power/control
> auto
> # echo on > /sys/bus/usb/devices/1-1.2/power/control
> 
> At this moment, the device disconnects and reconnects, according to the
> logs:
> Jul  5 21:20:40 piranha kernel: [ 9709.169304] usb 1-1.2: USB disconnect, device number 5
> Jul  5 21:20:40 piranha kernel: [ 9709.416109] usb 1-1.2: new high-speed USB device number 6 using ehci_hcd
> Jul  5 21:20:41 piranha kernel: [ 9709.774203] usb 1-1.2: New USB device found, idVendor=046d, idProduct=0826
> Jul  5 21:20:41 piranha kernel: [ 9709.774215] usb 1-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=1
> Jul  5 21:20:41 piranha kernel: [ 9709.774219] usb 1-1.2: Product: HD Webcam C525
> Jul  5 21:20:41 piranha kernel: [ 9709.774222] usb 1-1.2: SerialNumber: 1E83E9D0
> Jul  5 21:20:41 piranha kernel: [ 9710.040969] uvcvideo: Found UVC 1.00 device HD Webcam C525 (046d:0826)
> Jul  5 21:20:41 piranha kernel: [ 9710.053472] input: HD Webcam C525 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.2/input/input28
> 
> And it's back to auto:
> # cat /sys/bus/usb/devices/1-1.2/power/control
> auto

:-)  That's pretty funny -- although you may not think so.

> I tried setting to on again, and then this appears in the logs:
> Jul  5 21:21:59 piranha kernel: [ 9788.223118] usb 1-1.2: USB disconnect, device number 6
> Jul  5 21:22:00 piranha kernel: [ 9788.330415] usb 1-1.2: new full-speed USB device number 7 using ehci_hcd
> Jul  5 21:22:00 piranha kernel: [ 9788.402207] usb 1-1.2: device descriptor read/64, error -32
> Jul  5 21:22:00 piranha kernel: [ 9788.577706] usb 1-1.2: device descriptor read/64, error -32
> Jul  5 21:22:00 piranha kernel: [ 9788.753203] usb 1-1.2: new full-speed USB device number 8 using ehci_hcd
> Jul  5 21:22:00 piranha kernel: [ 9788.824996] usb 1-1.2: device descriptor read/64, error -32
> Jul  5 21:22:00 piranha kernel: [ 9789.000493] usb 1-1.2: device descriptor read/64, error -32
> Jul  5 21:22:00 piranha kernel: [ 9789.175991] usb 1-1.2: new full-speed USB device number 9 using ehci_hcd
> Jul  5 21:22:01 piranha kernel: [ 9789.582701] usb 1-1.2: device not accepting address 9, error -32
> Jul  5 21:22:01 piranha kernel: [ 9789.654621] usb 1-1.2: new full-speed USB device number 10 using ehci_hcd
> Jul  5 21:22:01 piranha kernel: [ 9790.061329] usb 1-1.2: device not accepting address 10, error -32
> Jul  5 21:22:01 piranha kernel: [ 9790.061467] hub 1-1:1.0: unable to enumerate USB device on port 2

All right, what you need to do is prevent autosuspend from getting 
enabled in the first place.

For testing purposes, the easiest way to do this is

	echo -1 >/sys/module/usbcore/parameters/autosuspend

before plugging in the webcam.  The -1 will then be used as the default 
autosuspend delay for all new USB devices, and since it is negative, 
autosuspend will be disabled.

In the long run, it may be necessary to add a quirk entry to always
use a reset-resume with this device.  You can find similar entries in 
drivers/usb/core/quirks.c for other Logitech webcams, which makes it 
seem very likely that one is needed for yours.  If you want you 
can try adding the appropriate entry and submit it as a patch.

None of this explains why there isn't any problem when the webcam is 
plugged into a USB-3 port, unfortunately.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3
  2012-07-05 21:24                     ` Alan Stern
@ 2012-07-11  6:11                       ` Heinz Diehl
  0 siblings, 0 replies; 13+ messages in thread
From: Heinz Diehl @ 2012-07-11  6:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Frederik Himpe, USB list, Alan Stern

Hi,

I have exactly the same webcam, lsusb says "Bus 002 Device 004: ID
046d:0826 Logitech, Inc."...

On 06.07.2012, Alan Stern wrote: 

> On Thu, 5 Jul 2012, Frederik Himpe wrote:

> > I tried setting to on again, and then this appears in the logs:
> > Jul  5 21:21:59 piranha kernel: [ 9788.223118] usb 1-1.2: USB disconnect, device number 6
> > Jul  5 21:22:00 piranha kernel: [ 9788.330415] usb 1-1.2: new full-speed USB device number 7 using ehci_hcd
> > Jul  5 21:22:00 piranha kernel: [ 9788.402207] usb 1-1.2: device descriptor read/64, error -32
> > Jul  5 21:22:00 piranha kernel: [ 9788.577706] usb 1-1.2: device descriptor read/64, error -32
> > Jul  5 21:22:00 piranha kernel: [ 9788.753203] usb 1-1.2: new full-speed USB device number 8 using ehci_hcd
> > Jul  5 21:22:00 piranha kernel: [ 9788.824996] usb 1-1.2: device descriptor read/64, error -32
> > Jul  5 21:22:00 piranha kernel: [ 9789.000493] usb 1-1.2: device descriptor read/64, error -32
[....]

...and I do not have these messages at all, with or without
autosuspend enabled...
 
> In the long run, it may be necessary to add a quirk entry to always
> use a reset-resume with this device.  You can find similar entries in 
> drivers/usb/core/quirks.c for other Logitech webcams, which makes it 
> seem very likely that one is needed for yours.  If you want you 
> can try adding the appropriate entry and submit it as a patch.

...and it runs fine with or without the quirk, which I added for
testing purposes. 

> None of this explains why there isn't any problem when the webcam is 
> plugged into a USB-3 port, unfortunately.

All this is purely on USB-2, my machine doesn't have any USB-3 port,
with vanilla 3.4.4 kernel. If nobody did, should I submit a patch 
containing the quirk anyway?

If I can help testing, feel free to contact me.




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-07-11  6:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-30 19:21 Logitech HD Webcam C525 does not work when connected to USB 2 port, works on USB 3 Frederik Himpe
2012-07-01  2:12 ` Alan Stern
2012-07-01 12:34   ` Frederik Himpe
2012-07-01 15:54     ` Alan Stern
2012-07-02 20:12       ` Frederik Himpe
2012-07-03  0:40         ` Alan Stern
2012-07-04 18:21           ` Frederik Himpe
2012-07-04 18:42             ` Alan Stern
2012-07-04 20:19               ` Frederik Himpe
2012-07-05  1:20                 ` Alan Stern
2012-07-05 19:35                   ` Frederik Himpe
2012-07-05 21:24                     ` Alan Stern
2012-07-11  6:11                       ` Heinz Diehl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.