Re: [Barry-devel] Fix for charging icon bug
Status: Beta
Brought to you by:
ndprojects
From: Chris F. <cd...@fo...> - 2007-08-17 21:52:00
|
On Fri, Aug 17, 2007 at 04:37:48PM -0400, Martin Owens wrote: > > If you are running a kernel with CONFIG_USB_SUSPEND enabled, then > > your system will have a /sys/bus/usb/devices/usb.../.../power > > directory that contains two files: state and wakeup. > > Can you do this with udev/dbus configuration? I wrote a script that took the udev %p argument on the command line, like this: BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0001", SYMLINK+="bb-%k", GROUP="plugdev", MODE="0660", RUN="/tmp/cap.sh %p" Then in the script, you could run: bcharge sleep 5s # seems to be needed... you can play with this echo -n 0 > "/sys/$1/device/power/state" - Chris |