# Freebsd Dont shutdown or reboot



## P3p0x (Apr 13, 2017)

Well i make a new installation of Freebsd, in the 11 version, and i cant make a normal shutdown or reboot.
i try shutdown -r now, halt, poweroff and always  stay in pcm8: detached
i upload a pic with the message.
i try with root and the result is the same.


----------



## getopt (Apr 13, 2017)

Looks like you are trying to shutdown as user from within X.
From legendary FreeBSD Handbook: 12.5. Shutdown Sequence


			
				https://www.freebsd.org/doc/en/books/handbook/boot-shutdown.html said:
			
		

> One must be root or a *member of operator* in order to run shutdown(8).


----------



## rigoletto@ (Apr 13, 2017)

getopt He/she said the same happens when the shutdown is executed by root, also when the user is not in operator group it give you an error message and do not start the shutdown.

I believe, for some reason, the system is doing to halt. It may indicate some ACPI related problem. So take a look if everything is fine at BIOS/UEFI, and if it is tell us more about your hardware.


----------



## P3p0x (Apr 13, 2017)

In root user it's the same thing, in bios/uefi it's all fine, I upload a photo trying to shutdown the system with root.

What else can I do?

My hardware is
Motherboard : evga z170 ftw 
32gb ram
6700k Intel
And a ssd.


----------



## getopt (Apr 13, 2017)

> init: some processes would not die; ps axl advised



So I would just follow this advice and do `ps axl > processes && shutdown -p now`. 
Search the output for suspects or post it here.


----------



## P3p0x (Apr 13, 2017)

Ok I did it, but where save the log for post it here?


----------



## rigoletto@ (Apr 13, 2017)

You can use some pastebin.


----------



## P3p0x (Apr 14, 2017)

lebarondemerde said:


> You can use some pastebin.


lol no, i want know where is the output or log from the ps axl > processes
XD and later i can upload


----------



## rigoletto@ (Apr 14, 2017)

`ps axl > processes` will create a file called processes in the filesystem path you executed that command. So, if you executed it from $HOME, it should be in there.


----------



## P3p0x (Apr 14, 2017)

lebarondemerde said:


> `ps axl > processes` will create a file called processes in the filesystem path you executed that command. So, if you executed it from $HOME, it should be in there.



here is the pastebin
https://pastebin.com/1n7NfwWi
i dont know why the last column its cutted :/


----------



## Chris_H (Apr 14, 2017)

I ran into this -- or at least very similar, on a fresh 12-CURRENT install. What I found was, that it had _actually_ finished the shutdown (halt(8) actually) but simply didn't echo the "finished" message(s) to the console.
What happens if you issue a halt(8). Then, shortly after you see the message it (seems) to get stuck at. Simply hit the ENTER key. Does it reboot? That's what happened for me. Everything actually finished. But there was no indication on the console/screen. If I hit ENTER, it'd reboot, or shutdown/power-off. I found that when I updated my system, everything worked as it was supposed to.

Just thought I'd mention it.

HTH

--Chris


----------



## P3p0x (Apr 14, 2017)

Chris_H said:


> I ran into this -- or at least very similar, on a fresh 12-CURRENT install. What I found was, that it had _actually_ finished the shutdown (halt(8) actually) but simply didn't echo the "finished" message(s) to the console.
> What happens if you issue a halt(8). Then, shortly after you see the message it (seems) to get stuck at. Simply hit the ENTER key. Does it reboot? That's what happened for me. Everything actually finished. But there was no indication on the console/screen. If I hit ENTER, it'd reboot, or shutdown/power-off. I found that when I updated my system, everything worked as it was supposed to.
> 
> Just thought I'd mention it.
> ...



Nope I try it and nothing stuck and doesn't respond, hit enter a lot of times and nothing.

i try again the ps axl > processes without start xfce
https://pastebin.com/iq33fRuq 
this is the new pastebin


----------



## Chris_H (Apr 14, 2017)

Does the same happen issuing the command `reboot`?
Just wondering if it's a USB keyboard, and that it's detached after issuing a halt. So nothing more is received.
Just a thought. I have to admit; the only other thing (short side of a process not dying) is that the user you're issuing the command isn't allowed to. But you indicated you attempted this as root. So the keyboard thing, is the only other thing I can think of. Unless you're attempting to do this within a terminal while in X(org).

--Chris


----------



## rigoletto@ (Apr 14, 2017)

P3p0x post your /var/run/dmesg.boot so we can see if there is anything _interesting_ during boot.


----------



## P3p0x (Apr 14, 2017)

Chris_H said:


> Does the same happen issuing the command `reboot`?
> Just wondering if it's a USB keyboard, and that it's detached after issuing a halt. So nothing more is received.
> Just a thought. I have to admit; the only other thing (short side of a process not dying) is that the user you're issuing the command isn't allowed to. But you indicated you attempted this as root. So the keyboard thing, is the only other thing I can think of. Unless you're attempting to do this within a terminal while in X(org).
> 
> --Chris


Yes, it is a USB keyboard, and my motherboard dont have any port PS2, to check this.
yes i try it always at root, and my user, and the result it is the same.
i try it without a window manager, just terminal, and the result its the same :/




lebarondemerde said:


> P3p0x post your /var/run/dmesg.boot so we can see if there is anything _interesting_ during boot.



here is it
https://pastebin.com/4THBF9XW


----------



## rigoletto@ (Apr 14, 2017)

I do not know what it means in practice, but eventually someone appear and say if it is relevant or not:


```
acpi0: <ALASKA A M I > on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
ACPI Error: Mutex [0x0] is not acquired, cannot release (20160527/utmutex-386)
ACPI Error: Could not release AML Interpreter mutex (20160527/exutils-147)
ACPI Error: Mutex [0x0] is not acquired, cannot release (20160527/utmutex-386)
ACPI Error: Could not release AML Interpreter mutex (20160527/exutils-147)
cpu1: <ACPI CPU> on acpi0
ACPI Error: Mutex [0x0] is not acquired, cannot release (20160527/utmutex-386)
ACPI Error: Could not release AML Interpreter mutex (20160527/exutils-147)
ACPI Error: Mutex [0x0] is not acquired, cannot release (20160527/utmutex-386)
ACPI Error: Could not release AML Interpreter mutex (20160527/exutils-147)
```

EDIT: You may want to take a look in Thread 59627.


----------



## rigoletto@ (Apr 14, 2017)

You may want to give try booting the system in Legacy (BIOS) mode instead of UEFI.


----------



## P3p0x (Apr 14, 2017)

lebarondemerde said:


> You may want to give try booting the system in Legacy (BIOS) mode instead of UEFI.


its booting in legacy!!!
now i look the other thread


----------



## rigoletto@ (Apr 14, 2017)

In the worse scenario, until this bug be nailed, it is safe to turn off or reboot (reset button) when the system is in halt. It is the exactly the way we used to do it before ACPI do exist.

Halt is more well know by the Windows message:


```
"It is now safe to turn off the computer"
```

But for the sake of correctness, if possible, I would use `shutdown -h now`.


----------



## P3p0x (Apr 14, 2017)

lebarondemerde said:


> In the worse scenario, until this bug be nailed, it is safe to turn off or reboot (reset button) when the system is in halt. It is the exactly the way we used to do it before ACPI do exist.
> 
> Halt is more well know by the Windows message:
> 
> ...


i discover something, with the live cd, i cant halt, or reboot the pc normally, and its the same version, and the same hardware :/

and if i disable APIC, 
the shutdown or Restart its funcionally. but i can start the system  jaja


----------



## P3p0x (Apr 15, 2017)

Bump any help?


----------



## tobik@ (Apr 15, 2017)

Try with `sysctl hw.usb.no_shutdown_wait=1` before rebooting/shutting down.


----------



## P3p0x (Apr 17, 2017)

tobik@ said:


> Try with `sysctl hw.usb.no_shutdown_wait=1` before rebooting/shutting down.


i try this but not solved the problem :/


Any solution?


----------



## puretone (Jun 29, 2018)

If this is still an issue, which I doubt at this point, or for anybody else you might want to go into your BIOS/UEFI and see if you can disable PS/2 support of the motherboard. I had a similar issue one some Z97 or early Z170 mobo that refused to properly reboot & would hang in a similar way in perpetuity. I spotted the MUTEX report in my dmesg output, figured on a hunch something may be up with how the mobo went about translating PS/2 to USB keyboard data stream.


----------



## Chris_H (Jul 2, 2018)

su: BAD SU R to root on /dev/pts/2
I should have looked closer at this when I first responded.
This error (basically) indicates you _aren't_ initiating halt(8) as root. Or put another way; you don't have _permission_ to execute that command. If I were you, I'd look at how you're window manager is handling the command. Be it from clicking on something, or simply the way su(1) is being called.

--Chris


----------

