I am trying to shut down my laptop using the voltage sensors.
Unfortunatly I can't test this with a generic kernel because all my
sensors on my only -current box come from the ACPI subsystem.

The problem is, the limits don't seems to work:

$ sysctl hw.sensors.acpibat0.volt1
hw.sensors.acpibat0.volt1=7.96 VDC (current voltage), OK
$ tail -3 /etc/sensorsd.conf
hw.sensors.acpibat0.volt1:low=8V:high=9V
#:command=/etc/sensorsd/shutdown "%2" "%3"

$ sudo sensorsd -d
^C
$ tail -1 /var/log/messages
Jan 12 18:25:24 trin sensorsd[15369]: hw.sensors.acpibat0.volt1: within limits, 
value: 7.96 V DC
$

I think that should trip the low limit.

I changed it to "low=5V:high=9V" and it works as expected.  The log says
it is within limits.

But, if I change the entry in sensorsd.conf to "low=5V:high=6V" (should
trip the high limit) it still claims the sensors are within limits.

Am I doing something stupid?


The diff for the acpi kernel

--- GENERIC     Fri Jan  5 18:54:24 2007
+++ ACPI        Thu Jan 11 21:20:37 2007
@@ -57,19 +57,19 @@
 eisa0  at mainbus0
 pci*   at mainbus0
 
-#option                ACPIVERBOSE
-#option                ACPI_ENABLE
+option         ACPIVERBOSE
+option         ACPI_ENABLE
 
-acpi0          at mainbus?     disable
-#acpitimer*    at acpi?
-#acpihpet*     at acpi?
-#acpiac*       at acpi?
-#acpibat*      at acpi?
-#acpibtn*      at acpi?
-#acpicpu*      at acpi?
-acpiec*                at acpi?        disable
+acpi0          at mainbus?
+acpitimer*     at acpi?
+acpihpet*      at acpi?
+acpiac*                at acpi?
+acpibat*       at acpi?
+acpibtn*       at acpi?
+acpicpu*       at acpi?
+acpiec*                at acpi?
 acpiprt*       at acpi?
-#acpitz*       at acpi?
+acpitz*                at acpi?
 
 option         PCIVERBOSE
 option         EISAVERBOSE

and my DMESG

OpenBSD 4.0-current (ACPI) #1: Thu Jan 11 21:42:30 MST 2007
    [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/ACPI
cpu0: Intel(R) Pentium(R) M processor 1.30GHz ("GenuineIntel" 686-class) 1.30 
GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,EST,TM2
real mem  = 1063415808 (1038492K)
avail mem = 961875968 (939332K)
using 4256 buffers containing 53293056 bytes (52044K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(d8) BIOS, date 12/01/05, BIOS32 rev. 0 @ 0xfd6a0, 
SMBIOS rev. 2.3 @ 0xd8010 (17 entries)
bios0: Sony Corporation VGN-TX770P
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 30102 dobusy 0 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xfd6a0/0x960
pcibios0: PCI BIOS has 17 Interrupt Routing table entries
pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82801FBM LPC" rev 0x00)
pcibios0: PCI bus #7 is the last bus
bios0: ROM list: 0xc0000/0x10000! 0xd8000/0x4000! 0xdc000/0x4000!
acpi0 at mainbus0: rev 0
acpi0: tables DSDT FACP APIC BOOT MCFG SSDT SSDT SSDT SSDT 
acpitimer0 at acpi0: can't identify bus
acpi device at acpi0 from table DSDT not configured
acpi device at acpi0 from table FACP not configured
acpi device at acpi0 from table APIC not configured
acpi device at acpi0 from table BOOT not configured
acpi device at acpi0 from table MCFG not configured
acpi device at acpi0 from table SSDT not configured
acpi device at acpi0 from table SSDT not configured
acpi device at acpi0 from table SSDT not configured
acpi device at acpi0 from table SSDT not configured
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 0 (PEGP)
acpiprt2 at acpi0: bus 6 (PCIB)
acpiec0 at acpi0: EC0_
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibat0 at acpi0: BAT1: model:  serial:  type: LION oem: Sony Corp.
acpiac0 at acpi0: AC unit online
acpicpu0 at acpi0: CPU0: 1300, 1000, 800, 600 MHz
acpitz0 at acpi0, critical temperature: 99 degC
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82915GM/PM/GMS Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82915GM/GMS Video" rev 0x03: aperture at 
0xb0080000, size 0x10000000
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
"Intel 82915GM/GMS Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801FB HD Audio" rev 0x03: irq 10
azalia0: host: High Definition Audio rev. 1.0
azalia0: codec: Realtek ALC260 (rev. 3.0), HDA version 1.0
azalia0: codec: 0x04x/0x14f1 (rev. 0.0), HDA version 0.9
azalia0: codec[1]: No support for modem function groups
azalia0: codec[1]: No audio function groups
audio0 at azalia0
uhci0 at pci0 dev 29 function 0 "Intel 82801FB USB" rev 0x03: irq 10
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 "Intel 82801FB USB" rev 0x03: irq 10
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2 "Intel 82801FB USB" rev 0x03: irq 3
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3 at pci0 dev 29 function 3 "Intel 82801FB USB" rev 0x03: irq 10
usb3 at uhci3: USB revision 1.0
uhub3 at usb3
uhub3: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7 "Intel 82801FB USB" rev 0x03: irq 10
usb4 at ehci0: USB revision 2.0
uhub4 at usb4
uhub4: Intel EHCI root hub, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
ppb0 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xd3
pci1 at ppb0 bus 6
cbb0 at pci1 dev 5 function 0 "TI PCI7XX1 CardBus" rev 0x00: irq 3
"TI PCI7XX1 FireWire" rev 0x00 at pci1 dev 5 function 2 not configured
"TI PCI7XX1 Flash" rev 0x00 at pci1 dev 5 function 3 not configured
sdhc0 at pci1 dev 5 function 4 "TI PCI7XX1 Secure Data" rev 0x00: irq 3
sdmmc0 at sdhc0
sdmmc1 at sdhc0
sdmmc2 at sdhc0
fxp0 at pci1 dev 8 function 0 "Intel 82801GB LAN" rev 0x03, i82562: irq 10, 
address 00:01:4a:f6:95:7d
inphy0 at fxp0 phy 1: i82562EM 10/100 PHY, rev. 0
iwi0 at pci1 dev 11 function 0 "Intel PRO/Wireless 2200BG" rev 0x05: irq 10, 
address 00:16:6f:64:a8:38
cbb0: bad Vcc request. sock_ctrl 0xffffff88, sock_status 0xffffffff
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 7 device 0 cacheline 0x10, lattimer 0x40
pcmcia0 at cardslot0
ichpcib0 at pci0 dev 31 function 0 "Intel 82801FBM LPC" rev 0x03: PM disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801FB IDE" rev 0x03: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <TOSHIBA MK8007GAH>
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <MATSHITA, UJ-832D, 1.61> SCSI0 5/cdrom removable
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ichiic0 at pci0 dev 31 function 3 "Intel 82801FB SMBus" rev 0x03: polling
iic0 at ichiic0
isa0 at ichpcib0
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
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
biomask edfd netmask edfd ttymask ffff
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
ugen0 at uhub2 port 1
ugen0: ALPS UGX, rev 2.00/19.15, addr 2
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302

l8rZ,
-- 
andrew - ICQ# 253198 - JID: [EMAIL PROTECTED]

BOFH excuse of the day: Software uses US measurements, but the OS is in
    metric...

Reply via email to