linux USB摄像头不停掉线问题

1.T507板子上面接了一个usb接口的RGB摄像头,发现RGB摄像头有时候一开机就掉线了,或者跑一会掉线,dmesg看到的现象如下

复制代码
    sunxi-ehci 5101000.ehci0-controller: ehci_irq: highspeed device disconnect

    sunxi-ehci 5101000.ehci0-controller: ehci irq: highspeed device connect

    usb 1-1: USB disconnect, device number 2

    uvcvideo: Failed to resubmit video URB (-19).
   
    uvcvideo: Failed to resubmit video URB (-19).
	
	uvcvideo: Failed to resubmit video URB (-19).
	
	uvcvideo: Failed to resubmit video URB (-19).
	
	uvcvideo: Failed to resubmit video URB (-19).
    
    sunxi-ehci 5101000.ehci0-controller: ehci_irq: highspeed device connect

    usb 1-1: new high-speed USB device number 3 using sunxi-ehci
    
    usb 1-1: device descriptor read/64, error -71
    
    usb 1-1: device descriptor read/64, error -71

    usb 1-1: new high-speed USB device number 4 using sunxi-ehci
	
    usb 1-1: device descriptor read/64, error -71

    uvcvideo: Found UVC 1.00 device DECXIN CAMERA (1bcf:2cd1)
 
    uvcvideo 1-1:1.0: Entity type for entity Extension 4 was not initialized!

    uvcvideo 1-1:1.0: Entity type for entity Extension 3 was not initialized!
   
    uvcvideo 1-1:1.0: Entity type for entity Processing 2 was not initialized!
    uvcvideo 1-1:1.0: Entity type for entity Camera 1 was not initialized!
	
	input: DECXIN CAMERA as /devices/platform/soc/5101000.ehci0-controller/usb1/1-1/1-1:1.0/input/input6

2.后面观察到,usb会不停的掉线,上线

3.应用层是通过固定的设备节点/dev/video4去读取RGB图像的,RGB一掉线,出图节点就变成了/dev/video5,导致应用层读取不到RGB图像了。

4.解决办法,查询了AI,禁用 USB 电源管理(排除 autosuspend)就没出现这个问题了。

复制代码
# 一次性禁用所有 USB 设备的 suspend
for f in /sys/bus/usb/devices/*/power/control; do
    echo 'on' > "$f"
done
相关推荐
悠悠1213827 分钟前
告别Zabbix?我用Netdata只花10分钟就搞定了50台服务器的秒级监控(保姆级实战)
运维·服务器·zabbix
天庭鸡腿哥41 分钟前
大小只有4K的软件,可让系统瞬间丝滑!
运维·服务器·windows·microsoft·everything
虚伪的空想家1 小时前
华为昇腾Atlas 800 A2物理服务器开启VT-d模式
运维·服务器·ubuntu·kvm·vt-d·直通
学渣676561 小时前
服务器端口映射
运维·服务器
红袜子i1 小时前
【问题】实验室服务器恢复记录,一个主板挂两张显卡,
运维·服务器
S***q1921 小时前
DevOps在云中的云计算
运维·云计算·devops
h***01542 小时前
Docker启动安装nacos(详情讲解,全网最细)
运维·docker·容器
z***94842 小时前
Linux下安装Nginx服务及systemctl方式管理nginx详情
linux·运维·nginx
默恋~微凉2 小时前
Nginx(十一)——反向代理与负载均衡
运维·nginx·负载均衡
凉晓风2 小时前
Linux上TCP通信异常排查工具命令
linux·运维·tcp/ip