From amistry@crumpet.united-ware.com  Tue Aug 26 22:17:09 2003
Return-Path: <amistry@crumpet.united-ware.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6DA7316A4BF
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Aug 2003 22:17:09 -0700 (PDT)
Received: from crumpet.united-ware.com (ddsl-66-42-172-210.fuse.net [66.42.172.210])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5314B43FEC
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Aug 2003 22:17:08 -0700 (PDT)
	(envelope-from amistry@crumpet.united-ware.com)
Received: from crumpet.united-ware.com (ddsl-66-42-172-210.fuse.net [66.42.172.210])
	by crumpet.united-ware.com (8.12.8p1/8.12.8) with ESMTP id h7R5HYeI000172
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 27 Aug 2003 01:17:34 -0400 (EDT)
	(envelope-from amistry@crumpet.united-ware.com)
Received: (from amistry@localhost)
	by crumpet.united-ware.com (8.12.8p1/8.12.8/Submit) id h7R5HXhS000171;
	Wed, 27 Aug 2003 01:17:33 -0400 (EDT)
	(envelope-from amistry)
Message-Id: <200308270517.h7R5HXhS000171@crumpet.united-ware.com>
Date: Wed, 27 Aug 2003 01:17:33 -0400 (EDT)
From: amistry <amistry@am-productions.biz>
Reply-To: amistry <amistry@am-productions.biz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ACPI suspend drains battery while in S3
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         56024
>Category:       kern
>Synopsis:       ACPI suspend drains battery while in S3
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-acpi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 26 22:20:09 PDT 2003
>Closed-Date:    Tue Apr 30 06:09:53 UTC 2013
>Last-Modified:  Tue Apr 30 06:09:53 UTC 2013
>Originator:     Anish Mistry
>Release:        FreeBSD 5.1-CURRENT #6
>Organization:
AM Productions
>Environment:
System: FreeBSD littleguy.am-productions.biz 5.1-CURRENT FreeBSD 5.1-CURRENT #6: Sat Aug 23 00:16:23 EDT 2003     amistry@littleguy.am-productions.biz:/usr/obj/usr/src/sys/LITTLEGUY  i386

Copyright (c) 1992-2003 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.1-CURRENT #6: Sat Aug 23 00:16:23 EDT 2003
    amistry@littleguy.am-productions.biz:/usr/obj/usr/src/sys/LITTLEGUY
Preloaded elf kernel "/boot/kernel/kernel" at 0xc0401000.
Preloaded elf module "/boot/kernel/acpi.ko" at 0xc0401244.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Transmeta(tm) Crusoe(tm) Processor TM5800 (859.34-MHz 586-class CPU)
  Origin = "GenuineTMx86"  Id = 0x543
