On Fri, 28 Mar 2014 11:59:57 +0200,
Paul Irofti <[email protected]> wrote:
> On Thu, Mar 27, 2014 at 08:33:51PM -0400, James Turner wrote:
> > I'm running the most recent amd64 snap (3/27) and it sounds like
> > this diff might be in it?
> >
> > Also not sure if this diff would affect the reporting of acpi
> > battery usage but after upgrading my acpibat0 sensors are all over
> > the place.
> >
> > Initial boot on a plugged in and fully charged battery shows 51%. I
> > let it drain to 35% and rebooted. With the computer still unplugged
> > it showed 100%. I then plugged it back in and it jumped back down
> > to 35%.
>
> Does running with this diff manifest the same battery woes?
Hi,
Since the snapshot from 27th when I tried to resume, my laptop
automatically shuts down because acpitz0 temperature is too high.
I've tried the following diff (in case of) but it's still happening.
My dmesg:
OpenBSD 5.5-current (GENERIC.MP) #1: Sat Mar 29 10:35:21 CET 2014
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1047068672 (998MB)
avail mem = 1010515968 (963MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf0760 (31 entries)
bios0: vendor American Megatrends Inc. version "0904" date 08/12/2010
bios0: ASUSTeK Computer INC. 1005PX
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG ECDT OEMB HPET GSCI SSDT SLIC
acpi0: wakeup devices P0P1(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Atom(TM) CPU N450 @ 1.66GHz, 1666.69 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU N450 @ 1.66GHz, 1666.48 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF
cpu1: 512KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 2
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpiec0 at acpi0
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 4 (P0P4)
acpiprt2 at acpi0: bus 2 (P0P5)
acpiprt3 at acpi0: bus -1 (P0P6)
acpiprt4 at acpi0: bus 1 (P0P7)
acpicpu0 at acpi0: C2, C1, PSS
acpicpu1 at acpi0: C2, C1, PSS
acpitz0 at acpi0: critical temperature is 98 degC
acpibat0 at acpi0: BAT0 model "1001PX" serial type LION oem "ASUS"
acpiac0 at acpi0: AC unit online
acpiasus0 at acpi0
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: PWRB
cpu0: Enhanced SpeedStep 1666 MHz: speeds: 1667, 1333, 1000 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Pineview DMI" rev 0x00
vga1 at pci0 dev 2 function 0 "Intel Pineview Video" rev 0x00
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
composite sync not supported
composite sync not supported
inteldrm0: 1024x600
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel Pineview Video" rev 0x00 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: msi
pci1 at ppb0 bus 4
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: msi
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR9285" rev 0x01: apic 2 int 17
athn0: AR9285 rev 2 (1T1R), ROM rev 13, address 48:5d:60:32:25:40
ppb2 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: msi
pci3 at ppb2 bus 1
alc0 at pci3 dev 0 function 0 "Attansic Technology L2C" rev 0xc0: msi,
address bc:ae:c5:02:e2:87
atphy0 at alc0 phy 0: F1 10/100/1000 PHY, rev. 11
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 2
int 23
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 2
int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 2
int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 2
int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 2
int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci4 at ppb3 bus 5
pcib0 at pci0 dev 31 function 0 "Intel NM10 LPC" rev 0x02
ahci0 at pci0 dev 31 function 2 "Intel 82801GR AHCI" rev 0x02: msi,
AHCI 1.1
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WD2500BEVT-8, 01.0> SCSI3
0/direct fixed naa.50014ee600700d09
sd0: 238475MB, 512 bytes/sector, 488397168 sectors
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic
2 int 21
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 7.2
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
uvideo0 at uhub0 port 6 configuration 1 interface 0 "Azurewave USB2.0
UVC VGA WebCam" rev 2.00/3.22 addr 2
video0 at uvideo0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct
fixed
sd1: 238472MB, 512 bytes/sector, 488391473 sectors
root on sd1a (e28a7fdca40fba71.a) swap on sd1b dump on sd1b
composite sync not supported
> Index: acpiec.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/acpi/acpiec.c,v
> retrieving revision 1.48
> diff -u -p -r1.48 acpiec.c
> --- acpiec.c 2 Jul 2013 18:37:47 -0000 1.48
> +++ acpiec.c 28 Mar 2014 09:57:43 -0000
> @@ -34,6 +34,7 @@
>
> int acpiec_match(struct device *, void *, void *);
> void acpiec_attach(struct device *, struct device *,
> void *); +int acpiec_activate(struct device *, int);
>
> u_int8_t acpiec_status(struct acpiec_softc *);
> u_int8_t acpiec_read_data(struct acpiec_softc *);
> @@ -54,6 +55,7 @@ int acpiec_getregister(const
> u_int8_t *
> void acpiec_wait(struct acpiec_softc *, u_int8_t,
> u_int8_t); void acpiec_sci_event(struct acpiec_softc
> *); +void acpiec_clear_events(struct acpiec_softc *);
>
> void acpiec_get_events(struct acpiec_softc *);
>
> @@ -82,7 +84,8 @@ void acpiec_unlock(struct
> acpiec_softc int acpiec_reg(struct acpiec_softc *);
>
> struct cfattach acpiec_ca = {
> - sizeof(struct acpiec_softc), acpiec_match, acpiec_attach
> + sizeof(struct acpiec_softc), acpiec_match, acpiec_attach,
> + NULL, acpiec_activate
> };
>
> struct cfdriver acpiec_cd = {
> @@ -296,6 +299,8 @@ acpiec_attach(struct device *parent, str
> acpi_set_gpehandler(sc->sc_acpi, sc->sc_gpe,
> acpiec_gpehandler, sc, 1);
> #endif
> +
> + /* acpiec_clear_events(sc); */
>
> if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_GLK", 0,
> NULL, &res)) sc->sc_glk = 0;
> @@ -307,6 +312,20 @@ acpiec_attach(struct device *parent, str
> printf("\n");
> }
>
> +int
> +acpiec_activate(struct device *self, int act)
> +{
> + struct acpiec_softc *sc = (struct acpiec_softc *)self;
> +
> +
> + switch (act) {
> + case DVACT_RESUME:
> + acpiec_clear_events(sc);
> + break;
> + }
> + return (0);
> +}
> +
> void
> acpiec_get_events(struct acpiec_softc *sc)
> {
> @@ -552,4 +571,18 @@ acpiec_unlock(struct acpiec_softc *sc)
> }
>
> sc->sc_ecbusy = 0;
> +}
> +
> +void
> +acpiec_clear_events(struct acpiec_softc *sc)
> +{
> + int i;
> +
> + for (i = 0; i < 100; i++) {
> + acpiec_write_cmd(sc, EC_CMD_QR);
> + sc->sc_gotsci = 0;
> + if ((acpiec_status(sc) & EC_STAT_SCI_EVT) !=
> EC_STAT_SCI_EVT) {
> + break;
> + }
> + }
> }
>
--
Vigdis