You are not logged in.

#1 2021-01-07 19:58:11

Kieldozer
Member
Registered: 2021-01-07
Posts: 4

USB-Controller crashes after increasing webcam resolution

I am running arch linux with kernel version 5.10.5 (i already tried this on the zen kernel and lts 5.4.86 with the exact same result). The webcam is a "Logitech StreamCam", plugged into my ASUS ROG Maximus VIII Hero's USB-C Port.

The Problem is that the USB-Controller fails when I set the webcam resolution to anything higher than 480p in obs-studio (26.1.0-2) , after that the USB port is dead (no usb device that i tried will show up) until I reboot.

I already updated my mainboard firmware and i still get the same result. The webcam is known good and works as expected on my laptop (also running arch), but produces the same current rate/runtime rate complaints in the dmesg output.

This is the verbose lsusb output of the USB "Device" before I plug in the webcam: http://paste.debian.net/hidden/f962f1ea

After the failure the output stops after the "Device Descriptor" section and does not incluce the "Hub Descriptor" section.

This is the relevant dmesg output:

[  506.979147] usb 4-2: USB disconnect, device number 2
[  510.260259] usb 4-2: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[  510.280546] usb 4-2: New USB device found, idVendor=046d, idProduct=0893, bcdDevice= 3.17
[  510.280551] usb 4-2: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[  510.280554] usb 4-2: Product: Logitech StreamCam
[  510.280556] usb 4-2: SerialNumber: B58C4E25
[  510.299106] usb 4-2: current rate 16000 is different from the runtime rate 24000
[  510.306083] usb 4-2: current rate 16000 is different from the runtime rate 32000
[  510.313096] usb 4-2: current rate 16000 is different from the runtime rate 48000
[  510.356201] hid-generic 0003:046D:0893.0006: hiddev99,hidraw5: USB HID v1.11 Device [Logitech StreamCam] on usb-0000:04:00.0-2/input5
[  510.413365] videodev: Linux video capture interface: v2.00
[  510.428787] uvcvideo: Found UVC 1.00 device Logitech StreamCam (046d:0893)
[  510.444830] input: Logitech StreamCam as /devices/pci0000:00/0000:00:1c.0/0000:04:00.0/usb4/4-2/4-2:1.0/input/input41
[  510.444869] usbcore: registered new interface driver uvcvideo
[  510.444869] USB Video Class driver (1.1.1)
[  510.462036] usb 4-2: current rate 16000 is different from the runtime rate 48000
[  510.474013] usb 4-2: current rate 16000 is different from the runtime rate 48000
[  510.486035] usb 4-2: current rate 16000 is different from the runtime rate 48000
[  531.593265] usb 4-2: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[  543.665519] xhci_hcd 0000:04:00.0: xHCI host not responding to stop endpoint command.
[  543.665524] xhci_hcd 0000:04:00.0: USBSTS:
[  543.665552] xhci_hcd 0000:04:00.0: xHCI host controller not responding, assume dead
[  543.665555] xhci_hcd 0000:04:00.0: HC died; cleaning up
[  543.665568] usb 4-2: USB disconnect, device number 3

however dmesg sometimes spams this after the inital complaints about a differing runtime rate:

[   42.643026] xhci_hcd 0000:04:00.0: Looking for event-dma 000000007eb35010 trb-start 000000007eb35000 trb-end 000000007eb35000 seg-start 000000007eb35000 seg-end 000000007eb35ff0
[   42.643031] xhci_hcd 0000:04:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13

Last edited by Kieldozer (2021-01-07 20:00:10)

Offline

#2 2021-01-07 21:47:29

seth
Member
Registered: 2012-09-03
Posts: 58,687

Re: USB-Controller crashes after increasing webcam resolution

Do you maybe use a USB2 port?

lsusb -tv

(before stuff  breaks)

Offline

#3 2021-01-07 22:09:31

Kieldozer
Member
Registered: 2021-01-07
Posts: 4

Re: USB-Controller crashes after increasing webcam resolution

seth wrote:

Do you maybe use a USB2 port?

No, it seems to connect with the proper 3.0 speed.

`--> lsusb -tvv
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /sys/bus/usb/devices/  /dev/bus/usb/004/001
    |__ Port 2: Dev 2, If 0, Class=Video, Driver=uvcvideo, 5000M
        ID 046d:0893 Logitech, Inc. 
        /sys/bus/usb/devices/4-2  /dev/bus/usb/004/002
    |__ Port 2: Dev 2, If 1, Class=Video, Driver=uvcvideo, 5000M
        ID 046d:0893 Logitech, Inc. 
        /sys/bus/usb/devices/4-2  /dev/bus/usb/004/002
    |__ Port 2: Dev 2, If 2, Class=Audio, Driver=snd-usb-audio, 5000M
        ID 046d:0893 Logitech, Inc. 
        /sys/bus/usb/devices/4-2  /dev/bus/usb/004/002
    |__ Port 2: Dev 2, If 3, Class=Audio, Driver=snd-usb-audio, 5000M
        ID 046d:0893 Logitech, Inc. 
        /sys/bus/usb/devices/4-2  /dev/bus/usb/004/002
    |__ Port 2: Dev 2, If 4, Class=Vendor Specific Class, Driver=, 5000M
        ID 046d:0893 Logitech, Inc. 
        /sys/bus/usb/devices/4-2  /dev/bus/usb/004/002
    |__ Port 2: Dev 2, If 5, Class=Human Interface Device, Driver=usbhid, 5000M
        ID 046d:0893 Logitech, Inc. 
        /sys/bus/usb/devices/4-2  /dev/bus/usb/004/002

(this is with the webcam connected, but before using it and causing the controller to fail)

Offline

#4 2021-01-08 13:58:40

seth
Member
Registered: 2012-09-03
Posts: 58,687

Re: USB-Controller crashes after increasing webcam resolution

The BrioCam (I understand that you've a "StreamCam") has a bunch of similar google hits that were fixed w/ a firmware update to the camera.
Do you get a stream of -110 errors and re-connects of the device?

Offline

#5 2021-01-08 20:01:42

Kieldozer
Member
Registered: 2021-01-07
Posts: 4

Re: USB-Controller crashes after increasing webcam resolution

I do not see anything that hints to constant re-connects.

Unfortunately the firmware thing only applies to the BRIO, not the StreamCam. Logitech does not seem to offer updated firmware for this model.

The proprietary firmware is of course probably far from perfect, but even if, I don't see how just defective firmware could crash the USB-Controller and result in

[  510.462036] usb 4-2: current rate 16000 is different from the runtime rate 48000
[  510.474013] usb 4-2: current rate 16000 is different from the runtime rate 48000
[  510.486035] usb 4-2: current rate 16000 is different from the runtime rate 48000
[  531.593265] usb 4-2: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[  543.665519] xhci_hcd 0000:04:00.0: xHCI host not responding to stop endpoint command.
[  543.665524] xhci_hcd 0000:04:00.0: USBSTS:
[  543.665552] xhci_hcd 0000:04:00.0: xHCI host controller not responding, assume dead
[  543.665555] xhci_hcd 0000:04:00.0: HC died; cleaning up
[  543.665568] usb 4-2: USB disconnect, device number 3

I am beginning to suspect that at least part of the blame needs to go towards my mobo-firmware.

Offline

#6 2021-01-08 21:59:48

seth
Member
Registered: 2012-09-03
Posts: 58,687

Re: USB-Controller crashes after increasing webcam resolution

Which host controller?
Does the system have a second (USB2) one that you could try? (Assuming the video is h264, the transfer rate will be sufficient)

Offline

#7 2021-01-11 17:25:31

Kieldozer
Member
Registered: 2021-01-07
Posts: 4

Re: USB-Controller crashes after increasing webcam resolution

Ok the USB-C to A adapter has arrive and I tried the camera works as (well as could be) expected in my regular USB 3.0 5 Gbit/s port.

I am still initially getting

current rate 16000 is different from the runtime rate 48000

when I plug it in and some UVC errors

[14031.151799] uvcvideo: Failed to query (SET_CUR) UVC control 10 on unit 3: -32 (exp. 2).
[14031.154615] uvcvideo: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4).
[14031.157462] uvcvideo: Failed to query (SET_CUR) UVC control 6 on unit 1: -32 (exp. 2).

I don't know what to make of this though:

[14025.027603] usb 2-6: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd

(this gets printed before the uvc errors)

Offline

#8 2021-01-11 22:59:57

seth
Member
Registered: 2012-09-03
Posts: 58,687

Re: USB-Controller crashes after increasing webcam resolution

current rate 16000 is different from the runtime rate 48000

is the audio frequency - if the camera has a mic, it's not exactly HiFi but that's not a problem.
"-32" is EPIPE (broken pipe) and probably a direct consequence of the reset and the latter might be due to the adapter.
Does it happen when using the adapter alone?
And when adding the camera some seconds after the adapter?

Offline

#9 2021-02-04 09:32:32

manouchk
Member
Registered: 2008-07-29
Posts: 313

Re: USB-Controller crashes after increasing webcam resolution

Is this problem a kernel problem similar to the problem I have with an old logitech webcam? Here is my post. They are some external link with problem of other distributions.
https://bbs.archlinux.org/viewtopic.php … 4#p1951494
I had to downgrade the kernel but as I see, you use an older kernel, therefore, the problem is probably different. Your kernel is not too old for this webcam?

Offline

#10 2021-06-03 13:19:20

jpetazzo
Member
Registered: 2021-06-03
Posts: 2

Re: USB-Controller crashes after increasing webcam resolution

For what it's worth, I have seen similar problems with the same webcam:

Bus 002 Device 002: ID 046d:0893 Logitech, Inc. Logitech StreamCam

There appears to be "good" and "bad" USB ports, and the following things can happen.

If I plug the webcam in a "good" USB port, it is then detected as USB 3 and works perfectly, including at high resolutions + high framerates (1080p/30fps).

If I plug the webcam in a "bad" USB port, then there are two possibilities: it can be detected as USB 2, or as USB 3.

If it is detected as USB 3, then it won't work: as soon as I try to use it, it hangs, and I get various error messages in the kernel log.

Here is a fresh example of that kind of error, obtained on one of my machines:

Jun 03 14:56:49 zavtra kernel: xhci_hcd 0000:01:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13
Jun 03 14:56:49 zavtra kernel: xhci_hcd 0000:01:00.0: Looking for event-dma 00000000fecfe080 trb-start 00000000fecfe070 trb-end 00000000fecfe070 seg-start 00000000fecfe000 seg-end 00000000fecfeff0
(These two lines repeated 10+ times)

If it is detected as USB 2, then it will work, but only at USB 2 speeds; so if I try to do 1080p in YUYV, I'm limited to 5 fps, for instance.

Now, what are the "good" and "bad" USB ports? Here is the list I have so far.

The "good" USB ports:
- the USB Type-C port on machine "bolshoy" (Intel desktop, motherboard: MSI MPG Z390M)
- the 5 Gb/s USB Type-C port on my Caldigit TS3+ thunderbolt hub, connected to a laptop
- the 5 Gb/s USB Type-A port (+adapter) on that same thunderbolt hub
- the USB Type-A ports (+adapter) on the USB hub on my Samsung 32TU87 screen

The "bad" USB ports are:
- the 10 Gb/s USB-C Type-C port on my Caldigit TS3+ thunderbolt hub
- any USB port (USB Type-A or Type-C) on machine "zavtra" (AMD desktop, motherboard: AORUS B550)

It looks like the "bad" USB ports are the ones capable of doing 10 Gb/s USB 3. (I couldn't get 100% confirmation, but since machine "zavtra" is relatively recent, I think all the USB ports there are USB 3.2.) This could mean that the camera doesn't negotiate USB 3.2 capabilities correctly, and the problem doesn't happen when using an "older" USB 3.0 (or maybe 3.1) port.

Additional info:

- When plugging the StreamCam on the 10 Gb/s USB Type-C port on my Caldigit hub, I get the "xHCI host controller not responding, assume dead" too
- I'm not sure what determines if the camera gets detected as USB 2 or USB 3; it looks like if it gets in trouble, it will then be detected as USB 2 for a while; but if I wait a bit (or perhaps plug it to a "good" port in between?) then it will be detected again as USB 3.

I'm sorry that a lot of the language above is a bit vague, but a lot of these behaviors appear to be non-deterministic; for instance, I was able to get the camera to work correctly (1080p/30fps) at least once in a "bad" port (one of the USB Type-A ports on the modern AMD machine), but it was at a point when I wasn't very rigorous with my tests, and it might be that the camera had switched to MJPEG (which works in 1080p/30fps over USB 2) instead of YUYV (which requires USB 3 for that resolution and framerate).

My plan for now is to try to use the camera through the USB hub on my screen and see if it's stable. (I prefer to connect the cameras directly to my machine to avoid bandwidth issue, but if that's the only solution...?)

Offline

#11 2021-12-14 07:34:07

wasperen
Member
Registered: 2012-02-03
Posts: 17

Re: USB-Controller crashes after increasing webcam resolution

Same thing here. These are my USB details (from lshw):

                    *-usbhost:1
                         product: xHCI Host Controller
                         vendor: Linux 5.15.7-arch1-1 xhci-hcd
                         physical id: 1
                         bus info: usb@4
                         logical name: usb4
                         version: 5.15
                         capabilities: usb-3.10
                         configuration: driver=hub slots=2 speed=10000Mbit/s
                       *-usb
                            description: Video
                            product: Logitech StreamCam
                            vendor: Logitech, Inc.
                            physical id: 1
                            bus info: usb@4:1
                            version: 3.17
                            serial: D9B16355
                            capabilities: usb-3.20
                            configuration: driver=usbhid maxpower=896mA speed=5000Mbit/s

Plugged into the single USB-C connector at the back of the motherboard (CROSSHAIR VI HERO).

Last edited by wasperen (2021-12-14 07:35:47)

Offline

#12 2023-03-09 08:15:51

skarmoutsosv
Member
Registered: 2023-03-09
Posts: 1

Re: USB-Controller crashes after increasing webcam resolution

The post#10 by jpetazzo helped me solve Brio 300 webcam connectivity problems by only trying other usb ports of my system.

jpetazzo wrote:

For what it's worth, I have seen similar problems with the same webcam:

Bus 002 Device 002: ID 046d:0893 Logitech, Inc. Logitech StreamCam

There appears to be "good" and "bad" USB ports, and the following things can happen.

If I plug the webcam in a "good" USB port, it is then detected as USB 3 and works perfectly, including at high resolutions + high framerates (1080p/30fps).

If I plug the webcam in a "bad" USB port, then there are two possibilities: it can be detected as USB 2, or as USB 3.

If it is detected as USB 3, then it won't work: as soon as I try to use it, it hangs, and I get various error messages in the kernel log.

Here is a fresh example of that kind of error, obtained on one of my machines:

Jun 03 14:56:49 zavtra kernel: xhci_hcd 0000:01:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13
Jun 03 14:56:49 zavtra kernel: xhci_hcd 0000:01:00.0: Looking for event-dma 00000000fecfe080 trb-start 00000000fecfe070 trb-end 00000000fecfe070 seg-start 00000000fecfe000 seg-end 00000000fecfeff0
(These two lines repeated 10+ times)

If it is detected as USB 2, then it will work, but only at USB 2 speeds; so if I try to do 1080p in YUYV, I'm limited to 5 fps, for instance.

Now, what are the "good" and "bad" USB ports? Here is the list I have so far.

The "good" USB ports:
- the USB Type-C port on machine "bolshoy" (Intel desktop, motherboard: MSI MPG Z390M)
- the 5 Gb/s USB Type-C port on my Caldigit TS3+ thunderbolt hub, connected to a laptop
- the 5 Gb/s USB Type-A port (+adapter) on that same thunderbolt hub
- the USB Type-A ports (+adapter) on the USB hub on my Samsung 32TU87 screen

The "bad" USB ports are:
- the 10 Gb/s USB-C Type-C port on my Caldigit TS3+ thunderbolt hub
- any USB port (USB Type-A or Type-C) on machine "zavtra" (AMD desktop, motherboard: AORUS B550)

It looks like the "bad" USB ports are the ones capable of doing 10 Gb/s USB 3. (I couldn't get 100% confirmation, but since machine "zavtra" is relatively recent, I think all the USB ports there are USB 3.2.) This could mean that the camera doesn't negotiate USB 3.2 capabilities correctly, and the problem doesn't happen when using an "older" USB 3.0 (or maybe 3.1) port.

Additional info:

- When plugging the StreamCam on the 10 Gb/s USB Type-C port on my Caldigit hub, I get the "xHCI host controller not responding, assume dead" too
- I'm not sure what determines if the camera gets detected as USB 2 or USB 3; it looks like if it gets in trouble, it will then be detected as USB 2 for a while; but if I wait a bit (or perhaps plug it to a "good" port in between?) then it will be detected again as USB 3.

I'm sorry that a lot of the language above is a bit vague, but a lot of these behaviors appear to be non-deterministic; for instance, I was able to get the camera to work correctly (1080p/30fps) at least once in a "bad" port (one of the USB Type-A ports on the modern AMD machine), but it was at a point when I wasn't very rigorous with my tests, and it might be that the camera had switched to MJPEG (which works in 1080p/30fps over USB 2) instead of YUYV (which requires USB 3 for that resolution and framerate).

My plan for now is to try to use the camera through the USB hub on my screen and see if it's stable. (I prefer to connect the cameras directly to my machine to avoid bandwidth issue, but if that's the only solution...?)

Offline

Board footer

Powered by FluxBB