SOLVED
I used a custom script to suspend and added a check every
time the script runs it checks if the lid is open if it's
it will just quit and the lid is closed it will suspend the
machine
here is the script if any one need it
Quote:
#!/bin/bash
cat /proc/acpi/button/lid/C218/state | grep open
# if the lid is closed the value of $? will be something other then 0
if [ $? != 0 ]; then
#change to vt 1 just in case
chvt 1
# don't know if s2ram does sync so I do it
sync
# actual suspend command
s2ram -f -p -m
# this part will run on resume
#change back to vt 7
chvt 7
fi
|
The only problem it will not susped with the lid open but you can always do
a copy of the script without the lid state check