DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 16th August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default (SOLVED)`halt -p` cannot power down my box

I am using OpenBSD 5.1 release. When i run `/sbin/halt -p`, the system will quit and syncing disk, but the power is still on.

I must press the power button for a while, the power can be down.

FYI, The freebsd 9.0 on the same box can power down it automatically by running `/sbin/shutdown -p now`.


Sincerely!

Last edited by sw2wolf; 17th August 2012 at 05:21 AM.
Reply With Quote
  #2   (View Single Post)  
Old 16th August 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by sw2wolf View Post
I am using OpenBSD 5.1 release. When i run `/sbin/halt -p`, the system will quit and syncing disk, but the power is still on.
Without information on the hardware (dmesg(8) output?), all anyone can do is guess.

As a guess, look at the shutdown(8) manpage. Specifying -hp instead of -p may be your friend.
Reply With Quote
  #3   (View Single Post)  
Old 16th August 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

See if this solution works for you.

http://marc.info/?t=132978307700002&r=1&w=2
Reply With Quote
  #4   (View Single Post)  
Old 16th August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

thanks for all your suggestion. But it still doesnot work.

BTW, how can i get the dmesg info about power down ?

Regards!
Reply With Quote
  #5   (View Single Post)  
Old 16th August 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by sw2wolf View Post
...how can i get the dmesg info ...?
  1. $ dmesg > my_dmesg_output.txt
  2. # Copy entire contents of my_dmesg_output.txt to a response to this thread.
  3. # Place [code] above the first line of your dmesg(8) output.
  4. # Place [/code] after the last line of your dmesg(8) output.
  5. # Insert a new line above [code] with the following contents:
    Here is the dmesg output of the computer having problems with shutdown -p:
  6. # Press Submit Reply.
Reply With Quote
  #6   (View Single Post)  
Old 16th August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

Quote:
Originally Posted by ocicat View Post
[list=1][*] $ dmesg > my_dmesg_output.txt
...
thanks ! but what i want to know is whether or not the dmesg output contains information about the last time power down. Because i must reboot the box to run `dmesg` which seems donot contain such information.

Sorry for my poor english !
Reply With Quote
  #7   (View Single Post)  
Old 17th August 2012
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Power management varies with architecture and the age of the motherboard. In OpenBSD i386 apm is enabled by default whereas in amd64 acpi. Your dmesg will tell the forum what architecture you have and would also reveal problems loading the various acpi components. The other thing that may be helpful is to list the motherboard model or the model of laptop.
Reply With Quote
  #8   (View Single Post)  
Old 17th August 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by shep View Post
Power management varies with architecture and the age of the motherboard
Per information posted on tech@ some time back:

http://marc.info/?l=openbsd-tech&m=124545473209570&w=2

...the relevant information is find in dmesg(8) is the SMBIOS version or see how the kernel is identifying multiple cores.
Quote:
Originally Posted by sw2wolf
...what i want to know is whether or not the dmesg output contains information about the last time power down.
The easiest way to answer this question is look.
Reply With Quote
  #9   (View Single Post)  
Old 17th August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

The following is output of dmesg(Both `shutdown -ph` and `halt -p` donot power down the box)
Code:
OpenBSD 5.1 (GENERIC) #160: Sun Feb 12 09:46:33 MST 2012
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Celeron(R) CPU 2.00GHz ("GenuineIntel" 686-class) 2 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF
real mem  = 527953920 (503MB)
avail mem = 509222912 (485MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/20/02, BIOS32 rev. 0 @ 0xfb150, SMBIOS rev. 2.3 @ 0xf0800 (34 entries)
bios0: vendor Award Software International, Inc. version "6.00 PG" date 06/20/2002
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices SLPB(S5) HUB0(S5) USB0(S1) USB1(S1) USB2(S1) USB3(S1) MODM(S5) UAR1(S5) UAR2(S5) PCI0(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 99MHz
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (HUB0)
acpicpu0 at acpi0
acpitz0 at acpi0: critical temperature is 60 degC
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
bios0: ROM list: 0xc0000/0xae00!
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82845G Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82845G Video" rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x8000000
inteldrm0 at vga1: apic 2 int 16
drm0 at inteldrm0
uhci0 at pci0 dev 29 function 0 "Intel 82801DB USB" rev 0x02: apic 2 int 16
uhci1 at pci0 dev 29 function 1 "Intel 82801DB USB" rev 0x02: apic 2 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801DB USB" rev 0x02: apic 2 int 18
ehci0 at pci0 dev 29 function 7 "Intel 82801DB 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
ppb0 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0x82
pci1 at ppb0 bus 1
cmpci0 at pci1 dev 0 function 0 "C-Media Electronics CMI8738/C3DX Audio" rev 0x10: apic 2 int 16
audio0 at cmpci0
opl at cmpci0 not configured
mpu at cmpci0 not configured
rl0 at pci1 dev 1 function 0 "Realtek 8139" rev 0x10: apic 2 int 21, address 00:e0:4c:ff:85:2e
rlphy0 at rl0 phy 0: RTL internal PHY
ichpcib0 at pci0 dev 31 function 0 "Intel 82801DB LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801DB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <QUANTUM FIREBALLlct10 20>
wd0: 16-sector PIO, LBA, 19469MB, 39874367 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
atapiscsi0 at pciide0 channel 1 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <NEC, CD-ROM DRIVE:282, 3.63> ATAPI 5/cdrom removable
cd0(pciide0:1:1): using PIO mode 4, DMA mode 2
ichiic0 at pci0 dev 31 function 3 "Intel 82801DB SMBus" rev 0x02: apic 2 int 17
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 256MB DDR SDRAM non-parity PC2700CL2.5
spdmem1 at iic0 addr 0x51: 256MB DDR SDRAM non-parity PC2100CL2.5
auich0 at pci0 dev 31 function 5 "Intel 82801DB AC97" rev 0x02: apic 2 int 17, ICH4 AC97
ac97: codec id 0x414c4730 (Avance Logic ALC101)
ac97: codec features Realtek 3D
audio1 at auich0
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
isa0 at ichpcib0
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
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x2e/2: W83627HF rev 0x0d
wbsio0 port 0x290/2 not configured
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
mtrr: Pentium Pro MTRR support
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on wd0a (9147124918b40255.a) swap on wd0b dump on wd0b
inteldrm0: gpu hung!
Sincerely!
Reply With Quote
Old 17th August 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by sw2wolf View Post
The following is output of dmesg(Both `shutdown -ph` and `halt -p` donot power down the box)
So, sw2wolf, do you know what the diff(1) utility does?

Here is your assignment:
  1. Power down the system using shutdown -ph now.
  2. Boot the system, & save the output of dmesg(8).
  3. Power down the system using halt -p.
  4. Boot the system, & save the output of dmesg(8).
  5. diff(1) the two dmesg(8) outputs against each other.
  6. Post the output of running diff(1) on these two files.
  7. Explain what the output means.

Last edited by ocicat; 17th August 2012 at 03:44 AM. Reason: add clarity
Reply With Quote
Old 17th August 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I don't know if sw2wolf will see any differences, since shutdown -h calls halt(8) anyway.

This is interesting:
Code:
inteldrm0: gpu hung!
I wonder what time it was produced? Was it during the shutdown procedure, or at another time? If during normal operations (multiuser) it should have been captured by syslogd(8) and would have appeared in /var/log/messages with a time stamp. If during shutdown, syslogd may have already been halted.
Reply With Quote
Old 17th August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

@jggimi
sorry for my careless. After `sysctl -w machdep.apmhalt=1`, `halt -p` works normally.

Best Regards!
Reply With Quote
Old 17th August 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by jggimi View Post
I don't know if sw2wolf will see any differences, since shutdown -h calls halt(8) anyway.
Agreed, & that was the point. sw2wolf had asked earlier:
Quote:
Originally Posted by sw2wolf
...what i want to know is whether or not the dmesg output contains information about the last time power down.
  1. Effective use of diff(1) would readily answer this question.
  2. Subsequent poking through the source would lead to understanding that halt(8) is the endpoint of both utilities.
Reply With Quote
Old 19th August 2012
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 405
Default

Quote:
Originally Posted by sw2wolf View Post
@jggimi
sorry for my careless. After `sysctl -w machdep.apmhalt=1`, `halt -p` works normally.

Best Regards!
It's also possible to edit the /etc/rc.shutdown script, which is run at shutdown time.
If it sets the variable powerdown to ``YES'', halt will attempt to power down the machine after it has halted.

Source : man halt
Reply With Quote
Old 26th August 2012
girarde girarde is offline
Fdisk Soldier
 
Join Date: Nov 2010
Location: NW FL
Posts: 75
Default

An annoying but helpful reminder:

Post complete dmesgs. Not snippets. A corollary of a user's having a problem is that the user might not really know which parts of the dmesg matter.
Reply With Quote
Old 29th January 2014
yezster yezster is offline
Port Guard
 
Join Date: Jan 2014
Posts: 17
Default

I used to have the same problem... I have done all the things mentioned above plus I enabled ErP feature under power management on my bios. This is for the record in case it might help, I have mine fixed that way...

Cheers and sorry for my poor english...
Reply With Quote
Old 30th January 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Welcome to daemonforums, yezster, and thanks for sharing your experience!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Euro watchdog asks Google to HALT privacy tweak J65nko News 0 4th February 2012 12:27 AM
Gnome power management? codeFreak OpenBSD Packages and Ports 5 6th March 2011 03:21 AM
halt -p problem dmiparo OpenBSD General 8 30th June 2010 09:47 AM
Fighting for the power vermaden FreeBSD General 0 5th May 2009 06:49 AM
What's all this power for ? Snoop1990 FreeBSD General 20 9th July 2008 10:59 PM


All times are GMT. The time now is 08:23 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick