#!/bin/bash . /usr/lib/pm-utils/functions case "$1" in hibernate|suspend) modprobe -r psmouse echo -n "i8042" >/sys/bus/platform/drivers/i8042/unbind echo mem > /sys/power/state #modprobe -r i8042 ;; thaw|resume) sleep 1 echo -n "i8042" >/sys/bus/platform/drivers/i8042/bind modprobe psmouse #modprobe i8042 ;; *) ;; esac exit $?