System freeze on reboot/shutdown

I was fighting this issue for 3 days, tried all of the above options but none of them helped me.

But I solved it!

So, in my case the issue was because of UEFI boot (probably because laptop is very old: lenovo ideapad z570).

SOLUTION:
I just added noefi into the kernel options and my laptop started shutting down in a normal way.
sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet noefi"
Update grub (for ubuntu: sudo update-grub)

PS: It works on any kernel (4.19 or 5.2). Tested it on nvidia-390xx