Hybrid Nvidia laptop won't boot when I switch to Nvidia GPU

It was installed by nvidia-inst -b. I was following this guide, but the same thing happened after installing optimus-manager. I didn’t even have to enable it with systemctl.