From owner-acpi-jp@jp.FreeBSD.org Wed Aug  7 22:50:33 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g77DoXX48410;
	Wed, 7 Aug 2002 22:50:33 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (root@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g77DoW348405
	for <acpi-jp@jp.FreeBSD.org>; Wed, 7 Aug 2002 22:50:32 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwa@tasogare.imasy.or.jp [202.227.24.5])
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id g77DoRY25906
	for <acpi-jp@jp.FreeBSD.org>; Wed, 7 Aug 2002 22:50:27 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Message-Id: <20020807.225018.85418588.iwasaki@jp.FreeBSD.org>
To: acpi-jp@jp.FreeBSD.org
From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.0 (HANANOEN)
In-Reply-To: <200207221252.g6MCqs1X003231@freefall.freebsd.org>
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 07 Aug 2002 22:50:18 +0900
X-Sequence: acpi-jp 1697
Subject: [acpi-jp 1697] SONY VAIO: How to power LID on?
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: iwasaki@jp.FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020807

Hi, I got VAIO PCG-C1VJ recently and am trying to hack for
ACPI sleep/wakeup on VAIO.  With following changes, it seems
that VAIO now can wakeup successfully from ACPI sleep with
power button press or LID open.

> iwasaki     2002/07/22 05:52:54 PDT
> 
>   Modified files:
>     sys/dev/acpica       acpi.c acpi_button.c acpi_lid.c acpivar.h 
>   Log:
>   Add device(power/sleep button and lid) wake function from sleeping state.
>   This is required for some Thinkpad (and maybe VAIO) machines to wake
>   the system up from sleep.
>   
>   Currently partially implemented, more complete implementation will come later.

However LID is still in the dark after the system wakeup.  Does anyone
know how to power LID on ?  Special hack needed for VAIO?
My vga_pci driver (which have suspend/resume method to set
PCI power state of the VGA) doesn't help this.
Any hints are welcome.

BTW, ASL of PCG-C1VJ is at:
http://www.jp.freebsd.org/cgi/cvsweb.cgi/ACPI/data/PCG-C1VJ.asl?cvsroot=freebsd-jp

Anyway, I attached dmesg output including ACPI sleep/wakeup
debug info FYI.

Thanks

----
Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 5.0-CURRENT #3: Tue Aug  6 14:01:02 JST 2002
[snip]
acpi0: <SONY   P1      > on motherboard
Timecounter "ACPI-safe"  frequency 3579545 Hz
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0
acpi_cpu0: <CPU> on acpi0
acpi_tz0: <thermal zone> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Power Button> on acpi0
acpi_pcib0: <Host-PCI bridge> port 0xcf8-0xcff on acpi0
[snip]
Mounting root from ufs:/dev/ad0s2a
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Sony MSC-U01 1.00> Removable Direct Access SCSI-0 device 
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
acpi_lid0: Lid closed
======== acpi_printcpu() debug dump ========
gdt[0077:c0484de0] idt[0407:c0506960] ldt[0028] tr[0020] efl[00000002]
eax[00028000] ebx[c1df9080] ecx[00000001] edx[bfc000a0]
esi[00000000] edi[c0d26ba0] ebp[cab5eaf4] esp[cab5eac4]
cr0[8005003b] cr2[280a35d4] cr3[07513000] cr4[00000011]
cs[0008] ds[0010] es[0010] fs[0018] gs[002f] ss[0010]
======== acpi_printcpu() debug dump ========
gdt[0077:c0484de0] idt[0407:c0506960] ldt[0028] tr[0020] efl[00000002]
eax[00000001] ebx[c1df9080] ecx[00000001] edx[c1e84e40]
esi[00000000] edi[c0d26ba0] ebp[cab5eaf4] esp[cab5ead8]
cr0[8005003b] cr2[280a35d4] cr3[07513000] cr4[00000011]
cs[0008] ds[0010] es[0010] fs[0018] gs[002f] ss[0010]
ata0: resetting devices ..
usb0: interrupt while not operating ignored
acpi_lid0: Lid opened
usb0: interrupt while not operating ignored
ata0-slave: timeout waiting for interrupt
ata0-slave: ATA identify failed
done
ata1: resetting devices ..
done
umass0: at uhub0 port 2 (addr 2) disconnected
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
umass0: detached
umass0: Sony USB Memory Stick Slot, rev 1.10/1.31, addr 2
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0 
(probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:29,0
(probe0:umass-sim0:0:0:0): Power on, reset, or bus device reset occurred
(probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Sony MSC-U01 1.00> Removable Direct Access SCSI-0 device 
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
