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.
Asked
Active
Viewed 131 times
2 Answers
1
Create a systemd service file: $ sudo nano /etc/systemd/system/resume-commands.service
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
- Save the file and close the editor.
- Reload the systemd manager configuration:
$ sudo systemctl daemon-reload
- Enable the service to run on system startup:
$ sudo systemctl enable resume-commands.service
- Reboot your system to apply the changes.
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