On 04/01/2016 09:59 AM, Patrick O'Callaghan wrote:
On Fri, 2016-04-01 at 10:27 -0600, jd1008 wrote:
> I have had the same problem. So, what I do is unmount the plugin,
> remove it, and then hibernate.
Not really feasible when the device is used by the mouse, and in any
case it wouldn't gain anything over what I'm doing now.
I think this has to do with the driver binding. I saw a script in one
of the ubuntu fora that looked like it might to the trick. The link is
http://askubuntu.com/a/549571
In a nutshell, he created a script that would be executed entering and
exiting sleep that would unbind the ehci or uhci module on sleep, and
rebind it on wake. He put the script in
/etc/pm/sleep.d/20_usb_suspend_fix
and here is the content:
---------------- CUT HERE ---------------------------------------
#!/bin/sh
LOGTAG=PwrUsbFix
UNDO=/var/run/pm-utils/pm-suspend/storage/rebind_usb.sh
# check am root
[ "$(id -u)" = 0 ] || {
echo "$LOGTAG : must be run as root!"
exit 1
}
case "${1}" in
hibernate|suspend)
: > ${UNDO}
find /sys/bus/pci/drivers -maxdepth 2 -path \*\[eu\]hci\* -name
unbind | cut -d\/ -f -6 | \
while read BUS ; do
find ${BUS} -maxdepth 1 -type l -name 00\* | \
while read DEVPATH ; do
DEVICE=`basename $DEVPATH`
echo "$LOGTAG : echo ${DEVICE} > ${BUS}/unbind"
echo -n "${DEVICE}" > ${BUS}/unbind
echo "echo \"${LOGTAG} ${DEVICE} >
${BUS}/bind\"" >> ${UNDO}
echo "echo -n \"${DEVICE}\" > ${BUS}/bind"
>>
${UNDO}
done
done
;;
resume|thaw)
. ${UNDO}
;;
esac
exit 0
---------------- CUT HERE ---------------------------------------
For Fedora use, I'd change the location defined in "UNDO" as that
directory isn't present on Fedora. I'd suggest something like:
UNDO=/usr/local/bin/rebind_usb.sh
I have NOT tested this but it might be something worth trying.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ricks(a)alldigital.com -
- AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 -
- -
- The gene pool could use a little chlorine. -
----------------------------------------------------------------------