Ubuntu – Hibernate and restart immediately instead of powering off

bootdual-bootgrub2hibernaterestart

After figuring out how to reboot to Windows with grub-reboot thanks to this question: How to reboot into Windows from Ubuntu?, I would like to have Ubuntu hibernate and restart into Windows instead of rebooting.

Replacing sudo reboot with sudo pm-hibernate does work, by saving hibernation data and powering off the system. When I press the power button, It works as expected by booting to Windows.

I would like to know if there is anyway I can make the pc restart immediately after hibernation instead of having to press the power button?

Best Answer

I found a way to do this using s2disk instead of pm-hibernate here: Hibernate with reboot on Linux

I replace the command

sudo pm-hibernate

with

sudo s2disk -P 'shutdown method = reboot'