Skip to content

Instantly share code, notes, and snippets.

@bitjockey42
Created June 14, 2015 09:03
Show Gist options
  • Save bitjockey42/6892f0de1475c6942b89 to your computer and use it in GitHub Desktop.
Save bitjockey42/6892f0de1475c6942b89 to your computer and use it in GitHub Desktop.
xf86-input-mtrack suspend fix

This is a workaround for the xf86-input-mtrack driver, which fails to load when you resume from suspend. Basically just adds a systemd service

The key is to reload the bcm5974 module on system resume.

Put touchpad_resume.sh into /opt/custom_scripts/touchpad_resume.sh. Make executable: chmod +x /opt/custom_scripts/touchpad_resume.sh.

Put reload-touchpad.service file in /etc/systemd/system/. Then enable it: systemctl enable reload-touchpad.service.

[Unit]
Description=Fix touchscreen after resume
After=suspend.target display-manager.service
[Service]
Type=simple
ExecStart=/opt/custom_scripts/touchpad_resume.sh
[Install]
WantedBy=suspend.target
#!/usr/bin/env sh
# Reloads the bcm5974 module
/usr/sbin/rmmod bcm5974
/usr/sbin/modprobe bcm5974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment