CentOS 7: power button cannot shutdown before user login (not after)

Just found the solution in here:

https://unix.stackexchange.com/questions/394405/how-can-i-regain-the-power-button-shutdown-functionality-on-centos-7-with-gnome?noredirect=1&lq=1

yum -y install acpid
systemctl enable acpid
systemctl start acpid

The suspend and hibernate in the power setting will no longer be working.