On Mon, Dec 07, 2015 at 05:02:34PM -0500, Alan Stern wrote: > On Mon, 7 Dec 2015, Josh Triplett wrote: > > > The following files appear under the power directory when plugged in via > > the dock: > > > > ~$ head /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/* > > ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/async <== > > enabled > > > > ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/runtime_active_kids <== > > 0 > > > > ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/runtime_enabled <== > > enabled > > > > ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/runtime_status <== > > suspended > > > > ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/2-3.1.2:1.1/power/runtime_usage <== > > 0 > > You're looking at the wrong files. The files to monitor are the ones > in /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power > (assuming that this device really is the mouse and not something else). > Handy shortcut link: /sys/bus/usb/devices/2-3.1.2/power. Based on the idVendor and idProduct in that directory, that device is the keyboard/mouse combo device, yes. That power directory has many more files, but nothing obvious: ~$ head /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/* ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/active_duration <== 235320 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/async <== enabled ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/autosuspend <== 2 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/autosuspend_delay_ms <== 2000 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/connected_duration <== 235320 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/control <== on ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/level <== on ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/persist <== 1 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/runtime_active_kids <== 0 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/runtime_active_time <== 235136 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/runtime_enabled <== forbidden ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/runtime_status <== active ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/runtime_suspended_time <== 0 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/runtime_usage <== 1 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/wakeup <== enabled ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/wakeup_abort_count <== 0 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/wakeup_active <== 0 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/wakeup_active_count <== 0 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/wakeup_count <== 0 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/wakeup_expire_count <== 0 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/wakeup_last_time_ms <== 21662182 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/wakeup_max_time_ms <== 0 ==> /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1.2/power/wakeup_total_time_ms <== 0 > For more information on what's happening, try collecting a usbmon trace > for bus 2 (see Documentation/usb/usbmon.txt). Done. I started a trace, plugged in the device, moved the mouse a little (which moved the pointer for a moment and then stopped producing any result), typed a couple of keys (which did work), moved the mouse a bit more (which didn't), and unplugged the device. Trace attached.
Attachment:
usbmon.pcapng.gz
Description: application/gzip