Biostar iDEQ 200V Suspend to RAM

Biostar iDEQ 200V Suspend to RAM

Posted by Stephen Evanchik on October 25, 2005 - 11:24pm in

I had this really great post but my Drupal decided to eat it because FCKEditor died or something. What total crap. Oh well.

I have been really busy lately so I haven't had much time to work on the TrackPoint driver. It seems to have found its way in to the -mm kernel tree which makes my life easier.

I have become obessed with making my SFF PC quiet and reducing the amount of electricity we use in our apartment. The need for quiet comes from a noisy fan. I want to find a place that sells the Vantec 60mm Stealth fan and grommet as well as some noise dampening material. I don't want to have them shipped seperately as I'll pay way too much. I also ordered a kill-a-watt tool that I can use to measure the amount of electricity devices use. I plan on testing my PC at idle, full load and, on ACPI S3 which is Suspend to RAM or STR.

Which brings me to the relatively exciting thing that happened tonight: I finally got Suspend to RAM working on my iDEQ 200V. I needed to do a couple of things before everything just worked. First I needed to upgrade the BIOS. I was using a BIOS from September 2003 which forced me to turn ACPI off entirely. With the November 2004 BIOS version ACPI works flawlessly. The next thing is that STR works great with one tiny resume problem. It turns out that some BIOS implementations fail to repost the video card's BIOS and as a consequence the video card is never reinitialized. The Linux kernel can't do anything about this because the BIOS sets up the video hard and hands it off to the kernel at boot time. In order to fix this you need to use vbetool to repost the BIOS. One small issue is that this program really messes with your video hardware which means you shouldn't try this with X running on your screen. If you switch to a console then it works great. I created a script to process power button events which works like a charm.

Here's my /etc/acpi/actions/power_btn.sh from CentOS 4.2:

#!/bin/bash
#
# Stephen Evanchik <evanchsa@gmail.com>
#
# Licensed under the GPL
#
# ACPI S3 (Suspend to RAM) for Biostar iDEQ 200V
#
# Power button has been pressed, now:
#
# 1. Blank the screen
# 2. sync the file systems
# 3. chvt to tty 1

test -f /usr/sbin/laptop_mode || exit 0
test -f /usr/local/sbin/vbetool || exit 0
test -f /etc/sysconfig/power_btn || exit 0

. /etc/sysconfig/power_btn

if [ -f /var/run/console/console.lock ]; then
  XUSER=`cat /var/run/console/console.lock`
  su -l -c "xscreensaver-command -activate" $XUSER
fi

chvt 1
sync

echo -n "mem" > /sys/power/state

/usr/local/sbin/vbetool post
/usr/local/sbin/vbetool dpms on
if [ -f /var/run/console/console.lock ]; then
  XUSER=`cat /var/run/console/console.lock`
  su -l -c "xscreensaver-command -deactivate" $XUSER
fi
chvt 7