From owner-freebsd-current@FreeBSD.ORG Tue Sep 7 23:38:33 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6496A16A4CE for ; Tue, 7 Sep 2004 23:38:33 +0000 (GMT) Received: from kestrel.alerce.com (kestrel.alerce.com [209.182.219.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2863D43D31 for ; Tue, 7 Sep 2004 23:38:33 +0000 (GMT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (w092.z064001164.sjc-ca.dsl.cnc.net [64.1.164.92]) (authenticated bits=128) by kestrel.alerce.com (8.12.10/8.12.10) with ESMTP id i87NcVkk077513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 Sep 2004 16:38:32 -0700 (PDT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (localhost [127.0.0.1]) by rosebud.alerce.com (8.12.9p2/8.12.9) with ESMTP id i87NdBwg002784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 7 Sep 2004 16:39:11 -0700 (PDT) (envelope-from hartzell@rosebud.alerce.com) Received: (from hartzell@localhost) by rosebud.alerce.com (8.12.9p2/8.12.9/Submit) id i87NdAgK002781; Tue, 7 Sep 2004 16:39:10 -0700 (PDT) (envelope-from hartzell) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16702.18078.163174.437782@rosebud.alerce.com> Date: Tue, 7 Sep 2004 16:39:10 -0700 To: freebsd-current@freebsd.org X-Mailer: VM 7.14 under 21.4 (patch 14) "Reasonable Discussion" XEmacs Lucid X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' Subject: IBM T42p, ACPI/APM, hibernation, and S4BIOS problem/question. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hartzell@kestrel.alerce.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2004 23:38:33 -0000 Hi all, I'm having trouble getting hibernation to work on a new IBM T42p laptop. I know that I need to create a hibernation partition/file, and have tried a variety of methods (see below). Keven Oberman has been a great help with this. I've used both the 5.2.1 disc 2 live CD and the 5.3BETA3 disc 2 live CD. I've been booting from that CD, choosing Fixit, and running from the CD. I've upgraded the bios to the current 3.08a and the embedded controller software to version 3.03. The machine came equipped with Windows XP, in the first partition, and IBM's recovery and repair program in a second partition. I installed Acronis' Disk Director (but not the multiboot manager) and used it to shrink the Windows XP partition and move it about 2 GB from the front of the disk. I used three different techniques to try to create the necessary hibernation space: 1) lphdisk (0.9.1) I used Disk Director from windows to create a primary partition in the 2-ish GB hole at the front of the disk, and give it partition type 0xa0. I then booted a BG-rescue CD http://omnibus.uni-freiburg.de/~giannone/rescue/current/ and used its version of lphdisk to create a hibernation partition. It was extremely slow, but completed successfully. Results: a) If I boot with acpi enabled (just let it go), and start a fixit shell: hw.acpi.s4bios is 0 The FnF12 keypair does nothing. acpiconf -s 4 shutsdown the machine very quickly, pressing the power button reboots it from scratch. if I use sysctl -w to set hw.acpi.s4bios=1 The FnF12 keypair does nothing acpiconf -s 4 makes the moon blink and the machine appears wedged. I have to hold the power button down for 5-8 seconds to get it to reboot. b) If I choose option 2 in the freebsd boot, and boot w/out acpi, then: hw.acpi.s4bios doesn't exist (phew!) FnF12 starts the moon symbol blinking and lights up the disk light. Eventually I get a screen with: Phoenix NoteBIOS v4.0 Save To Disk Manager and progress bars that are familiar to me from hibernating my current Sony PCG-Z505JE. Eventually it powers down. Pressing the power button brings things back to life, although attempts to access the disk (e.g. ls) fail with Input/output error. exiting that shell and starting a new fixit shell without rebooting makes ls work again. 2) IBM's PHDISK program and a hibernation partition I used Disk Director from windows to delete the partition above, and then create a new primary partition in the 2-ish GB hole at the front of the disk, and give it partition type 0xa0. I then created a bootable floppy using IBM's tool: http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4PESMK And booted with the resulting disk. It turns out to be PHDISK 4.5 -- Phoenix NoteBIOS 4.0(tm) And gives three choices: 1 Reformat existing partition 2 Delete existing partition 3 Reboot I choose option 1 and let it format the partition created by Disk Director. Results: a) If I boot with acpi enabled (just let it go), and start a fixit shell: hw.acpi.s4bios is 0 The FnF12 keypair does nothing. acpiconf -s 4 shutsdown the machine very quickly, pressing the power button reboots it from scratch. if I use sysctl -w to set hw.acpi.s4bios=1 The FnF12 keypair does nothing acpiconf -s 4 makes the moon blink and the machine appears wedged. I have to hold the power button down for 5-8 seconds to get it to reboot. (same as the lphdisk result) b) If I choose option 2 in the freebsd boot, and boot w/out acpi, then: The FnF12 keypair does nothing. acpiconf -s 4 complains about /dev/acpi no such... (phew). 3) IBM's PHDISK program and a hibernation *file* I used Disk Director from windows to delete the partition above, and then create a new primary partition in the 2-ish GB hole at the front of the disk and created a FAT16 filesystem there. I then created a bootable floppy using IBM's tool: http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4PESMK And booted with the resulting disk. It turns out to be PHDISK 4.5 -- Phoenix NoteBIOS 4.0(tm) And one of the choices (I didn't copy down the details...) was to create a hibernation file. I did that, and it eventually finished. Results: a) If I boot with acpi enabled (just let it go), and start a fixit shell: The results are identical to the other acpi-enabled results described above. b) If I boot w/out ACPI (option 2 in the boot menu): FnF12 suspends the machine as described above. Interestingly, instead of displaying the Phoenix NoteBIOS progress bars, it displays a fancy IBM graphic. Otherwise, it's identical. I did not notice whether ls worked in the re-awakened system or not. Discussion: There was a page at the IBM site that offered a tool for building hibernation files for the T42p that I can no longer find. It mentioned that, even though the application would offer to build a hibernation *partition*, that would not work and one should only use a hibernation *file*. That jives with my results above. In the "old" days, I used lphdisk to create a hibernation partition for my Sony Vaio PCG-Z505JE using APM. Either the bios, or lphdisk, or both were picky, and the hibernation partition needed to be in the fourth slot in the partition table. I tried recreating that on my new IBM w/ no success. Plea for help: I'm pretty sure that I've created hibernation partitions/files that please the BIOS, since it's willing to use them when I boot w/out ACPI. I'm pretty sure that the s4bios sysctl variable is actually read-only, even though the code in acpi.c lets me set it. At least, setting it doesn't cause anything good to happen.... Am I wrong to expect a fixit session to be able to suspend in ACPI, even though it can w/out ACPI? Should I downgrade the BIOS? I upgraded because it claimed to fix a bug in Linux hibernation.... (Fix) (Linux) Hibernation function does not work correctly under the partition environment created by lphdisk. Is there anyone out there that has hibernation working on a recent/comparable thinkpad who can make a suggestion? Thanks, g.