Subject: ACPI: Possible VGA reinit workaround on resume
To: None <current-users@NetBSD.org>
From: Jared D. McNeill <jmcneill@invisible.ca>
List: current-users
Date: 08/07/2007 22:37:50
Heyas folks --

For anybody having issues with restoring their display adapter on resume 
with a kernel from the jmcneill-pm branch, could you please test the 
following for me:

   1. Grab http://www.invisible.ca/~jmcneill/netbsd/vbetool-netbsd.tar
   2. Extract, copy 'vbetool' binary to /sbin, chmod +x it, make sure it
      runs (ie no linking issues), otherwise you will need to rebuild it.
   3. Create a script, "s2r.sh", that does the following:

#!/bin/sh
/sbin/vbetool vbestate save > /tmp/vbestate
sysctl -w machdep.sleep_state=3
/sbin/vbetool post
/sbin/vbetool vbestate restore < /tmp/vbestate

   4. NOTE: /tmp will have to be writable when you run this test; if you
      normally test ACPI suspend/resume in single-user mode, mount a tmpfs
      on top or something.
   5. As root, run: sysctl -w machdep.acpi_vbios_reset=0
   6. Run the 's2r.sh' script and cross your fingers.

This has been successfully tested on a Dell Latitude D600. Other reports 
would be greatly appreciated!

Cheers,
Jared