# shutdown -r now zzz and sound problem



## unbalancedskunk (Oct 28, 2022)

If I use `shutdown -r now`, zzz(8) and sound doesn't work. That is not big problem for me but I wanted to inform people.


----------



## Alain De Vos (Oct 28, 2022)

You can "shutdown -p now"
to power off.


----------



## bob2112 (Oct 28, 2022)

What's zzz?


----------



## SirDice (Oct 28, 2022)

bob2112 said:


> What's zzz?


zzz(8), appropriately named tool to put the computer to sleep.


----------



## SirDice (Oct 28, 2022)

unbalancedskunk said:


> If i use shutdown -r now, zzz and sound doesnt work.


What you're basically saying here is, after a reboot sound doesn't work anymore and you can't put the computer to sleep?


----------



## _martin (Oct 28, 2022)

bob2112 said:


> What's zzz?


I learned the hard way when I was getting to know ZFS and was testing this experimental feature back then. I named my pool zzz and by accident I once didn't do zfs command but typed zzz instead. Unfortunately at that time I had no iLO access and had to call people in DC to restart my server. Since than I do two things after I upgrade the system with /now/ git: chmod 700 /root and rm `which zzz`.


----------



## unbalancedskunk (Oct 28, 2022)

SirDice yes, after reboot with `shutdown -r now`, zzz(8) and sound doesn't work.


----------



## SirDice (Oct 28, 2022)

unbalancedskunk said:


> sound doesnt work.


Focus on this first as it's probably the easiest. Does it work when you first power up the computer? But it stops working after a reboot? What does `cat /dev/sndstat` output when it works and when it doesn't?


----------



## unbalancedskunk (Oct 28, 2022)

SirDice it works after poweroff command i mean zzz and sound but after shutdown -r now they dont


----------



## smithi (Oct 30, 2022)

With SirDice exploring the sound issue I'll ask about zzz(8), which is just a script wrapper for (usually):
`acpiconf -s 3`

The issue seems to be some difference in the running system after a warm boot (shutdown -r) compared to a cold boot (power on), which in theory shouldn't happen.

After a cold boot, can you suspend and resume reliably and repeatedly, before trying to shutdown -r?

If so, does examining /var/log/messages have lines for acpi ... suspend at (time) and acpi ... resume at (time)?  Is each suspend / resume block look the same?

If not, what happens instead? Are there potential clues or error messsges in that file?

And after the warm boot, what actually happens when you issue `zzz`, where it fails? Is anything written to console? Or logged in the messages file?  If so, exact messages should help.

You said it isn't a problem for you, but if suspend then fails, there are quite likely other things broken too, so it's worth fixing.

What make and model is the machine?

What FreeBSD version?


----------



## unbalancedskunk (Oct 31, 2022)

smithi FreeBSD 13-1,  Dell Inspiron 5559
i also noticed shutdown -h now fails also.
Is it possible to reboot computer with acpiconf ?


----------



## Alain De Vos (Oct 31, 2022)

A shutdown should not fail. Try to find why in logfiles.


----------



## unbalancedskunk (Oct 31, 2022)

Alain De Vos said:


> A shutdown should not fail. Try to find why in logfiles.


Poweroff works good.


----------



## SirDice (Oct 31, 2022)

unbalancedskunk said:


> i also noticed shutdown -h now fails also.


What do you mean by "fail"? It doesn't turn off the machine? That's correct, it's not supposed to do that. `shutdown -p now` will power off the machine after halting it.

With FreeBSD there is a difference between `shutdown -h now` and `shutdown -p now`:

```
-h      The system is halted at the specified time.
{...}
     -p      The system is halted and the power is turned off (hardware
             support required, otherwise the system is halted) at the
             specified time.
```


----------



## smithi (Nov 1, 2022)

unbalancedskunk said:


> smithi FreeBSD 13-1,  Dell Inspiron 5559
> i also noticed shutdown -h now fails also.
> Is it possible to reboot computer with acpiconf ?



Have you examined the logs yet?

I'm afraid you're going to have to give us a lot more detailed information before we can help you debug any of this.

No, see acpiconf(8)

Also see reboot(8) which is what shutdown(8) calls after its other functions.

Please do read the manuals.


----------



## unbalancedskunk (Nov 14, 2022)

well dear FreeBSD community. İ added `apmd_enable="YES"` to rc.conf and i think it solved all of my problems.
SirDice smithi


----------



## smithi (Nov 14, 2022)

unbalancedskunk said:


> well dear FreeBSD community. İ added `apmd_enable="YES"` to rc.conf and i think it solved all of my problems.
> SirDice smithi



Wow.  How old is this machine, and what is it?

My trusty old Compaq Armada 1500c laptop ran on APM between c. 2005 and 2020, latterly as a mini server in a little bush shack on solar power.

Incredibly reliable; finally succumbed to a nearby lightning strike blowing the modem and network  card.

I got it second hand, made in 1998 as I recall.  Sorry, APM flashback nostalgia ...


----------



## unbalancedskunk (Nov 14, 2022)

My machine is Dell İnspiron 5559.


----------



## smithi (Nov 14, 2022)

unbalancedskunk said:


> My machine is Dell İnspiron 5559.



Yes sorry, you said that earlier.

If you're happy, ok.  You might check if there's a BIOS update.  After 7 years from first release, I'd expect so, and then ACPI may work better.  Cheers.


----------



## unbalancedskunk (Nov 14, 2022)

smithi it happens np.


----------

