[vox-tech] Insomniac laptop (was Hard drive dying?)

Ken Bloom kbloom at gmail.com
Tue Mar 3 15:33:21 PST 2009


On Thu, 2009-02-26 at 12:35 -0800, Alex Mandel wrote:
> Chanoch (Ken) Bloom wrote:
> > I unfortunately have such an insomniac laptop. I think that it's likely
> > that the lid button is too sensitive to bumps, and would like to know if
> > there's a way to work around this in software. (e.g. if the computer
> > wakes up to find that the lid button is closed, put the computer back to
> > sleep automatically.)
> > 
> > Any tips?
> > 
> > --Ken

> The tried and true method is to turn it off. If you really care about
> fast load times, get a solid state and be done with it.
> 
> I long since gave up on using any of the sleep,hibernate etc modes as
> they are simply unreliable. Even if they work one day, a few updates
> later always seems to break them. Case, how many windows xp desktops do
> you know of that can still properly go sleep and come back. Every one I
> ever worked on had that feature stop working somewhere between years 1
> and 3.
> 
> You could always physically hack you laptop and replace the lid sensor
> with a physical switch of some kind.

I finally concluded that the best strategy was to
modify /etc/acpi/sleep.sh (the script that puts my laptop to sleep) to
use /proc to check the lid state:

   echo mem > /sys/power/state
   #The computer ends up here the first time it wakes up
   if [[ -e /proc/acpi/button/lid/LID/state ]]; then
      while grep closed /proc/acpi/button/lid/LID/state; do
         echo mem > /sys/power/state
      done
   fi

If it wakes up and finds the lid closed, it goes right back to sleep.

--Ken

-- 
Ken (Chanoch) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.lugod.org/pipermail/vox-tech/attachments/20090303/15e3ec08/attachment.pgp 


More information about the vox-tech mailing list