[Barry-devel] Fix for charging icon bug
Status: Beta
Brought to you by:
ndprojects
From: Chris F. <cd...@fo...> - 2007-08-17 20:35:23
|
Hi folks, Well, this took way too long to figure out. :-) 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. On these systems, it seems that even after bcharge is run, the kernel suspends the Blackberry. You can determine this by cat'ing the power/state file. If it says 2, it is suspended, and the charge icon is likely off. You can resume normal operation by doing: echo -n 0 > /sys/bus/usb/devices/usb..../power/state The proper path for your device will show up in the 'dmesg' output, like this: usb 3-2: new full speed USB device using uhci_hcd and address 5 PM: Adding info for usb:3-2:1.0 In this case, the command would be: echo -n 0 > /sys/bus/usb/devices/usb3/3-2/power/state The -n is important, since echo adds a newline to its output, and the kernel will balk at that. Now to find a user-friendly way to do this automatically... :-) - Chris |