Skip to content

Instantly share code, notes, and snippets.

@rekby
Created December 3, 2018 07:57
Show Gist options
  • Save rekby/0f0859bca9c80d6b8fc52ec13b3b0772 to your computer and use it in GitHub Desktop.
Save rekby/0f0859bca9c80d6b8fc52ec13b3b0772 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Workaround for https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1784152
# Copy the script to /lib/systemd/system-sleep/reload-dell-touchpad.sh
SUSPEND_MODULES="i2c_hid"
case $1 in
pre)
for mod in $SUSPEND_MODULES; do
rmmod $mod
done
;;
post)
for mod in $SUSPEND_MODULES; do
modprobe $mod
done
;;
reload)
for mod in $SUSPEND_MODULES; do
rmmod $mod
modprobe $mod
done
;;
esac
@jbroadus
Copy link

The ability to reprobe i2c-hid is broken in 4.20, but a fix was accepted into 5.1.

You can also apply this patch to fix issue all together if you're building your own kernel:
https://lore.kernel.org/lkml/[email protected]/raw

@subdiff
Copy link

subdiff commented Mar 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment