After suffering for too long, I sought answers, and found these Launchpad bugs helpful:
- [Thinkpad Twist] resumes immediately after suspend
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1309938 - Lenovo Thinkpad Twist: Suspend does not work
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1213233 - [Lenovo Thinkpad Twist] Won't stay suspended after first suspend
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1316221
For a while, I was just doing the suboptimal:
- # for i in EHC1 EHC2 XHC; do echo "$i" > /proc/acpi/wakeup; done
after restarting.
I got bored with the 5 seconds it took to run that each time I rarely restarted, so I looked into boot scripts for systemd:
So, now I have:
- /etc/systemd/system/toggle-wakeup-devices.service
Which contains:
[Unit]
[Service]
ExecStart=/usr/local/bin/toggle-wakeup-devices.sh
[Install]
WantedBy=default.target
And I have
- /usr/local/bin/toggle-wakeup-devices.sh
Which contains:
#!/bin/sh
for i in EHC1 EHC2 XHC; do
echo "$i" > /proc/acpi/wakeup;
done
This still isn't quite optimal. (Would be nice to work out an appropriate patch to fix this behaviour for all users and submit it, rather than a workaround.) But I have a Masters to finish, and this is sufficient for me for now. :)
Keine Kommentare:
Kommentar veröffentlichen