real memory  = 251527168 (239 MB)
avail memory = 239869952 (228 MB)
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <FUJ    PAULING2> on motherboard
pcibios: BIOS version 2.10
Using $PIR table, 9 entries at 0xc00fdf30
acpi0: power button is handled as a fixed feature programming model.
Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0xff08-0xff0b on acpi0
acpi_cpu0: <CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib0: slot 2 INTA is routed to irq 11
pcib0: slot 4 INTA is routed to irq 9
pcib0: slot 12 INTA is routed to irq 9
pcib0: slot 16 INTA is routed to irq 9
pcib0: slot 19 INTA is routed to irq 9
pcib0: slot 20 INTA is routed to irq 9
pci0: <memory, RAM> at device 0.1 (no driver attached)
pci0: <memory, RAM> at device 0.2 (no driver attached)
pci0: <serial bus, USB> at device 2.0 (no driver attached)
pci0: <multimedia, audio> at device 4.0 (no driver attached)
pci0: <bridge, PCI-unknown> at device 6.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
pci0: <bridge, PCI-CardBus> at device 12.0 (no driver attached)
atapci0: <AcerLabs Aladdin UDMA66 controller> port 0x1400-0x140f at device 15.0 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
rl0: <RealTek 8139 10/100BaseTX, rev. C> port 0x8000-0x80ff mem 0xfc102000-0xfc1020ff irq 9 at device 16.0 on pci0
rl0: Ethernet address: 00:e0:00:ae:45:08
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pci0: <serial bus, FireWire> at device 19.0 (no driver attached)
pci0: <display, VGA> at device 20.0 (no driver attached)
acpi_button0: <Power Button> on acpi0
acpi_acad0: <AC adapter> on acpi0
acpi_cmbat0: <Control method Battery> on acpi0
acpi_cmbat1: <Control method Battery> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
acpi_ec0: <embedded controller: GPE 0> port 0x66,0x62 on acpi0
orm0: <Option ROMs> at iomem 0xd0000-0xd0fff,0xc0000-0xcffff on isa0
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 859337612 Hz quality 800
Timecounters tick every 10.000 msec
acpi_cpu0: set speed to 100.0%
acpi_cpu: throttling enabled, 8 steps (100% to 12.5%), currently 100.0%
acpi_acad0: acline initialization start
acpi_acad0: On Line
acpi_acad0: acline initialization done, tried 1 times
acpi_cmbat0: battery initialization start
acpi_cmbat0: battery initialization done, tried 1 times
acpi_cmbat1: battery initialization start
ad0: 19077MB <TOSHIBA MK2018GAP> [38760/16/63] at ata0-master UDMA66
acd0: CD-RW <TOSHIBA DVD-ROM SD-R2212> at ata1-master PIO4
cd0 at ata1 bus 0 target 0 lun 0
cd0: <TOSHIBA DVD-ROM SD-R2212 1F15> Removable CD-ROM SCSI-0 device 
cd0: 16.000MB/s transfers
cd0: cd present [262257 x 2048 byte records]
Mounting root from ufs:/dev/ad0s2a
WARNING: /usr was not properly dismounted
WARNING: /var was not properly dismounted
acpi_cmbat1: battery initialization failed, giving up
ohci0: <AcerLabs M5237 (Aladdin-V) USB controller> mem 0xfc100000-0xfc100fff irq 11 at device 2.0 on pci0
usb0: OHCI version 1.0, legacy support
usb0: <AcerLabs M5237 (Aladdin-V) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ums0: Kensington ? Pocket Mouse Pro Wireless, rev 1.10/0.01, addr 2, iclass 3/1
ums0: 3 buttons and Z dir.
pcm0: <Acer Labs M5451> port 0x1000-0x10ff mem 0xfc101000-0xfc101fff irq 9 at device 4.0 on pci0
pcm0: <SigmaTel STAC9756/57 AC97 Codec>

-- pciconf --
hostb0@pci0:0:0:	class=0x060000 card=0x110e10cf chip=0x03951279 rev=0x02 hdr=0x00
    vendor   = 'Transmeta Corp.'
    device   = 'LongRun Northbridge'
    class    = bridge
    subclass = HOST-PCI
none0@pci0:0:1:	class=0x050000 card=0x110e10cf chip=0x03961279 rev=0x00 hdr=0x00
    vendor   = 'Transmeta Corp.'
    device   = 'SDRAM Controller'
    class    = memory
    subclass = RAM
none1@pci0:0:2:	class=0x050000 card=0x110e10cf chip=0x03971279 rev=0x00 hdr=0x00
    vendor   = 'Transmeta Corp.'
    device   = 'BIOS scratchpad'
    class    = memory
    subclass = RAM
none2@pci0:2:0:	class=0x0c0310 card=0x10a210cf chip=0x523710b9 rev=0x03 hdr=0x00
    vendor   = 'Acer Labs Incorporated (ALi)'
    device   = 'ALI M5237 USB Host Controller'
    class    = serial bus
    subclass = USB
none3@pci0:4:0:	class=0x040100 card=0x112f10cf chip=0x545110b9 rev=0x01 hdr=0x00
    vendor   = 'Acer Labs Incorporated (ALi)'
    device   = 'ALI M5451 PCI AC-Link Controller Audio Device'
    class    = multimedia
    subclass = audio
