Touchpad not working on Debian after suspend/hibernate

Touchpad doesn’t work after suspend/hibernate on Debian, I ran into this issue a while ago when I installed Debian on my MSI GT70 DRAGON EDITION laptop, this probably will apply for other laptops too.

Turns out the solution is simple, you just need to reinitialize the touchpad, can be done by simple commands.

modprobe -r psmouse
modprobe psmouse

Now it will work, but let’s see if we can make it automated.

So firstly let’s install some prerequisites before continuing.

apt-get install pm-utils

After installing you should create the following file.

/etc/pm/sleep.d/00_trackpad

#!/bin/sh
case "$1" in
    suspend|hibernate)
         modprobe -r psmouse ;;
    resume|thaw)
        modprobe psmouse ;;
        synclient TouchpadOff=0 ;;
esac

Now suspend and hibernate will work properly when you resume the system.

Some DMI information about my system

$ grep '.*' /sys/class/dmi/id/*_* 2>/dev/null
/sys/class/dmi/id/bios_date:11/08/2012
/sys/class/dmi/id/bios_vendor:American Megatrends Inc.
/sys/class/dmi/id/bios_version:E1762IMS.70T
/sys/class/dmi/id/board_asset_tag:To be filled by O.E.M.
/sys/class/dmi/id/board_name:MS-1762
/sys/class/dmi/id/board_serial:BSS-0123456789
/sys/class/dmi/id/board_vendor:Micro-Star International Co., Ltd.
/sys/class/dmi/id/board_version:REV:1.0
/sys/class/dmi/id/chassis_asset_tag:No Asset Tag
/sys/class/dmi/id/chassis_serial:None
/sys/class/dmi/id/chassis_type:10
/sys/class/dmi/id/chassis_vendor:Micro-Star International
/sys/class/dmi/id/chassis_version:N/A
/sys/class/dmi/id/product_name:GT70
/sys/class/dmi/id/product_serial:FFFFFFFF
/sys/class/dmi/id/product_uuid:00000000-0000-0000-0000-8C89A50783FA
/sys/class/dmi/id/product_version:REV:1.0
/sys/class/dmi/id/sys_vendor:Micro-Star International Co., Ltd.