2020年5月11日 星期一

usb

cat   /sys/bus/usb/
kernel給的訊息會有點像是usb device插拔的訊息,所以可能是跟suspend & wake up有關
雖然不知道為何在3.18還有碰到這問題,但就朝這方面解決

The article is COPY from Here
What is Remote Wakeup?
When a device has been suspended, it generally doesn’t resume until the computer tells it to. Likewise, if the entire computer has been suspended, it generally doesn’t resume until the user tells it to, say by pressing a power button or opening the cover.

However some devices have the capability of resuming by themselves, or asking the kernel to resume them, or even telling the entire computer to resume. This capability goes by several names such as “Wake On LAN”; we will refer to it generically as “remote wakeup”. When a device is enabled for remote wakeup and it is suspended, it may resume itself (or send a request to be resumed) in response to some external event. Examples include a suspended keyboard resuming when a key is pressed, or a suspended USB hub resuming when a device is plugged in.

lsusb -v | grep -i "remote wakeup"

The article is COPY from Here
When is a USB device idle?
A device is idle whenever the kernel thinks it’s not busy doing anything important and thus is a candidate for being suspended. The exact definition depends on the device’s driver; drivers are allowed to declare that a device isn’t idle even when there’s no actual communication taking place. (For example, a hub isn’t considered idle unless all the devices plugged into that hub are already suspended.) In addition, a device isn’t considered idle so long as a program keeps its usbfs file open, whether or not any I/O is going on.

If a USB device has no driver, its usbfs file isn’t open, and it isn’t being accessed through sysfs, then it definitely is idle.

ref: 

沒有留言:

張貼留言