P5 Glove:Linux

=Input device weirdness=

When unplugging the glove, the USB subsytem may go crazy and deny you control of your mouse pointer/make it behave erratically. Re-initialising the USB subsystem tends to sort this out.

Writing a small shell script to do this is probably best. For example:


 * 1) !/bin/bash

LOGGER="/usr/bin/logger -t P5UNLOADER"
 * 1) This will write message out to your system log. /var/log/messages or whatever.

$LOGGER "Unloading kernel modules"

modprobe -r ehci_hcd modprobe -r uhci_hcd modprobe -r usb_storage modprobe -r usbmouse modprobe -r usbkbd modprobe -r usbhid
 * 1) You need to change the lines below to reflect USB dependancies on your system.
 * 2) Examine the output of lsmod for details.  If you do not see USB modules, you
 * 3) need to recompile your kernel so that USB support is modular and not compiled
 * in, otherwise rebooting will be required to achieve the same effect.

$LOGGER "Unmounting /proc/bus/usb"

umount /proc/bus/usb

modprobe -r usbcore

modprobe usbcore

$LOGGER "Remounting /proc/bus/usb"

mount -t usbfs usbfs /proc/bus/usb

$LOGGER "Reloading kernel modules"

modprobe ehci_hcd modprobe uhci_hcd modprobe usb_storage modprobe usbmouse modprobe usbkbd modprobe usbhid
 * 1) Again, change the lines below to reflect the modules on your system

Edit the script to your needs and put it somewhere sensible (mine lives at /usr/local/bin/recoverfromglove). Run it as root to regain control of your input devices (don't forget to chmod +x it first). Occasionally, even after running it you'll need to click a bit before left/right click works properly.