USB 2/3 issues

edited November 2018 in ROC-RK3328-CC

Hi,

I bought one of these boards specifically for the hardware H264 encoding - but I am having trouble way before I get to the point of encoding video. I am aiming to capture video and I am using a UVC compliant device, a Magewell USB 3 capture card, which works great on other machines. Very shortly after accessing/attempting to access the device, the USB subsystem appears to crash.

Image flashed to micro SD (8GB "industrial" Kingston) is Debian 9 Arch 64 from http://share.loverpi.com/board/libre-computer-project/libre-computer-board-roc-rk3328-cc/image/debian/ and apt update && apt upgraded - I am using this because the more current Ubuntu image from the same site is unusable once it's brought up to date, no GUI appears and the consoles reload frequently, displaying *ERROR* VOP vblank IRQ stuck for 10 ms briefly, preventing login.

firefly@firefly:~$ uname -a
Linux firefly 4.4.114-00004-gdfc5669-dirty #32 SMP Thu May 24 19:38:23 HKT 2018 aarch64 GNU/Linux

Plugging in the Magewell gives this in syslog:

Nov 13 18:18:05 firefly kernel: [  229.449780] usb 5-1: new SuperSpeed USB device number 2 using xhci-hcd
Nov 13 18:18:05 firefly kernel: [  229.461934] usb 5-1: New USB device found, idVendor=2935, idProduct=0001
Nov 13 18:18:05 firefly kernel: [  229.462707] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 13 18:18:05 firefly kernel: [  229.463391] usb 5-1: Product: XI100DUSB-HDMI
Nov 13 18:18:05 firefly kernel: [  229.463856] usb 5-1: Manufacturer: Magewell
Nov 13 18:18:05 firefly kernel: [  229.464342] usb 5-1: SerialNumber: A201160224597
Nov 13 18:18:05 firefly kernel: [  229.475467] uvcvideo: Found UVC 1.00 device XI100DUSB-HDMI (2935:0001)
Nov 13 18:18:05 firefly kernel: [  229.554922] hid-generic 0003:2935:0001.0004: hiddev0,hidraw3: USB HID v1.01 Device [Magewell XI100DUSB-HDMI] on usb-xhci-hcd.9.auto-1/input4
Nov 13 18:18:05 firefly pulseaudio[639]: [pulseaudio] module-udev-detect.c: Failed to open /proc/asound/card2: No such file or directory
Nov 13 18:18:06 firefly pulseaudio[639]: [pulseaudio] source.c: Default and alternate sample rates are the same.

So far, so good:

firefly@firefly:~$ ls -al /dev/video0
crw-rw----+ 1 root video 81, 0 Nov 13 18:18 /dev/video0
firefly@firefly:~$ ls -al /dev/v4l/by-path/
total 0
drwxr-xr-x 2 root root 60 Nov 13 18:18 .
drwxr-xr-x 4 root root 80 Nov 13 18:18 ..
lrwxrwxrwx 1 root root 12 Nov 13 18:18 platform-xhci-hcd.9.auto-usb-0:1:1.0-video-index0 -> ../../video0
firefly@firefly:~$ ls -al /dev/v4l/by-id/
total 0
drwxr-xr-x 2 root root 60 Nov 13 18:18 .
drwxr-xr-x 4 root root 80 Nov 13 18:18 ..
lrwxrwxrwx 1 root root 12 Nov 13 18:18 usb-Magewell_XI100DUSB-HDMI_A201160224597-video-index0 -> ../../video0

However when I run gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=800,height=600 ! autovideosink I will get either nothing (no video overlay), a single frame of video overlaid on top of everything, or up to a few seconds of video, and then it all goes pear shaped as shown in syslog: https://pastebin.com/V9wPvsrN

In the above example, I had no video at all appear. Below, after rebooting, I had a single video frame before it died:

firefly@firefly:~$ gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=800,height=600 ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, framerate=(fraction)30/1, width=(int)800, height=(int)600, format=(string)BGR, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, framerate=(fraction)30/1, width=(int)800, height=(int)600, format=(string)BGR, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, framerate=(fraction)30/1, width=(int)800, height=(int)600, format=(string)BGR, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms.GstPad:sink: caps = video/x-raw, framerate=(fraction)30/1, width=(int)800, height=(int)600, format=(string)BGR, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw, framerate=(fraction)30/1, width=(int)800, height=(int)600, format=(string)BGR, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, framerate=(fraction)30/1, width=(int)800, height=(int)600, format=(string)BGR, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:42.728832549
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
firefly@firefly:~$

Syslog following above command: https://pastebin.com/8GVPmPGt

