# Shutdown FreeBSD completely, without hitting power button



## ccc (May 29, 2010)

hi

I have freeBSD 7.0 installed on a PC and 7.3 installed on my notebook, both are RELEASE with KDE.
If I try to shutdown from KDE directly, then I'm getting this message:
	
	



```
[B]The operating system has halted
Please press any key to reboot[/B]
```

Howto shutdown freeBSD from KDE completely, I mean without hitting power button?


----------



## sverreh (May 29, 2010)

I don't know if that is possible from KDE, but if your hardware supports it, this should work from the command line:

`# shutdown -p now`

Possibly you can also do it from KDE by pressing <alt>F2 to get a command line and enter this:

`$ sudo shutdown -p now`

This requires that you have installed sudo from the ports.


----------



## thuglife (May 29, 2010)

Under KDE hit alt+f2 and type

[CMD=""]kdesu systemsettings[/CMD]

then go to advanced | login manager | shutdown and replace Halt and Reboot with

[CMD=""]/sbin/shutdown -p now[/CMD]

and

[CMD=""]/sbin/shutdown -r now[/CMD]


----------



## ccc (May 30, 2010)

thuglife said:
			
		

> Under KDE hit alt+f2 and type
> [CMD=""]kdesu systemsettings[/CMD]


Thx, but this doesn't work on my freeBSD 7.3


----------



## graudeejs (May 30, 2010)

it should be *alt+shift+f2*


----------



## vrachil (Jun 1, 2010)

you can try running the same thing from a terminal.


----------



## nekoexmachina (Jun 1, 2010)

and also you could try it as sudo not kdesu from the terminal. May be, you have no kdesu installed.


----------



## teckk (Jun 2, 2010)

I have never once seen kdesu work in any version of KDE in FreeBSD.

Another suggestion if you have xterm or aterm installed

Make links on your desktop or in a menu to


```
xterm -T Sleep -e sudo acpiconf -s3
```


```
xterm -T Shutdown -e sudo shutdown -p now
```


----------



## sysman (Jun 3, 2010)

ccc said:
			
		

> hi
> 
> I have freeBSD 7.0 installed on a PC and 7.3 installed on my notebook, both are RELEASE with KDE.
> If I try to shutdown from KDE, then I'm getting this message:
> ...



Just for curiosity, shutdown, via console, works at all? It seems a powermanagement issue, such as apm or acpi not correctly configured.


----------



## thuglife (Jun 16, 2010)

kdesu is under /usr/local/kde4/lib/kde4/libexec/kdesu and is installed with kde4.

alt+F2 brings the run command dialog, i don't understand what doesn't work. FreeBSD version has nothing to do with it.


----------



## sw2wolf (Jun 17, 2010)

`dmesg | grep "ACPI APIC"`

The following is my output:

```
ACPI APIC Table: <HP-CPC SLIC-CPC>
```


----------



## ccc (Sep 14, 2010)

I've changed in /usr/local/share/config/kdm/kdmrc


```
....................................................................
[Shutdown]
# The command (subject to word splitting) to run to halt the system.
# Default is "/sbin/shutdown -p now"
HaltCmd=[B]/sbin/shutdown -p now[/B]
....................................................................
```

and this problem is solved now.


----------



## ipinlnd (Jul 30, 2015)

Try `poweroff`


----------



## phoenix (Jul 30, 2015)

ipinlnd said:


> Try `poweroff`



`poweroff` is just a shorthand for `shutdown -p now`


----------



## drhowarddrfine (Jul 31, 2015)

ipinlnd Any other five-year old threads you want to bring up?


----------

