Today I install KLIXs-2010.1 beta version to my one of my niece desktop computer, and there are no difficulties since her hardware was pretty decent and highly supported by KLIXs. Installing nvidia-190 proprietary driver for her 6600 NVidia card without difficulties and got 3D Desktop effects via KWin without hassles also, she’s happy and I prepare to go home. Suddenly she interrupt my way go and asking about suspending function, she ask why linux couldn’t wake up everytime she suspend to standby mode. Blah … nonsense … I check it out, and found that the system can go to S3 mode without difficulties, but couldn’t wake up during restoring video content on resume. Hmmm … this must be problem specific to 6600 since I’ve got 8600GT and can resume the content without problems. I remember once I’ve download some script that preserve to save the content of the display before suspending and restoring them during resume session along time ago. I’m not writing it and I forgot where I got that scripts, so here is I share in case you need :
Here is the script :
#!/bin/bash
kdialog –warningcontinuecancel ‘Suspending to ram!’
if [ $? = 0 ]; then
# discover video card’s ID
ID=`lspci | grep VGA | awk ‘{ print $1 }’ | sed -e ‘s@0000:@@’ -e ‘s@:@/@’`# securely create a temporary file
TMP_FILE=`mktemp /tmp/video_state.XXXXXX`
trap ‘rm -f $TMP_FILE’ 0 1 15# switch to virtual terminal 1 to avoid graphics corruption in X
chvt 1
/sbin/hwclock –systohc# write all unwritten data (just in case)
sync# dump current data from the video card to the temporary file
cat /proc/bus/pci/$ID > $TMP_FILE# suspend
echo -n mem > /sys/power/state/sbin/hwclock –hctosys
# restore video card data from the temporary file on resume
cat $TMP_FILE > /proc/bus/pci/$IDchvt 7
# remove temporary file
rm -f $TMP_FILE
else
echo ” you selected: Cancel”
fi