From owner-freebsd-acpi@FreeBSD.ORG Sun Nov 18 18:48:35 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4AAAA3B for ; Sun, 18 Nov 2012 18:48:35 +0000 (UTC) (envelope-from stefan.horomnea@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 396028FC12 for ; Sun, 18 Nov 2012 18:48:34 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id hj6so2669346wib.13 for ; Sun, 18 Nov 2012 10:48:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UGDrVOHqavxlhNb4j+jjcL85m6ExA+5axO0T8Lmym9I=; b=egW+CQwhbVTirS+fDgCtX4C23MSN7wzJeVoC6SpS/E+jgfIGkCCrtSLjEAA76C78MT 4pnasDYYaxga3Mk68iYgfPZE5XsD3vAHRuVfSh9mqPjmUdoOev3wzoV+fDLzoiB85rr7 ygVOT1PTqC7QH6KZtY3Zw6MHBDQSZMoI+1Gp8DEwD4BhGucbBTPNwn4zRVU8uZbZ7bdE 20rnPFBvzjRCvQY3rcekPfZTOqZ2+IpCwvfksEczlrJ4nbBKPicZXumgL2KAzT7sKLmu 35I/1VtV8jeWKQo6pweVEAbQ7jQyVksh4yLyf4A+LunZV5nSP5jNQamU+xEh1CSly+lP f1jQ== MIME-Version: 1.0 Received: by 10.180.94.41 with SMTP id cz9mr5984640wib.2.1353264512798; Sun, 18 Nov 2012 10:48:32 -0800 (PST) Received: by 10.194.65.70 with HTTP; Sun, 18 Nov 2012 10:48:32 -0800 (PST) In-Reply-To: <50A572A1.5030501@gmail.com> References: <50A12DF9.8090107@gmail.com> <20121113082044.GB96846@e-new.0x20.net> <50A572A1.5030501@gmail.com> Date: Sun, 18 Nov 2012 19:48:32 +0100 Message-ID: Subject: Re: Sleep/resume in FreeBSD 9 on a ThinkPad From: Stefan Horomnea To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: smithi@nimnet.asn.au X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Nov 2012 18:48:35 -0000 Hello again, I hope I have covered in my tests all the suggestions you guys offered. The result is the same: on resume, something happens, and then the computer restarts. Here is the detailed description: ############################################### 1. Test: BIOS update. Result: NOTHING CHANGES ############################################### Matt, thanks for indications here, as Lenovo's website confused me to think that the .iso file works only on Windows. Indeed, they have a small note below that basically says that is OS independent. So I used cdrecord (thanks for this one too) and it worked. Now I have an up-to-date BIOS, and it's nice to know how to do that, but the resume behaves the same. ######################################################## 2. Test: turn off usb devices. Result: NOTHING CHANGES ######################################################## I powered off whatever devices I could find with usbconfig that were power-off-able Details of the test usbconfig ugen0.1: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen1.1: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen1.2: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen0.3: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen1.3: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen0.4: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON usbconfig -d ugen1.2 power_off usbconfig -d ugen0.2 power_off usbconfig ugen0.1: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen1.1: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen0.2: at usbus0, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=OFF ugen1.2: at usbus1, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=OFF sysctl hw.pci.do_power_nodriver=3 hw.pci.do_power_nodriver: 0 -> 3 ######################################################### 3. Test: disable stuff in BIOS. Result: NOTHING CHANGES ######################################################### Did not find to much to disable in BIOS. The only stuff I could disable were: Wake on LAN Wireless LAN Which I did, I disabled them, tried sleep command, same result. ####################################################################### 4. Test: Kill X, turn off usb devices, unload the modules I could, all in one test. Result: NOTHING CHANGES ####################################################################### # The modules loaded are: kldstat Id Refs Address Size Name 1 28 0xffffffff80200000 11cd9b0 kernel 2 1 0xffffffff813ce000 45090 linux.ko 3 1 0xffffffff81414000 6600 cuse4bsd.ko 4 1 0xffffffff81612000 328d ng_ubt.ko 5 1 0xffffffff81616000 8b3d ng_hci.ko 6 3 0xffffffff8161f000 a79 ng_bluetooth.ko 7 5 0xffffffff81620000 8e12 netgraph.ko 8 1 0xffffffff81629000 b4a2 ng_l2cap.ko 9 1 0xffffffff81635000 1695e ng_btsocket.ko 10 1 0xffffffff8164c000 1ba9 ng_socket.ko 11 1 0xffffffff8164e000 64a91 radeon.ko 12 1 0xffffffff816b3000 139a7 drm.ko I was able to unload the following: cuse4bsd.ko (/boot/loader.conf) ng_ubt.ko, radeon.ko, drm.ko The rest couldn t be unloaded: Device busy. Should I see what they are and try to tell /boot/loader.conf to not load them ??? ################################################################## 5. Compile a kernel with: no uhci, ohci, ehci, or xhci. Result: NOTHING CHANGES ################################################################# It was the first time to compile a kernel, it was fun to learn how to do it, and I will probably continue doing it :) Of course, after booting with this configuration, I guess I had no usb support. usbconfig command did not return anything. So Matt, I think that is even 'better' than powering off usb devices :) I haven't even tried to log in to KDE, I just went in console and try the sleep command. Same result. cat /sys/amd64/conf/NO_UHCI include GENERIC ident NO_UHCI nodevice uhci # UHCI PCI->USB interface nodevice ohci # OHCI PCI->USB interface nodevice ehci # EHCI PCI->USB interface (USB 2.0) nodevice xhci # XHCI PCI->USB interface (USB 3.0) #### I am not a C programmer, but I think somehow I should be able to rely more on debugging the matter, and maybe with your help, if it is not to complicated, to interpret the results, get close to the problem's root cause and squash it. Thank you guys for your help so far, let me know if you have a recommended path to go further. Stefan On Thu, Nov 15, 2012 at 11:54 PM, matt wrote: > On 11/15/12 13:48, Stefan Horomnea wrote: > > Hi, > > > > After your suggestion, I have searched a bit but found no way so far to > > update my BIOS on the ThinkPad without having Windows install, in order > to > > run the update they provide on the lenovo website. I used all my > partitions > > for FreeBSD, so I do not space to install Windows. So that would be my > last > > resort. > > If you guys know how I can update my BIOS without installing Windows, let > > me know. > > Until then, I will continue with the other tests. > > > > Thank you, > > Stefan > > > > > Search for the bios bootable cd. It should be available in small print > from the Win7 bios update page. Now without a cdrom drive, it gets > tricky, I think I was using a perl script I found somewhere called > eltorito.pl to extract the disk image and just dd'd that to a usb disk. > If you have a CD drive installed, of course it's much easier to just > burn the iso using cdrecord...worked like a charm. > > Matt >