Archive for August, 2008

USB Power Management


2008
08.15

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.

Wine and MSI files (but you knew that already)


2008
08.11

So you’ve downloaded UltraEdit v14, arguably one of the best text-editing and code-editing environments in the Windows World (ok, so no IDE, but for that you’d use a Zend Studio offering), and you want to run it in Wine. Now, assuming you’re running Wine 1.0 (ideally 1.1.0 or later), this is not a problem on Ubuntu. Just the cursor keeps jumping… The ue_english.zip (or other language suffix) file contains the installer msi. How to run on Ubuntu? Quite a quick and simple process, just one line:

wine msiexec /i ue_english.msi

Hey presto, you’re done! Just follow the prompts. There will be one or two errors (downloading and installing UltraCompare – a practical, visual answer to diff throws some…) but it becomes sortof useable. Until UltraEdit for Linux (as per the forums) is released… Can’t wait!!