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
相关推荐
晨非辰1 分钟前
Linux终端输出哲学:从回车换行到进度条实战,掌握缓冲区刷新与ANSI控制,告别输出延迟焦虑
linux·运维·服务器·c++·人工智能·后端·自动化
杜子不疼.11 分钟前
Linux 部署 RocketMQ 实操:从内网到公网,搞定远程消息服务
linux·运维·人工智能·rocketmq
!沧海@一粟!12 分钟前
麒麟V10Sp3系统部署Zabbix7.0全攻略
linux·运维
一叶星殇14 分钟前
解决IIS无法支持APK文件的下载
运维·服务器
YXWik619 分钟前
Linux 环境 libreoffice 执行word转pdf 中文乱码问题
linux·pdf·word
袖手蹲20 分钟前
Arduino UNO Q 板载 Nanobot 自动化编程指南之一
运维·自动化
早安试言20 分钟前
【了解】对话指令详解
服务器·python
老星*21 分钟前
Umami:轻量级开源网站分析工具,打造隐私友好的Google Analytics替代方案
运维·安全·开源
bai_lan_ya22 分钟前
嵌入式linux--文件IO中dup/dup2的使用
linux·运维·服务器
雪碧聊技术22 分钟前
前端项目部署到服务器
服务器·nginx·ubuntu·前端项目部署