I updated my Ubuntu system installation on a laptop. This went fine. I installed more memory. This went well. But on the second day, I discovered that my laptop had insomnia. It could not sleep. Close the lid? It’s still on. Laptops that won’t sleep do not travel well.
To cut a long story short (by not telling the long bits), neither the upgrade nor the additional memory caused the trouble, but a file left by the crummy “Validity Sensors” fingerprint scanner software did. Mind you, it didn’t work, so I should have removed it, but instead I forgot about it. Don’t buy Hewlett Packard laptops, as they use the USB device 138a:003d Validity Sensors, Inc. which is unsupported, except for this faulty binary-only software, which causes systems not to sleep.
The thing that gave it away after many days of trying to figure it out was these entries in /var/log/pm-suspend.log:
/etc/pm/sleep.d/ValidityServiceSuspend.sh suspend suspend: Returned exit code 1. Running hook /usr/lib/pm-utils/sleep.d/65ValidityServiceResume.sh resume suspend
The crummy HP/VFS sensors software added a file /etc/pm/sleep.d/ValidityServiceSuspend.sh that said:
#!/bin/bash . /usr/lib/pm-utils/functions suspend_FPS() { # Signal the vcsFPService about the suspend/hiberante echo " Sending Suspend Event" pkill -SIGUSR1 vcsFPService } case "$1" in hibernate|suspend) suspend_FPS ;; *) ;; esac exit $?
This code only works correctly when the vcsFPService is running. When it’s not running, then pkill returns an error, and exit $? passes it back up the chain (just like simply exiting the script would do – the fact that exit $? is always unnecessary at the end of a script, and yet is present, is an indication about the quality of this code). The program says “do not sleep unless you stop the fingerprint reader!”
So in summary, my computer couldn’t kill something, and it couldn’t sleep as a result.
For they cannot sleep unless they have done wrong;
they are robbed of sleep unless they have made someone stumble.
The fix was something like:
sed -i 's/exit $?/exit 0/' \ /etc/pm/sleep.d/ValidityServiceSuspend.sh \ /usr/lib/pm-utils/sleep.d/65ValidityServiceResume.sh
Being unsupported software, I can’t have it fixed. I am reduced to whining.