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
相关推荐
fiveym1 分钟前
持续交付与持续部署(CD)深度解析:定义差异、流程架构与交付模式对比
运维·ci/cd·架构
PascalMing3 分钟前
ubuntu 24.04安装dotnet 10日志
linux·运维·ubuntu·dotnet10
optimistic_chen8 分钟前
【Docker入门】容器技术
linux·运维·服务器·docker·容器
Lueeee.9 分钟前
2.智梯云枢・全维管控广告系统——解决串口卡顿 + 优化稳定性
linux·运维·服务器
南行*10 分钟前
C语言Linux环境编程
linux·c语言·开发语言·网络安全
海清河晏11110 分钟前
Linux进阶篇:HTTP协议
linux·运维·http
June`13 分钟前
IO模型全解析:从阻塞到异步(高并发的reactor模型)
linux·服务器·网络·c++
ASS-ASH19 分钟前
快速处理虚拟机磁盘扩容问题
linux·数据库·vmware·虚拟机·磁盘扩容
AI_567819 分钟前
零基础学Linux:21天从“命令小白”到独立部署服务器
linux·服务器·人工智能·github
江湖有缘21 分钟前
Fenrus + Docker 实战:构建简洁高效的浏览器新标签页
运维·docker·容器