I have a recurring issue that prevents windows from being shut down, when the partition is cloned or migrated to another disk.
In this situation, clicking on shut down from start menu causes Windows to log out, and reboot back to the login screen. The only remedy for this is to issue a shutdown /s /f /t 0 command which will successfully shutdown Windows.
I suspect the issue is related to fast startup, a feature introduced in Windows which will hibernate the OS Kernel with a signed out user profile, rather than actually quitting the kernel.
Additional context
This will happen after cloning or migrating the partition where Windows is installed on. I use GParted to achieve this, which will break UEFI booting and thus I'll need to issue a bcdboot.exe c:\windows /s h: /f UEFI command from the recovery environment in order to restore the entry with the correct GUID for the boot drive.
How can I fix this issue without changing the fast startup or hibernate settings on Windows? The only other fix I know that works is a clean re-install, which negates the whole point of disk migration/cloning, and personally, I take as a sign of admitting defeat.
EDIT
I finally found the answer to my problem, described here.