systemd suspend/resume script

Had a question the other day; a friend’s laptop would lose the trackpad after resume so his solution was to insert the module manually. Well, systemd has systemd-suspend.service which can handle those events. Details in man systemd-suspend.service

Place a script in /lib/systemd/system-sleep/ and make it executable. Any scripts in that directory will be called upon suspend (passing the parameter pre) and will be called again upon resume (passing the parameter post.) A sample script:

#!/bin/sh
if [ "${1}" = "pre" ]; then
# about to suspend …
echo "suspend event at $(date)…" > /tmp/suspend_test
elif [ "${1}" = "post" ]; then
# about to resume …
echo "resume event at $(date) …" >> /tmp/suspend_test
fi

Now, my keyboard backlight settings get saved and restored correctly on suspend/resume.

END

AZLOCO Meeting Date Changes

Effective 17 February, the Ubuntu Arizona Local Community Team (AZLOCO) will only hold on line meetings on the 1st and 3rd Sundays of each month. The time, 9:00-9:30 pm, and of course the IRC channel, #ubuntu-us-az on freenode.net, will remain the same. This change is the result of several factors, the low attendance at the on line meetings and the apparent repetitive release of information. The meeting notes will continue to be sent to those members who have subscribed to the AZLOCO mailing list.