[ltp] tp4d and suspend/resume

Charles E Taylor IV linux-thinkpad@www.bm-soft.com
Fri, 23 Aug 2002 07:53:52 -0400


On Fri, 23 Aug 2002 09:47:17 +0200
"Pino Giaquinto" <doigia@tin.it> wrote:

> When I resume my TP600E the mouse move slowly.
> If I kill as root tp4d and restart it using:
> 
> tp4d -S 0xff -z
> 
> it work very good !
> Can I do this operation modifing /etc/sysconfig/apmd ???

I had similar problems with a way to reset the audio volume at resume and
didn't get an answer from the list (or from the man pages) , so here's
what I did: Create a "service" that can be restarted using (in Redhat)
/etc/sysconfig/apmd when the system resumes.  For example, to reset audio
volume I created a service "resetmixer":

/etc/init.d/resetmixer:

#!/bin/bash

# chkconfig: 345 85 16

# description: Resets the audio mixer volume (useful after a
# suspend/resume)

HOME=/etc

case "$1" in
start)
	echo "Resetting sound volume (start)"
	/usr/bin/aumix -v100
;;
stop)
	echo "Resetting sound volume (stop)"
	/usr/bin/aumix -v100
;;
restart)
	$0 stop
	$0 start
;;
status)
	echo "Status (NO-OP)"
;;
*)
echo "Usage:resetmixer {start|stop|status|restart}"
exit 1
esac

exit 0

I enabled the service with chkconfig, then edited
/etc/sysconfig/apmd:

# some services might need restarting after a suspend/resume cycle - for
# example, named will shut down if all network interfaces go down.
# Any valid service (as in "ls /etc/init.d/") can be listed, and will be
# restarted if it was running at suspend time.
RESTORESERVICES="mwaved cs4232 resetmixer"

You should be able to adapt this to solve your Trackpoint problem.  Or,
maybe someone else has a more elegant solution. :)

-- 
--------------------------------------------------------------------
*  Charles Taylor <tomalek@mindspring.com>
*  Chemistry teacher, Linux enthusiast!
--------------------------------------------------------------------
*  College Chemistry website: http://home.mindspring.com/~charletiv/
--------------------------------------------------------------------

----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html