From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DJZk1-00079R-Ev for qemu-devel@nongnu.org; Thu, 07 Apr 2005 12:20:27 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJZk0-00075N-SM for qemu-devel@nongnu.org; Thu, 07 Apr 2005 12:20:25 -0400 Received: from [62.2.95.247] (helo=smtp.hispeed.ch) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DJa9v-0004W3-TO for qemu-devel@nongnu.org; Thu, 07 Apr 2005 12:47:12 -0400 Received: from nbbolle (84-72-197-183.dclient.hispeed.ch [84.72.197.183]) by smtp.hispeed.ch (8.12.6/8.12.6/tornado-1.0) with ESMTP id j37GkRY3015323 for ; Thu, 7 Apr 2005 18:46:27 +0200 From: "Andreas Bollhalder" Subject: RE: A Fix Re: APM bug Re: [Qemu-devel] Re: Suggestion - trap window-closeof VM Date: Thu, 7 Apr 2005 18:42:36 +0200 Message-ID: <000601c53b90$ce28d8c0$6401a8c0@geodb.org> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable In-Reply-To: <42517591.30103@praguespringpeople.org> Reply-To: bolle@geodb.org, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I had it successfully tested with WinXP as guest on WinXP and Gentoo 2005.0 (with and without kqemu and with VNC) hosts. Hibernate works fine. Congratulation !!! Andreas -----Original Message----- From: qemu-devel-bounces+bolle=3Dgeodb.org@nongnu.org [mailto:qemu-devel-bounces+bolle=3Dgeodb.org@nongnu.org] On Behalf Of Struan Bartlett Sent: Monday, April 04, 2005 7:13 PM To: qemu-devel@nongnu.org Subject: A Fix Re: APM bug Re: [Qemu-devel] Re: Suggestion - trap window-closeof VM Hi - For anyone running Windows 2000 on Qemu, I've developed a fix that makes APM - and therefore Windows 2000 shutdown - correctly 'power off' (i.e. close) Qemu. I needed to patch the BIOS - which didn't implement the APM 1.2 16-bit protected mode interface that Windows 2000 apparently requires. Afterwards, as my Windows 2000 installation didn't have the APM driver installed, I simply needed to install it by going Control Panel =3D> Add/Remove Hardware & Next =3D> Add/Troubleshoot a device =3D> Add a new device & Next =3D> No, I want to select the hardware from a list & Next =3D> NT Apm/Legacy Support & Next =3D> Next (again) a few times. Afterwards, I did Control Panel =3D> Power Options, chose the APM tab and made sure the Advanced Power Management support checkbox was ticked. I also chose the Hibernate tab and enabled Hibernate Support too. After rebooting, Windows 2000 now correctly instructs Qemu to shutdown at the appropriate moment. No patches to Qemu were required. What doesn't work yet is Standby and Suspend, although I've generalised the APM Bios to support both of them. When attempting Standby (which doesn't always appear as an option - a problem I'm aware of), Windows tries to go into Standby but then reports that "the device driver for the device is preventing this machine from entering standby. Please close all applications and try again. If the problem persists, you may need to update this driver." I don't know why this should be. By contrast, Suspend doesn't ever appear as an option - but it would be nice to make this trigger the Qemu savevm/loadvm facility. You can find the Bios source patch as well as a precompiled patched-binary bios (for those who don't want to download the Bochs source) at http://www.praguespringpeople.org/Struan/Software/BochsBIOS/. Simply copy bios.bin-patchedAPM1.2 over your /usr/local/share/qemu/bios.bin (or better over pc-bios/bios.bin in your Qemu source directory and then do 'make install'). Struan