linux下找usb目录,linux – 在USB设备sysfs目录中找不到`power / ...

正如在答案结束时所指出的,这可能已经开始了. (当Q发布时.)

另请注意,由于没有回答,交叉职位已经关闭 – 因此最适合在此发布.我想其他人可以利用这些信息.

您链接的文档say(强调我的):

[…]

Note that the “USB-persist” feature will be applied only to those

devices for which it is enabled. You can enable the feature by doing

(as root):

echo 1 >/sys/bus/usb/devices/…/power/persist

where the “…” should be filled in the with the device’s ID. Disable

the feature by writing 0 instead of 1. For hubs the feature is

automatically and permanently enabled and the power/persist file

doesn’t even exist, so you only have to worry about setting it for

devices where it really matters.

换句话说:(似乎)你试图为集线器设置它,这两者都是冗余的 – 因为它总是被设置,并且不可能因为文件不存在.

要查看实际具有持久文件的路径,请执行以下操作:

$ls -l /sys/bus/usb/devices/*/power/persist

检查状态:

$tail /sys/bus/usb/devices/*/power/persist

如果您使用lsusb来识别设备正确的路径

/sys/bus/usb/devices/-/power/persist

>< BUS>来自lsusb

>< DEVAT>你可以通过以下方式匹配来自lsusb的设备:

$tail -*/devnum

或检查dmesg等,例如:

$dmesg | grep -iA3 "new usb"

您也可以通过例如验证:

$udevadm info -q all -p /sys/bus/usb/devices/-

内核2.6.26-rc5默认将persist策略更改为on.

默认情况下,某些引用的更改为启用:

实施:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值