Restart Touchscreen after resume
Solution 1:
This same problem cropped up for me a few months ago on my Thinkpad Yoga 14, running Ubuntu 14.04: while the touchscreen/pen worked perfectly fine for over a year, no matter how many sleep/resume cycles, they stopped responding after sleep/resume sometime around December 2016 (presumably due to a change in an updated kernel?). Pen and touch still worked fine on initial boot, including the splash screen. Various suggestions from the web did not resolve the issue:
- Alt+Ctrl+F1 / Alt+Ctrl+F6 didn't work
-
sudo modprobe hid_multitouch
didn't work -
xinput disable/enable (touchscreen ID)
didn't work - I didn't even try the firmware upgrade, as pen/touch were obviously still functioning on fresh restart
Finally, buried deeply in some links that led to http://linuxwacom.sourceforge.net/wiki/index.php/Input-wacom , I found a solution which seems simple in hindsight: reloading the wacom and wacom_w8001 modules
sudo modprobe -r wacom
sudo modprobe -r wacom_w8001
sudo modprobe wacom
sudo modprobe wacom_w8001
You could write a script to automatically run this on resume; I just threw it in a shell script to run manually when necessary. Hope this helps someone
Solution 2:
/usr/sbin/rtcwake -m freeze -s 1
- does the trick for me!
Thanks to: (https://forums.lenovo.com/t5/Other-Linux-Discussions/X1Y3-Touchscreen-not-working-after-resume-on-Linux/td-p/4021200)
You can make a service that runs the script on system resume.
Create a file in /etc/systemd/system/
: e.g. wake_hack.service
:
[Unit]
Description=Wakeup
After=suspend.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/rtcwake -m freeze -s 1
[Install]
WantedBy=suspend.target
enable in standard way: (as root)
systemctl enable wake_hack.service