Last active
December 25, 2018 20:36
-
-
Save alezhu/d6daa7f359d7037d20ecdf2782fd523c to your computer and use it in GitHub Desktop.
GMOLO touchpad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=HTIX5288 driver workaround | |
Conflicts=getty@tty1.service | |
After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service systemd-logind.service suspend.target | |
[Service] | |
ExecStart=/usr/local/bin/touchpad.sh | |
[Install] | |
WantedBy=multi-user.target suspend.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
sudo echo "on" > /sys/bus/i2c/devices/i2c-HTIX5288\:00/power/control | |
sudo rmmod i2c-hid | |
sudo modprobe i2c-hid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "start ${1} ${2} at $(date)" >> /tmp/touchpad2.txt | |
if [ "${1}" = "pre" ] | |
then | |
echo "suspend at $(date)" >> /tmp/suspend_at.txt | |
elif [ "${1}" = "post" ] | |
then | |
echo "resume at $(date)" >> /tmp/resume_at.txt | |
echo "on" > /sys/bus/i2c/devices/i2c-HTIX5288\:00/power/control | |
rmmod i2c-hid >> /tmp/resume_at.txt | |
modprobe i2c-hid >> /tmp/resume_at.txt | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment