# System does not power off on FreeBSD 10.3



## jailed (Aug 16, 2016)

Hello,

I've a desktop computer which I am using as backup server for several years. Currently it has 10.3-RELEASE-p7 on it.

The problem is system is rebooting instead of powering off. I've tested it with Windows and Linux and there is no hardware problem. Both Windows and Linux can power off on same computer without any problem.

Motherboard: Asus P5G41T-M LX

It has 700 watt Thermaltake PSU. I've also tested it with OCZ PSU. And since I've tested the computer with Windows and Linux, it's not hardware problem.

I'd be very happy if someone helps me.

Thanks in advance.


----------



## SirDice (Aug 16, 2016)

What command do you use to shutdown the machine?


----------



## jailed (Aug 16, 2016)

Hello,

I'm using these commands, none of them power off, all restarting.

`# shutdown -p now
# shutdown -h now
# poweroff`


----------



## SirDice (Aug 16, 2016)

The `shutdown -h now` shouldn't even power off the machine and show a message like "it's now safe to turn off the computer". Is there anything in /var/log/messages?

And have you tried looking for a BIOS update for the board? These things tend to be done through ACPI and it's possible there's a bug (or bad implementation).


----------



## jailed (Aug 16, 2016)

Hello,

I clearly know what `shutdown -h now` does. I'm trying it to see if it reacts abnormal.


```
Aug 16 12:18:28 backup shutdown: power-down by x:
Aug 16 12:18:29 backup kernel: .
Aug 16 12:18:29 backup kernel: .
Aug 16 12:18:29 backup syslogd: exiting on signal 15
```

BIOS is already at the latest version.


----------



## jailed (Aug 16, 2016)

And I would like to add that, old FreeBSD versions can shutdown without problem like Windows and Linux. The problem only appears on FreeBSD 10.3.

I am using this server for several years as backup server. The problem appeared in 2-3 months ago, when I installed FreeBSD 10.3 on it. Before that I was using it without any problem.


----------



## drhowarddrfine (Aug 16, 2016)

I've noticed the same thing for many months but haven't taken the time to look into it. I don't have the same hardware but I am running version 10.3. 

My system appears to shutdown, however, if I hit a key on the keyboard, it boots up. Does yours do that?


----------



## youngunix (Aug 16, 2016)

First, see if `# init 0` works.

From the handbook:

```
11.13.2.5. System Powers Up After Suspend or Shutdown

First, try setting hw.acpi.disable_on_poweroff="0" in /boot/loader.conf. This keeps ACPI from disabling various events during the shutdown process. Some systems need this value set to 1 (the default) for the same reason. This usually fixes the problem of a system powering up spontaneously after a suspend or poweroff.
```


```
11.13.2.6. BIOS Contains Buggy Bytecode

Some BIOS vendors provide incorrect or buggy bytecode. This is usually manifested by kernel console messages like this:

ACPI-1287: *** Error: Method execution failed [\\_SB_.PCI0.LPC0.FIGD._STA] \\
(Node 0xc3f6d160), AE_NOT_FOUND
Often, these problems may be resolved by updating the BIOS to the latest revision. Most console messages are harmless, but if there are other problems, like the battery status is not working, these messages are a good place to start looking for problems.
```
If your BIOS is up to date, you can reset it which usually fix these type of problems.


----------



## jailed (Aug 17, 2016)

drhowarddrfine,
My problem is not same. I don't press any key. It just restart the PC instead of poweroff. If your PC powers off and then power on with key press, I think you should check your BIOS settings for power management / keyboard section.

youngunix,
Thank you for your reply. But your suggestions didn't work.

Also, there is no error message in dmesg output. System is shuting down without any problem on FreeBSD 9.0, FreeBSD 10.1, CentOS and Windows. I've just checked all of them today to be sure.

Also, I am clearly remembering that there was no problem in the past with previous versions. I am using this server for several years with previous FreeBSD versions. 2-3 months ago I wanted to upgrade the system to FreeBSD 10.3. Previously I was using FreeBSD 10.1 without problem.


----------



## drhowarddrfine (Aug 17, 2016)

jailed said:


> I think you should check your BIOS settings for power management / keyboard section.


Except I haven't touched those since I built this machine almost three years ago.


----------



## jailed (Aug 17, 2016)

drhowarddrfine,

Ah I'm sorry, since you've said it restart with key press, I though about BIOS settings.

Our situation is similar but not same. I don't have any keyboard or mouse connected to the computer. It's running as server just with power cord and network cable.

As we both declared, this happens only on FreeBSD 10.3.


----------



## cyrano (Aug 18, 2016)

FWIW:

This is happening with the PPC build of 10.3 on a G5 too. I hadn't paid much attention to it, as I'm still installing stuff and it reboots automatically into OSX, which is what I usually need.


----------



## SirDice (Aug 18, 2016)

Usually it's a problem with ACPI, some manufactures seem to not implement things correctly or just differently. There used to be a section in the handbook about debugging ACPI but I can't seem to find it any more. I'll see if I can dig it up somewhere.

Edit: Found it in an old copy of the handbook. Most of it should still be usable. 
https://docs.freebsd.org/doc/6.1-RELEASE/usr/share/doc/handbook/acpi-debug.html


----------



## ASX (Aug 26, 2016)

jailed said:


> Also, I am clearly remembering that there was no problem in the past with previous versions. I am using this server for several years with previous FreeBSD versions. 2-3 months ago I wanted to upgrade the system to FreeBSD 10.3. Previously I was using FreeBSD 10.1 without problem.



I have experienced a similar but not identical problem when switching from 10.1 to 10.2 on an old machine, in my case the problem was related to a setting in device.hints:

hint.acpi_throttle.0.disabled="1"

The removal of this flag was described in 10.2 release notes:

"Throttling via ACPI and P4TCC via device.hints(5) have been turned off by default. [r276986]"

It seems you skipped 10.2 entirely ... may worth a check.


----------



## P3p0x (Apr 15, 2017)

Any news of solutions of this?


----------

