Skip to content

Instantly share code, notes, and snippets.

@alezhu
Last active December 25, 2018 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alezhu/d6daa7f359d7037d20ecdf2782fd523c to your computer and use it in GitHub Desktop.
Save alezhu/d6daa7f359d7037d20ecdf2782fd523c to your computer and use it in GitHub Desktop.
GMOLO touchpad
[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
#! /bin/bash
sudo echo "on" > /sys/bus/i2c/devices/i2c-HTIX5288\:00/power/control
sudo rmmod i2c-hid
sudo modprobe i2c-hid
#!/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