(continued because it's too long ...)

Comments

  • Additionally (because it's also USB related), keypresses occasionally repeat seemingly at random (keyboard contains a USB hub and the mouse is connected to the keyboard, keyboard is connected to the lower of the two USB ports):

    Nov 13 18:30:59 firefly kernel: [  189.108393] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:01 firefly kernel: [  190.919207] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:02 firefly kernel: [  192.590224] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:03 firefly kernel: [  193.173225] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:04 firefly kernel: [  194.390250] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:04 firefly kernel: [  194.423247] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:04 firefly kernel: [  194.437235] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:04 firefly kernel: [  194.454250] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:04 firefly kernel: [  194.470254] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:04 firefly kernel: [  194.569231] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:04 firefly kernel: [  194.587232] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:04 firefly kernel: [  194.604225] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:04 firefly kernel: [  194.620229] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:05 firefly kernel: [  195.037251] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:05 firefly kernel: [  195.070274] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:06 firefly kernel: [  196.108376] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:06 firefly kernel: [  196.387262] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:06 firefly kernel: [  196.420244] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:06 firefly kernel: [  196.504276] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:06 firefly kernel: [  196.521251] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:06 firefly kernel: [  196.537280] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:07 firefly kernel: [  196.654244] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:07 firefly kernel: [  196.691734] dwmmc_rockchip ff500000.dwmmc: CTO timeout when already completed
    Nov 13 18:31:07 firefly kernel: [  196.725045] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:08 firefly kernel: [  198.089283] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:09 firefly kernel: [  199.021308] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:31:09 firefly kernel: [  199.038308] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    

    Also generated while moving the mouse (USB mouse, connected via USB keyboard):

    Nov 13 18:32:12 firefly kernel: [  262.341715] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:14 firefly kernel: [  264.207103] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:15 firefly kernel: [  264.888115] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:16 firefly kernel: [  266.471167] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:17 firefly kernel: [  266.690169] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:18 firefly kernel: [  268.575048] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:20 firefly kernel: [  269.637194] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:20 firefly kernel: [  269.653198] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:20 firefly kernel: [  269.691713] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:20 firefly kernel: [  270.008386] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:25 firefly kernel: [  274.801779] rockchip-vop ff370000.vop: [drm:vop_wait_for_irq_handler] *ERROR* VOP vblank IRQ stuck for 10 ms
    Nov 13 18:32:25 firefly kernel: [  275.108385] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:25 firefly kernel: [  275.121305] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:25 firefly kernel: [  275.137285] dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency
    Nov 13 18:32:25 firefly kernel: [  275.175059] dwmmc_rockchip ff500000.dwmmc: CTO timeout when already completed
    Nov 13 18:32:25 firefly kernel: [  275.341721] dwmmc_rockchip ff500000.dwmmc: CTO timeout when already completed
    

    I have no idea why the VOP vblank error can be made to appear while moving the mouse, but it's the same error display when trying to use the Ubuntu image after it's been updated.

    If I can provide any more information to help nail these issues please let me know.

  • It's been a week since posting, with no acknowledgement from Libre Computer. Is there not enough information to act on? Is there anything else I can try to get this to work?

  • Try Armbian: https://www.armbian.com/renegade/

    Allso you can get more recent patched kernels if you use armbian-config to turn branch to beta.
    The images provided by Firefly are bad.
    Libre Computer doesn't actually maintain the Renegade software, Firefly does

  • Tried Armbian, same issue. Even tried the dev kernel from armbian-config, which prevented it from booting entirely.

    I forgot to mention that the power supply I'm using is a genuine Raspberry Pi 5.1v/2.5A one. I have run out of ideas for now.

  • edited December 2018

    I will say this. I find this board just runs like garbage using SDCARDS. No matter how good the card is, Pro, Extreme, Whatever... Doesn't matter.

    I'm not saying that buying and using the eMMC will fix ur problem, but from my own experience, I have gotten better performance and seen less system errors using the eMMC.

    As a matter of fact, I've been trying to get the analog audio port to work using Armbian and have had success doing so with a custom kernel. But if I use the same image and kernel on an SDCARD the system will start getting read/write errors and eventually go into Read Only Mode. This has been tested on a SanDisk Extreme Pro and Samsung Evo and although the Sandisk does perform better it still eventually errors out.

    The eMMC... Flawless.

    This board has some problems that seems to go beyond just software.

  • Really? Just switching storage solved the issues for you? Nothing else changed? Thanks, will give that a shot, if I can work out how to write to it!

  • edited January 9

    Yeap... and I still have no idea as to why. I've actually been testing this on and off for while now trying to find solutions. I normally just use the board as a NAS, but I get bored from time to time and pull the eMMC and try different builds. Needless to say, I still haven't figured out why this is the case.

    During some testing today, I did find and bookmark a patch concerning the chip rk3328 that appeared in alsa-devel. Seems to be about the Mixer, which is something I've yet to be able to get working using Alsa. So at least on that front, someone besides myself has noticed that's missing. :)

    But I don't believe that relates to the read/write errors I get using SDCARDS once the analog port is enabled and active.

  • Tried using the eMMC instead. While there was a difference, sadly it's just that it ran for a handful of seconds longer before exhibiting the same symptoms as before, but this time the entire machine hangs.

  • Are you on Armbian or Firefly?

    Have you tried adding the usb device to "usbstoragequirks" in /boot/armbianEnv.txt?
    I don't know that it will help you, but I decided to add my usb hub to the list along with the 2TB drive I use and it seemed to stabilize things.

    In my testing I transferred a little less then 10G and didn't notice any problems or get any errors. I'm not 100% that it fixed the problem, but I haven't had any errors since.

    I realize this capture card isn't a storage device, but either is my usb hub, so I figured it's worth suggesting.

Sign In or Register to comment.