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
相关推荐
爬山算法5 小时前
Netty(10)Netty的粘包和拆包问题是什么?如何解决它们?
服务器·网络·tcp/ip
Sleepy MargulisItG5 小时前
【Linux网络编程】应用层协议:HTTP协议
linux·服务器·网络·http
logic_55 小时前
静态路由配置
运维·服务器·网络
G31135422735 小时前
Linux 内核设计中的核心思想与架构原则
linux·架构·php
zhuzewennamoamtf5 小时前
Linux内核platform抽象、数据结构、内核匹配机制
linux·运维·数据结构
门思科技5 小时前
企业级 LoRaWAN 网关远程运维方案对比:VPN 与 NPS FRP 的技术与安全差异分析
运维·网络·安全
云和数据.ChenGuang5 小时前
Deepseek 持续迭代的模型
运维·运维技术·数据库运维工程师·运维教程
物联网软硬件开发-轨物科技6 小时前
【轨物方案】聚焦锯床设备智能化升级,打造工业互联网新范式
运维·科技·物联网
suzhou_speeder6 小时前
企业数字化网络稳定运行与智能化管理解决方案
运维·服务器·网络·交换机·poe·poe交换机
Kira Skyler6 小时前
ELF文件解析 elf.o 文件主要内容.md
linux