Skip to content

Instantly share code, notes, and snippets.

@PoisonousJohn
Created October 4, 2019 13:39
Show Gist options
  • Save PoisonousJohn/f53674abaaec7ea6ada02f08c06d0fb4 to your computer and use it in GitHub Desktop.
Save PoisonousJohn/f53674abaaec7ea6ada02f08c06d0fb4 to your computer and use it in GitHub Desktop.
Restore touchpad for Lenovo X1 gen 6
# from: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1791427
# /etc/systemd/system/touchpad-sleep.service
# restore touchpad on suspend
[Unit]
Description=Restore Touchpad on suspend
Before=sleep.target
StopWhenUnneeded=yes
[Service]
#Type=oneshot
Type=idle
RemainAfterExit=yes
ExecStart=/bin/bash -c 'echo "0000:00:1f.4" > /sys/bus/pci/drivers/i801_smbus/unbind'
ExecStop=/bin/bash -c 'echo "0000:00:1f.4" > /sys/bus/pci/drivers/i801_smbus/bind'
[Install]
WantedBy=sleep.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment