SOLVED: centos 7 shutdown will not poweroff
SOLVED: centos 7 shutdown will not poweroff
I have centos 7 running on a dell 9200 tower and the 'shutdown - h now command' does bot result in the machine powering off, which it should, instead it sits at 'System Halted'. After trawling google I edited /etc/systemd/logind.conf and uncommented HandlePowerKey but it made no difference. The machine's BIOS is bang up to date and if I swap the centos 7 hard drive for a windows xp hard drive the machine powers off fine, so I expect it's a problem in centos 7. I also tried shutdown -P now but that also goes to 'system halted', the same with 'systemctl poweroff'. I need this machine to poweroff so thanks for any advice.
Last edited by neuronetv on 2016/10/17 12:19:06, edited 1 time in total.
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: centos 7 shutdown will not poweroff
Some time ago (month or two or more) a couple HP laptops of mine began taking well OVER a half hour to shut down. They eventually do, but it was some update that started this. I guess I've just been awaiting the update that fixes it ...
-for what it's worth-
-for what it's worth-
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: centos 7 shutdown will not poweroff
First task is to check the logs. What is the last entries in the journal ?
Here is an example from my Fedora , but it should be 99% the same:
Did it report any issue ?
Here is an example from my Fedora , but it should be 99% the same:
Code: Select all
journalctl -b -1 -n 10
<month> <Date> <time> <hostname> systemd[1]: Reached target Shutdown.
<month> <Date> <time> <hostname> systemd[1]: Reached target Final Step.
<month> <Date> <time> <hostname> systemd[1]: Starting Power-Off...
<month> <Date> <time> <hostname> systemd[1]: Shutting down.
<month> <Date> <time> <hostname> systemd-shutdown[1]: Sending SIGTERM to remaining processes...
<month> <Date> <time> <hostname> systemd-journald[826]: Journal stopped
Re: centos 7 shutdown will not poweroff
thanks for your response:looks much the same as yours...
Code: Select all
# journalctl -b -1 -n 10
-- Logs begin at Mon 2016-10-17 09:58:05 BST, end at Mon 2016-10-17 09:19:49 BST. --
Oct 17 09:18:00 dell-9200.svr systemd[1]: Stopped Collect Read-Ahead Data.
Oct 17 09:18:00 dell-9200.svr systemd[1]: Stopping Collect Read-Ahead Data...
Oct 17 09:18:00 dell-9200.svr systemd[1]: Reached target Shutdown.
Oct 17 09:18:00 dell-9200.svr systemd[1]: Starting Shutdown.
Oct 17 09:18:00 dell-9200.svr systemd[1]: Reached target Final Step.
Oct 17 09:18:00 dell-9200.svr systemd[1]: Starting Final Step.
Oct 17 09:18:00 dell-9200.svr systemd[1]: Starting Power-Off...
Oct 17 09:18:00 dell-9200.svr systemd[1]: Shutting down.
Oct 17 09:18:00 dell-9200.svr systemd-shutdown[1]: Sending SIGTERM to remaining processes..
Oct 17 09:18:00 dell-9200.svr systemd-journal[499]: Journal stopped
Re: centos 7 shutdown will not poweroff
Dodgy ACPI, perhaps? Try adding
as a kernel parameter on your kernel line in grub2.
Code: Select all
acpi=off
Root is evil: Do not use root (sudo) to run any of the commands specified in my posts unless explicitly indicated. Please, provide the necessary amount of context to understand your problem/question.
SOLVED: centos 7 shutdown will not poweroff
I must have had an error in either /boot/grub2/grub.cfg or /etc/default/grub. I connected a different hard drive, installed centos 7 new and took a copy of these two files, then copied them back to my previous centos 7 install and now it powers off correctly.
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: SOLVED: centos 7 shutdown will not poweroff
Next time you don't need to copy from another installation.You can always regenerate the grub menu via:
For UEFI:
If not using UEFI:
For UEFI:
Code: Select all
grub2-mkconfig -o /etc/grub2-efi.cfg
Code: Select all
grub2-mkcongif -o /etc/grub2.cfg
Re: SOLVED: centos 7 shutdown will not poweroff
Gentlemen, I managed to find a solution. I know this thread is old, but this is one of the first Google results when searching the matter, so I'll update it to help others.
First install acpid
yum -y install acpid
systemctl start acpid
systemctl enable acpid
Then edit /etc/default/grub to include acpi=force reboot=warm in the end of the existing GRUB_CMDLINE_LINUX=.
Rebuild grub config:
grub2-mkconfig -o /etc/grub2.cfg
Reboot to take effect.
This solved the problem for me on a Intel DB85FL motherboard where after a BIOS update CentOS wouldn't poweroff no matter what.
Also, just for the sake of documentation this is my experience with alternative solutions:
Simply putting the kernel setting pci=noacpi solved the problem, but created others. The system took 10 times longer to boot and the LAN adapter wasn't being detected.
The kernel setting acpi=off was making the system freeze instead of shutting down. Was also taking longer to boot.
Disabling Wake on LAN didn't cause any effect.
First install acpid
yum -y install acpid
systemctl start acpid
systemctl enable acpid
Then edit /etc/default/grub to include acpi=force reboot=warm in the end of the existing GRUB_CMDLINE_LINUX=.
Rebuild grub config:
grub2-mkconfig -o /etc/grub2.cfg
Reboot to take effect.
This solved the problem for me on a Intel DB85FL motherboard where after a BIOS update CentOS wouldn't poweroff no matter what.
Also, just for the sake of documentation this is my experience with alternative solutions:
Simply putting the kernel setting pci=noacpi solved the problem, but created others. The system took 10 times longer to boot and the LAN adapter wasn't being detected.
The kernel setting acpi=off was making the system freeze instead of shutting down. Was also taking longer to boot.
Disabling Wake on LAN didn't cause any effect.