Re: powering off with shutdown -hp?

2009-10-29 Thread Fred Snurd
Rene wrote:
 You can try to disable apm inthe kernel config. 

Christian wrote:
 Remco wrote:
 If I remember correctly, the following hack in /etc/sysctl.conf worked for
 me on a Pentium II machine:
 machdep.apmhalt=1# 1=powerdown hack, try if halt -p doesn't work

 It does work for my Pentium III-based Thinkpad A20m.

Both methods worked!  Either by disabling apm at UKC or by editing sysctl.conf.

Theo wrote:
 There is a sophisticated heuristic in play.

Thanks for jogging my memory!  Not that the following describes all the gory 
details, but part of this heuristic is based on the SMBIOS version.  Single 
processor system older than 2.4 (mine's 2.1) gets APM:

http://marc.info/?l=openbsd-techm=124545473209570w=2

If anyone cares to indulge me further, is there any preference/advantage of 
going with ACPI over APM?

Thanks again for such a great operating system!  I'm always amazed at how 
OpenBSD helps keep old systems usable!



Re: powering off with shutdown -hp?

2009-10-28 Thread Rene Maroufi
On Tue, Oct 27, 2009 at 10:22:59PM -0700, Fred Snurd wrote:
 
From the dmesg (below), this appears to be an old APM-based
motherboard.  The shutdown(8) manpage states that  not all hardware
supports automatic power down.  That's fine if this hardware doesn't
support it, but given the Attempting to power down... message, I am
curious if it might be possible.
 
 apm0 at bios0: Power Management spec V1.2
 apm0: AC on, battery charge unknown
 acpi at bios0 function 0x0 not configured

Your dmesg show that your machine can do apm and acpi. OpenBSD uses
always apm if both is possible. Sometimes these old machines can
poweroff only with acpi, but not with apm. You can try to disable apm in
the kernel config. OpenBSD then uses acpi. Maybe this works for
poweroff. I have a old machine that can't poweroff with apm, but can do
it with acpi.

Regards
Rene
-- 
Reni Maroufi
i...@maroufi.net



Re: powering off with shutdown -hp?

2009-10-28 Thread Theo de Raadt
 From the dmesg (below), this appears to be an old APM-based
 motherboard.  The shutdown(8) manpage states that  not all hardware
 supports automatic power down.  That's fine if this hardware doesn't
 support it, but given the Attempting to power down... message, I am
 curious if it might be possible.
  
  apm0 at bios0: Power Management spec V1.2
  apm0: AC on, battery charge unknown
  acpi at bios0 function 0x0 not configured
 
 Your dmesg show that your machine can do apm and acpi. OpenBSD uses
 always apm if both is possible.

Wrong.  There is a sophisticated heuristic in play.

 Sometimes these old machines can
 poweroff only with acpi, but not with apm.

Wrong.  Something else is wrong.

 You can try to disable apm in
 the kernel config. OpenBSD then uses acpi. Maybe this works for
 poweroff. I have a old machine that can't poweroff with apm, but can do
 it with acpi.



Re: powering off with shutdown -hp?

2009-10-28 Thread Remco
Fred Snurd wrote:

 I've just resurrected an old Pentium 3 system with the 22 October i386
 snapshot of OpenBSD 4.6-current.  It works great, however after issuing
 shutdown -hp now (I'm greeted with the message shutdown: switch -p must
 be used with -h. when using shutdown -p now), I'm getting the system
 message syncing disks... done followed by Attempting to power down
  The system never shuts off.
 
 From the dmesg (below), this appears to be an old APM-based motherboard. 
 The shutdown(8) manpage states that  not all hardware supports automatic
 power down.  That's fine if this hardware doesn't support it, but given
 the Attempting to power down... message, I am curious if it might be
 possible.
 

If I remember correctly, the following hack in /etc/sysctl.conf worked for
me on a Pentium II machine:
machdep.apmhalt=1# 1=powerdown hack, try if halt -p doesn't work

(I can't verify it because the machine is totally disconnected right now)

regards,
Remco



Re: powering off with shutdown -hp?

2009-10-28 Thread Christian Weisgerber
Remco re...@d-compu.dyndns.org wrote:

 If I remember correctly, the following hack in /etc/sysctl.conf worked for
 me on a Pentium II machine:
 machdep.apmhalt=1# 1=powerdown hack, try if halt -p doesn't work

It does work for my Pentium III-based Thinkpad A20m.

-- 
Christian naddy Weisgerber  na...@mips.inka.de



powering off with shutdown -hp?

2009-10-27 Thread Fred Snurd
I've just resurrected an old Pentium 3 system with the 22 October i386 snapshot 
of OpenBSD 4.6-current.  It works great, however after issuing shutdown -hp 
now (I'm greeted with the message shutdown: switch -p must be used with -h. 
when using shutdown -p now), I'm getting the system message syncing disks... 
done followed by Attempting to power down  The system never shuts off.

From the dmesg (below), this appears to be an old APM-based motherboard.  The 
shutdown(8) manpage states that  not all hardware supports automatic power 
down.  That's fine if this hardware doesn't support it, but given the 
Attempting to power down... message, I am curious if it might be possible.

I'm including the dmesg output below along with pcidump -v and pcidump -x.  If 
you would like more information, please let me know.

Thanks!.

# dmesg | more
OpenBSD 4.6-current (GENERIC) #325: Thu Oct 22 20:38:45 MDT 2009
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium III (GenuineIntel 686-class, 512KB L2 cache) 599 MHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,SER,MMX,FXSR,SSE
real mem  = 804864000 (767MB)
avail mem = 771416064 (735MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 08/17/00, BIOS32 rev. 0 @ 0xfd7a0, SMBIOS 
rev. 2.1 @ 0xefbe0 (
42 entries)
bios0: vendor Intel Corp. version 4S4EB2X0.86A.0024.P17 date 08/17/2000
bios0: Intel Corporation SE440BX-2
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xfd7a0/0x860
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/176 (9 entries)
pcibios0: PCI Interrupt Router at 000:07:0 (Intel 82371FB ISA rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc/0x8000 0xc8000/0x1000 0xc9000/0x1000 0xe/0x4000! 
0xe4000/0xc000
cpu0 at mainbus0: (uniprocessor)
cpu0: disabling processor serial number
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel 82443BX AGP rev 0x03
intelagp0 at pchb0
agp0 at intelagp0: aperture at 0xf800, size 0x400
ppb0 at pci0 dev 1 function 0 Intel 82443BX AGP rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 Matrox MGA G400/G450 AGP rev 0x05
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
piixpcib0 at pci0 dev 7 function 0 Intel 82371AB PIIX4 ISA rev 0x02
pciide0 at pci0 dev 7 function 1 Intel 82371AB IDE rev 0x01: DMA, channel 0 
wired to compatibility
, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: ST3160815A
wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: PLEXTOR, DVDR PX-820A, 1.00 ATAPI 5/cdrom 
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
uhci0 at pci0 dev 7 function 2 Intel 82371AB USB rev 0x01: irq 9
piixpm0 at pci0 dev 7 function 3 Intel 82371AB Power rev 0x02: SMI
iic0 at piixpm0
lmenv0 at iic0 addr 0x2d: adm9240 rev 2, starting scan
spdmem0 at iic0 addr 0x50: 256MB SDRAM ECC PC133CL2
spdmem1 at iic0 addr 0x51: 256MB SDRAM ECC PC133CL2
spdmem2 at iic0 addr 0x52: 256MB SDRAM ECC PC133CL2
em0 at pci0 dev 13 function 0 Intel PRO/1000GT (82541GI) rev 0x05: irq 11, 
address 00:1b:21:0f:8b:
43
fxp0 at pci0 dev 14 function 0 Intel 8255x rev 0x08, i82559: irq 10, address 
00:90:27:a7:50:80
inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4
ohci0 at pci0 dev 15 function 0 NEC USB rev 0x43: irq 5, version 1.0
ohci1 at pci0 dev 15 function 1 NEC USB rev 0x43: irq 9, version 1.0
ehci0 at pci0 dev 15 function 2 NEC USB rev 0x04: irq 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 NEC EHCI root hub rev 2.00/1.00 addr 1
isa0 at piixpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
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
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 NEC OHCI root hub rev 1.00/1.00 addr 1
usb3 at ohci1: USB revision 1.0
uhub3 at usb3 NEC OHCI root hub rev 1.00/1.00 addr 1
biomask eb65 netmask ef65 ttymask 
mtrr: Pentium Pro MTRR support
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

# pcidump -v
Domain /dev/pci0:
 0:0:0: Intel 82443BX AGP
0x: Vendor ID: 8086 Product