I'm working on lidsuspend in BW64 10.0.3. Like a number of puppies in my speckled past, in BW64 my hardware requires restartwm to be uncommented post suspend in /etc/acpi/actions/suspend.sh to get full functionality after a suspend. This behavior is kernel independent and occurs both in a pristine JWM install and in a very smooth LXDE via ydrv. Nothing new really. The restartwm works but loses whatever I was working on when I suspended.
I have narrowed the problem down to two things.
1: connman needs a restart post resume. Solved. I test for it running prior to suspend, stop it, test for not running on resume and restart using /etc/init.d/connman. Tested pretty thoroughly.
2. The touchpad or usb mouse are not initialized correctly on resume, resulting in very strange leftclick results and then lockup. Partially solved for the touchpad by removing psmouse and reinstalling it post resume using modprobe. The USB mouse is also doable using xinput to disable then re-enable it. usbhid is built in in these kernels so modprobe can't be used on it. Completely solved for the mouse.
3. The sticking point: For the touchpad to get my scrolling and speed options back I need to run psynclient -s or the code snippet below from within the suspend script.
Code: Select all
if [ -e "$HOME/.config/psynclient.conf" ]; then
for line1 in $(cat "$HOME/.config/psynclient.conf")
do
if [ "$line1" != "" ] && [ "$(echo "$line1" | cut -f 2 -d '=')" != "" ]; then
echo "$line1" >> /tmp/listtest
urxvt -e synclient "$line1"
fi
done
fi
Both of the above run correctly in Lxterminal or urxvt, but will not set the touchpad parameters when run from the suspend script. The snippet exports the lines correctly so synclient seems to be the problem. The suspend.sh script has been tried both as the default sh and also as bash, with shopt -s extglob
at the beginning. Running them within a shell from that script, ie. urxvt -e psynclient -l or -s (they have the same function) also fails.
I humbly accept the probably obvious answer.
Thanks,
Update 4 Nov.: IF I can get either psynclient -s or the snippet to run from the suspend.sh script, looks like I won't have to remove/reinstall psmouse in the script. I made a keyboard shortcut to run psclient -l and if I hit that immediately after resuming I'm good to go wrt the touchpad. So the question is even more relevant to a simple solution here.
Solved, at least as a simple workaround. Made an executable script, /root/my-applications/bin/psynclient_loadsettings, which just calls psynclient -l and run that script on resume in the suspend.sh script. Making the existing /root/.config/autostart/psynclient.desktop executable and calling that also works but I don't like that route. I still don't know why psynclient -s or synclient in the snippet won't run called directly from suspend but I can live with the workaround.
Ah yes, the hardware: Fujitsu S761 laptop. An all intel 2nd generation 15 circa 2012. Jammypup64, Fossa64-less, need no patches to suspend.sh, IIRC the current VoidPup64 and LxPupSc64 also don't. I use PWF for wifi in those.