0

I am having a problem where 2 finger scrolling stops working after suspend. After a reboot it works fine again. I am running a Dell Inspiron 5515. I've gone through the forums where similar problems were discussed and tried the recommended fixes but nothing worked for me. I am new to Ubuntu and not very technical but I can follow instruction to paste commands into a terminal or edit files etc. Thanks in advance for any help or suggestions.

Jack
  • 11

2 Answers2

1
  1. Create a systemd service file: $ sudo nano /etc/systemd/system/resume-commands.service

  2. Add the following lines to the file:


[Unit]
Description=Run custom commands on resume
After=suspend.target

[Service] Type=simple ExecStart=/bin/bash -c "sudo modprobe -r hid-multitouch && sudo modprobe hid-multitouch"

[Install] WantedBy=suspend.target

  1. Save the file and close the editor.
  2. Reload the systemd manager configuration:
$ sudo systemctl daemon-reload
  1. Enable the service to run on system startup:
$ sudo systemctl enable resume-commands.service
  1. Reboot your system to apply the changes.
user68186
  • 37,461
Jack
  • 11
0

Create a file as
sudo vi /lib/systemd/system-sleep/tp-reset

Add the following lines to the file

#!/bin/bash

if [ "${1}" = "pre" ]; then

Do the thing you want before suspend here

echo "pre" elif [ "${1}" = "post" ]; then

Do the thing you want after resume here

/usr/sbin/rmmod hid_multitouch && /usr/sbin/modprobe hid_multitouch fi

Make it executable
sudo chmod +x /lib/systemd/system-sleep/tp-reset