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.

Revisions

  1. Ivan Fateev created this gist Oct 4, 2019.
    18 changes: 18 additions & 0 deletions touchpad-sleep.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    # 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