# Can't power off



## tim-m89 (Jun 26, 2009)

I have freebsd 7.2 amd64 installed on my sony vaio sz-483n laptop. I have never manged to get it to power off. It almost finishes the shutdown sequence, the screen goes blank, but then it just hangs. Key presses have no effect and strangely I cant power off by holding down the power button for a long time which would always work in any situation other than when freebsd tries to power off. I then have to pull the power chord and remove the battery as it becomes the only way for it to do anything. I have tried to look into this myself for hours, attempted to put up with it but it so frustrating I need simple fix for this. Rebooting works fine but Windows and linux can both power off my laptop. Please help.


----------



## agioffe (Jun 26, 2009)

How do You power off Your machine? I usually recommend to type
(as root)

root> sync; sync; halt

or even

root> sync; sync; reboot

(and power it off by pushing the power button when it reboots).

If You have acpi enabled, the following line also works well:

root> sync; sync; acpiconf -s 5


----------



## tim-m89 (Jun 26, 2009)

This doesn't really help. I used to type halt -p and it would hang on the final step as it just tries to power off. I now have gnome so I click System->Shutdown and it will close it self down safely and then does pretty much the same thing as calling halt -p. If I understand correctly halt syncs by default. How do I get halt -p to work. Also sysctl reports this "hw.acpi.supported_sleep_state: S3 S4 S5" but I get an error when I try to eneter that state acpiconf: invalid sleep type (5).


----------



## agioffe (Jun 26, 2009)

Doesn't even the variant with reboot work? 

I suppose halt doesn't sync by itself, so two syncs provide the disks are OK before the shutdown, but this is certainly not the issue here.


----------



## tim-m89 (Jun 27, 2009)

Yes rebooting works fine (as I said in first post). I need to power off.

Edit:

I am using 7.2 now. Will powering off be a feature I can look forward to in the upcoming FreeBSD 8.0? I need this real bad.


----------



## klaudivs (Sep 23, 2010)

*not yet!*

Sorry to dissapoint but I have exactly the same problem on a 8.1 system


```
login as: cla
Using keyboard-interactive authentication.
Password:
Last login: Thu Sep 23 00:19:38 2010 from 192.168.1.2
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.

FreeBSD 8.1-RELEASE (GENERIC) #0: Mon Jul 19 02:55:53 UTC 2010

Welcome to FreeBSD!
$ uname -a
FreeBSD beasty.home 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     
[email]root@almeida.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  i386
```
So I suppose i'll have to wait for the next version to do the trick
But in the meantime any updates would be usefull
Cheers!


----------



## rjreynolds (Sep 25, 2010)

*FreeBSD can't power off laptops then??*

I am 100% new to the operating system, and after looking into several other unix and unix like operating systems, and the pains that a newbie will endure in taking the plunge,  I decided to go with FreeBSD. However, this thread caught my attention, since I was planning on doing my first install on an IBM ThinkPad X series (comes currently installed with Windows 7). 

Pardon me if this question may seem unintelligent to some of you, but if I understand correctly, FreeBSD will not power down laptop correctly? Read through the installation section of handbook, and did not see mention of this issue. Any information would be greatly appreciated.  

rj


----------



## kpa (Sep 25, 2010)

FreeBSD will power down the computer if you run: `# shutdown -p now`. However some BIOSes have bugs in their ACPI implementation that prevent the power down completing successfully.


----------



## rjreynolds (Sep 25, 2010)

*list of bios*



			
				kpa said:
			
		

> FreeBSD will power down the computer if you run: `# shutdown -p now`. However some BIOSes have bugs in their ACPI implementation that prevent the power down completing successfully.



Is there a list of the working or non working bios?


----------



## wblock@ (Sep 25, 2010)

rjreynolds said:
			
		

> Is there a list of the working or non working bios?



It's really a per-model thing.  You may be able to find out if a particular model has working ACPI here: http://laptop.bsdgroup.de/freebsd/index.html.


----------



## rjreynolds (Sep 25, 2010)

wblock said:
			
		

> It's really a per-model thing.  You may be able to find out if a particular model has working ACPI here: http://laptop.bsdgroup.de/freebsd/index.html.



thanks for the info...


----------



## klaudivs (Sep 28, 2010)

*not sure I agree*



			
				kpa said:
			
		

> FreeBSD will power down the computer if you run: `# shutdown -p now`. However some BIOSes have bugs in their ACPI implementation that prevent the power down completing successfully.


My machine for instance had XP on it before and it power down normaly, even more i was able
to wake it from soft mode power down with wake on lan utilities(I'm still working to get it running under "beasty").
I haven't changed anything in the bios and the only thing changed is the OS.
Take it FWIW.


----------



## Beastie (Sep 28, 2010)

klaudivs said:
			
		

> My machine for instance had XP on it before and it power down normaly


APM maybe?


----------



## kpa (Sep 28, 2010)

klaudivs said:
			
		

> My machine for instance had XP on it before and it power down normaly, even more i was able
> to wake it from soft mode power down with wake on lan utilities(I'm still working to get it running under "beasty").
> I haven't changed anything in the bios and the only thing changed is the OS.
> Take it FWIW.



I'm talking about the ACPI BIOS implementation, not the BIOS setup program or BIOS settings. The reason the powerdown works in your case with WinXP and not with FreeBSD is most likely that WinXP has a specific workaround for your hardware to avoid the quirks of the APCI BIOS implementation and FreeBSD does not.


----------



## klaudivs (Sep 29, 2010)

*Got it*

Missed the implementation part in the previous post ....silly me.
Anyway the problem went away after building the world and recompiling the kernel.
Now I have the same functionality (regarding wake on lan and soft power modes) as in XP 
I can put the machine to sleep and wake it remotely witch is what I wanted all along.
Hope this helps some other poor soul trying to get started with "beasty"
Best of luck!


----------

