[ltp] Shutting Down X when Suspending to Disk

Matt Graham linux-thinkpad@linux-thinkpad.org
Mon, 1 Nov 2004 08:57:36 -0500


On Sunday 31 October 2004 21:26, after a long battle with technology, 
James McKenzie wrote:
> I searched the archives and could not find a method to kill off X
> when suspending to disk.  It is causing my A22p to appear as if it
> died after resuming.  I switched to a text session and killed off X
> and the system came back to life.  What do I have to do to add this
> to my apm script? I'm using FC2.

Find your apmd config file.  The official location is /etc/apmd_proxy 
or /etc/apm/apmd_proxy , but Fedora may have screwed things around.  
This script is called with an argument of "suspend" or "standby" when 
an APM suspend or standby event occurs.  In my Gentoo laptop, 
apmd_proxy runs all the scripts under /etc/apm/event.d/ with an 
argument of "suspend" or "standby" when you do "apm -s".  (NOTE:  when 
you close the lid on an A22p, no APM events are generated AFAICT.  How 
dumb.)

You probably don't have to kill X, just do "chvt 1".  I've never used 
the suspend-to-disk feature on an A22p, but suspend-to-RAM has never 
caused any problems with X for me.

-- 
   I have had to deal with kangaroos, donkeys, cows, wild pigs
   and some press leaks by former Vice President Cheney.
   --MegaHAL, trained on ASR
There is no Darkness in Eternity/But only Light too dim for us to see