USB Power Management

This is quite useful – if your USB connector times out your device connected to the Ubuntu machine (from here) – determine the idea using either

lsusb

or

lspci

It’s pretty self-explanatory…

105		The user interface for dynamic PM
106		---------------------------------
107
108	The user interface for controlling dynamic PM is located in the power/
109	subdirectory of each USB device's sysfs directory, that is, in
110	/sys/bus/usb/devices/.../power/ where "..." is the device's ID.  The
111	relevant attribute files are: wakeup, level, and autosuspend.
112
113		power/wakeup
114
115			This file is empty if the device does not support
116			remote wakeup.  Otherwise the file contains either the
117			word "enabled" or the word "disabled", and you can
118			write those words to the file.  The setting determines
119			whether or not remote wakeup will be enabled when the
120			device is next suspended.  (If the setting is changed
121			while the device is suspended, the change won't take
122			effect until the following suspend.)
123
124		power/level
125
126			This file contains one of three words: "on", "auto",
127			or "suspend".  You can write those words to the file
128			to change the device's setting.
129
130			"on" means that the device should be resumed and
131			autosuspend is not allowed.  (Of course, system
132			suspends are still allowed.)
133
134			"auto" is the normal state in which the kernel is
135			allowed to autosuspend and autoresume the device.
136
137			"suspend" means that the device should remain
138			suspended, and autoresume is not allowed.  (But remote
139			wakeup may still be allowed, since it is controlled
140			separately by the power/wakeup attribute.)
141
142		power/autosuspend
143
144			This file contains an integer value, which is the
145			number of seconds the device should remain idle before
146			the kernel will autosuspend it (the idle-delay time).
147			The default is 2.  0 means to autosuspend as soon as
148			the device becomes idle, and -1 means never to
149			autosuspend.  You can write a number to the file to
150			change the autosuspend idle-delay time.
151
152	Writing "-1" to power/autosuspend and writing "on" to power/level do
153	essentially the same thing -- they both prevent the device from being
154	autosuspended.  Yes, this is a redundancy in the API.