Article 4S5JK Reconnecting Trackpad on wake up from sleep

Reconnecting Trackpad on wake up from sleep

by
sniff
from LinuxQuestions.org on (#4S5JK)
Dear all,

I have laptop that is mostly great with Ubuntu but sometimes when it wakes from sleep the mouse buttons above the trackpad don't work.

Its a Lenovo Thinkpad X1 Carbon (6th gen with the high res screen).

To get it to work again I run the following little script.

Code:#!/bin/bash
echo -n "none" | sudo tee /sys/bus/serio/devices/serio1/drvctl
echo -n "reconnect" | sudo tee /sys/bus/serio/devices/serio1/drvctlI tried putting this in a pam utils script, below, but it doesn't work. Anyone know where I might have gone wrong?

I put it here /usr/lib/pm-utils/sleep.d/95-trackpad

Code:#!/bin/bash
#reconnects trackpad after sleep

. "${PM_FUNCTIONS}"

case "$1" in
resume|thaw)
echo -n "none" | sudo tee /sys/bus/serio/devices/serio1/drvctl
echo -n "reconnect" | sudo tee /sys/bus/serio/devices/serio1/drvctl
*) exit $NA
;;
esac

exit 0latest?d=yIl2AUoC8zA latest?i=1WRBtUS8H5M:oaiX6mgzPPw:F7zBnMy latest?i=1WRBtUS8H5M:oaiX6mgzPPw:V_sGLiP latest?d=qj6IDK7rITs latest?i=1WRBtUS8H5M:oaiX6mgzPPw:gIN9vFw1WRBtUS8H5M
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments