Solved Shutdown now shuts down almost, takes a hard interrupt to complete.

13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64

Worked well, works well with Kde Plasma, but for the last few days shutdown now doesn't fully shut down the computer (it is not a network of server-client computers, but one dekstop computer) shut down process goes through almost till the end, the monitor goes blank, the hardware probably comes to rest, but the CPU doesn't switch off. A power button interrupt, even minutes later powers up the monitor and brings up the terminal which runs through the last four or five lines of code, and then the CPU is powered off.
 
shutdown now only halts the CPU it does not power down the system.
What happens if you do as root:

shutdown -p now

Notice the "-p" option that says "power off". Or use the command "poweroff" as root which according to man shutdown is the equivalent of "shutdown -p now".

You may also want to add the following line to /boot/loader.conf:
hw.usb.no_shutdown_wait="1"

That eliminates the waiting for USB devices to detach correctly. NOTE: If you are using USB external devices make sure you manually unmount them first if you have that line in loader.conf.

ETA:
The behavior with the power button also implies a halt not power off. The system will sit there halted, usually the last line says something like "system halted, power off now". Monitor going blank probably because the drm modules got unloaded, there is nothing driving the signals, monitor goes to power save mode.
 
shutdown now only halts the CPU it does not power down the system.
What happens if you do as root:

shutdown -p now

Notice the "-p" option that says "power off". Or use the command "poweroff" as root which according to man shutdown is the equivalent of "shutdown -p now".

You may also want to add the following line to /boot/loader.conf:
hw.usb.no_shutdown_wait="1"

/boot/loader.conf already had
Code:
hw.usb.no_boot_wait=1  # DO NOT WAIT FOR USB DEVICES FOR ROOT (/) FILESYSTEM
Now added:
Code:
hw.usb.no_shutdown_wait="1" #That eliminates the waiting for USB devices to detach correctly. If you are using USB external devices make sure you manually unmount them first if you have that line in loader.conf.

Would this be in conflict? (There are two instructions related to USB devices). Also, the first line that was already in this config file says 1 without quotes, is this ok?

That eliminates the waiting for USB devices to detach correctly. NOTE: If you are using USB external devices make sure you manually unmount them first if you have that line in loader.conf.

ETA:
The behavior with the power button also implies a halt not power off. The system will sit there halted, usually the last line says something like "system halted, power off now". Monitor going blank probably because the drm modules got unloaded, there is nothing driving the signals, monitor goes to power save mode.
 
Remove both, then use shutdown -p now. Does the machine shutdown and power off? shutdown now or shutdown -h now only halts the machine, it does NOT power off. That's what the -p option is for.

Code:
     -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.
See shutdown(8)
 
SirDice Removed both the lines, shutdown -p now worked well, thanks for explaining how the parameters modify the way the command works, also mer
 
  • Like
Reactions: mer
Back
Top