none4@pci0:6:0:	class=0x068000 card=0x10a310cf chip=0x710110b9 rev=0x00 hdr=0x00
    vendor   = 'Acer Labs Incorporated (ALi)'
    device   = 'ALI M7101 Power Management Controller'
    class    = bridge
    subclass = PCI-unknown
isab0@pci0:7:0:	class=0x060100 card=0x153310b9 chip=0x153310b9 rev=0x00 hdr=0x00
    vendor   = 'Acer Labs Incorporated (ALi)'
    device   = 'ALI M1533 Aladdin IV ISA Bridge'
    class    = bridge
    subclass = PCI-ISA
none5@pci0:12:0:	class=0x060700 card=0x10c610cf chip=0xac50104c rev=0x01 hdr=0x02
    vendor   = 'Texas Instruments (TI)'
    device   = 'PCI1410 PC card cardBus Controller'
    class    = bridge
    subclass = PCI-CardBus
atapci0@pci0:15:0:	class=0x0101fa card=0x10a410cf chip=0x522910b9 rev=0xc3 hdr=0x00
    vendor   = 'Acer Labs Incorporated (ALi)'
    device   = 'M1543 Southbridge EIDE Controller'
    class    = mass storage
    subclass = ATA
rl0@pci0:16:0:	class=0x020000 card=0x111c10cf chip=0x813910ec rev=0x10 hdr=0x00
    vendor   = 'Realtek Semiconductor'
    device   = 'RT8139 (A/B/C/8130) Fast Ethernet Adapter'
    class    = network
    subclass = ethernet
none6@pci0:19:0:	class=0x0c0010 card=0x116210cf chip=0x8026104c rev=0x00 hdr=0x00
    vendor   = 'Texas Instruments (TI)'
    device   = 'TSB43AB21 1394a-2000 OHCI PHY/link-layer Controller'
    class    = serial bus
    subclass = FireWire
none7@pci0:20:0:	class=0x030000 card=0x114f10cf chip=0x4c521002 rev=0x64 hdr=0x00
    vendor   = 'ATI Technologies'
    device   = 'Rage P/M Mobility PCI'
    class    = display
    subclass = VGA

-- asl --
http://am-productions.biz/debug/littleguy.asl

-- acpidump --
http://am-productions.biz/debug/acpidump.txt

	
>Description:
	When using ACPI to suspend the machine to S3 the battery is drained abnormally fast as if a device is not shutdown properly.
>How-To-Repeat:
	On a Fujitsu P2110 with ACPI enabled on -CURRENT suspend the laptop into S3.  Wait about an hour then resume the laptop and notice that the battery is drained a few percent.  This doesn't happen in Win2k on the same machine or when just using hardware APM.
>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->njl 
Responsible-Changed-By: njl 
Responsible-Changed-When: Wed Sep 3 17:59:05 PDT 2003 
Responsible-Changed-Why:  
I will look at this after some other PRs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56024 

From: Anish Mistry <mistry.7@osu.edu>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/56024: ACPI suspend drains battery while in S3
Date: Wed, 10 Sep 2003 22:07:32 -0400

 --Boundary-02=_sj9X/vZSAE89VD3
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 Content-Description: signed data
 Content-Disposition: inline
 
 I think that I have figured out why this mysterious drain is occuring.  Whe=
 n I=20
 suspended today I noticed that the backlight turns of any everything sounds=
 =20
 like it powers down, but if I look really close and have the right light=20
 angle, or have a lot of white text on the screen I can see that the display=
 =20
 is STILL on.  At first I thought that this what burn in, but it would chang=
 e=20
 when I would have different stuff on the console, and wouldn't appear when=
 =20
 the system was completely powered down.  So it seems like ACPI is only=20
 turning off the backlight on the display, and not the display itself.  Hope=
 =20
 this points someone in the right direction to a solution.
 =2D-=20
 Anish Mistry
 
 --Boundary-02=_sj9X/vZSAE89VD3
 Content-Type: application/pgp-signature
 Content-Description: signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.3 (FreeBSD)
 
 iD8DBQA/X9jsxqA5ziudZT0RAsk8AKCyD0gmNAQzZxtncay1Itphb+jOvgCdHBDl
 9DG5c6Qms4VytPOknwgELVc=
 =kkre
 -----END PGP SIGNATURE-----
 
 --Boundary-02=_sj9X/vZSAE89VD3--
 

From: Anish Mistry <mistry.7@osu.edu>
To: freebsd-gnats-submit@FreeBSD.org, amistry@am-productions.biz
Cc:  
Subject: Re: kern/56024: ACPI suspend drains battery while in S3
Date: Wed, 29 Oct 2003 00:45:37 -0500

 =2D----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 I did some more observing and noticed in Windows that it shuts off the disp=
 lay=20
 before going into suspend (ie. before the acpi beep).  This leads me to=20
 believe that the ACPI suspend isn't responsible for shutting down the=20
 display, but probably the driver, or just a generic VESA display shutoff=20
 command if there exists one.  So a fix might be to shutoff the display righ=
 t=20
 before the ACPI actually calls the prep and suspend.
 =2D --=20
 Anish Mistry
 =2D----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.3 (FreeBSD)
 
 iD8DBQE/n1QJxqA5ziudZT0RAukuAJ97NJyOZsdBnQkZ0mRrIahkMNKaDgCgowYr
 42yr6Aqvn0rlZLdzwNQ1CFI=3D
 =3Dj9BB
 =2D----END PGP SIGNATURE-----
 

From: Nate Lawson <nate@root.org>
To: Anish Mistry <mistry.7@osu.edu>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/56024: ACPI suspend drains battery while in S3
Date: Tue, 28 Oct 2003 23:53:30 -0800 (PST)

 On Tue, 28 Oct 2003, Anish Mistry wrote:
 >  I did some more observing and noticed in Windows that it shuts off the
 >  display
 >  before going into suspend (ie. before the acpi beep).  This leads me to
 >  believe that the ACPI suspend isn't responsible for shutting down the
 >  display, but probably the driver, or just a generic VESA display shutoff
 >  command if there exists one.
 
 On most machines, the _PTS (prepare to sleep) node does the video shut
 off.  On my IBM T23, this is what happens.  _PTS is called by
 AcpiSleepStatePrep.  I'll have to look at your ASL to see what it has for
 _PTS for the video adapter.
 
 Windows info doesn't help much since MS expects video driver authors to
 handle the suspend operation as part of WDM.  Since most don't release
 specs on video drivers, we leave it up to X's drivers currently.  But they
 are incomplete.
 
 -Nate
Responsible-Changed-From-To: njl->freebsd-acpi 
Responsible-Changed-By: njl 
Responsible-Changed-When: Sun Oct 17 19:03:36 GMT 2004 
Responsible-Changed-Why:  
Passing this to the acpi mailing list for historical purposes.  At some 
point, someone will have time to investigate suspend/resume. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56372 
Responsible-Changed-From-To: njl->freebsd-acpi 
Responsible-Changed-By: njl 
Responsible-Changed-When: Sun Oct 17 19:03:36 GMT 2004 
Responsible-Changed-Why:  
Passing this to the acpi mailing list for historical purposes.  At some 
point, someone will have time to investigate suspend/resume. 

This problem will likely be solved by getting proper DPMS support in the 
kernel video driver and/or hooking X suspend/resume to /dev/apm when acpi 
is enabled. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56024 

From: Andriy Gapon <avg@freebsd.org>
To: bug-followup@freebsd.org, amistry@am-productions.biz
Cc:  
Subject: Re: kern/56024: ACPI suspend drains battery while in S3
Date: Sun, 05 Dec 2010 16:42:28 +0200

 Is this still an issue?
 -- 
 Andriy Gapon
State-Changed-From-To: open->closed 
State-Changed-By: hiren 
State-Changed-When: Tue Apr 30 06:05:15 UTC 2013 
State-Changed-Why:  
Closing 10 yrs old bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56024 
>Unformatted:
