From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DITPr-0000i5-NA for qemu-devel@nongnu.org; Mon, 04 Apr 2005 11:23:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DITOP-00009l-A4 for qemu-devel@nongnu.org; Mon, 04 Apr 2005 11:21:33 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DISpa-0003Xj-Pl for qemu-devel@nongnu.org; Mon, 04 Apr 2005 10:45:34 -0400 Received: from [217.204.41.189] (helo=kula.newsnow.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DIOIh-0006Z0-MK for qemu-devel@nongnu.org; Mon, 04 Apr 2005 05:55:20 -0400 Received: from r3j188.chello.upc.cz ([213.220.201.188] helo=[192.168.0.4]) by kula.newsnow.net with esmtp (Exim 3.35 #1 (Debian)) id 1DIOH3-0001El-00 for ; Mon, 04 Apr 2005 10:53:37 +0100 Message-ID: <42510EA0.20900@praguespringpeople.org> Date: Mon, 04 Apr 2005 11:53:36 +0200 From: Struan Bartlett MIME-Version: 1.0 Subject: A Fix Re: APM bug Re: [Qemu-devel] Re: Suggestion - trap window-close of VM References: <4247EBB0.6090409@praguespringpeople.org> <200503292352.20141.paul@codesourcery.com> <424AA7F4.2050900@praguespringpeople.org> <424BD31A.5020300@praguespringpeople.org> <424C39EB.6020203@praguespringpeople.org> In-Reply-To: <424C39EB.6020203@praguespringpeople.org> Content-Type: multipart/alternative; boundary="------------050503030005080600000603" Reply-To: 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 This is a multi-part message in MIME format. --------------050503030005080600000603 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 => Add/Remove Hardware & Next => Add/Troubleshoot a device => Add a new device & Next => No, I want to select the hardware from a list & Next => NT Apm/Legacy Support & Next => Next (again) a few times. Afterwards, I did Control Panel => 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 --------------050503030005080600000603 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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 => Add/Remove Hardware & Next => Add/Troubleshoot a device => Add a new device & Next => No, I want to select the hardware from a list & Next => NT Apm/Legacy Support & Next => Next (again) a few times. Afterwards, I did Control Panel => 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

--------------050503030005080600000603--