Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/lib/systemd/system-sleep/resume-x1-fix.sh
#!/bin/sh
if [ "$2" = "suspend" ] || [ "$2" = "resume" ]; then
case "$1" in
post)
# Reconnecting dead trackpad
echo -n "none" | sudo tee /sys/bus/serio/devices/serio1/drvctl
echo -n "reconnect" | sudo tee /sys/bus/serio/devices/serio1/drvctl
sleep 1
# Reset Yukico
echo '1-2'|sudo tee /sys/bus/usb/drivers/usb/unbind
sleep 1
echo '1-2'|sudo tee /sys/bus/usb/drivers/usb/bind
;;
suspend|hibernate)
;;
esac
fi
@PombeirP

This comment has been minimized.

Copy link
Owner Author

PombeirP commented Jul 2, 2018

[Desktop Entry]
Type=Application
Terminal=true
Name=Resume
Exec=sudo /lib/systemd/system-sleep/resume-x1-fix.sh post suspend
Icon=/lib/systemd/system-sleep/reset.png
@PombeirP

This comment has been minimized.

Copy link
Owner Author

PombeirP commented Sep 9, 2018

This file is not needed anymore after BIOS update 1.30, and can be replaced with https://gist.github.com/PombeirP/672de499389d216312fc3d0d6cc2e932. Only trackpad still has issues sometimes and needs to be reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.