I've had my HP laptop for about 2 years now. Earlier today, I did an HP BIOS update for the first time in a while. I am now on BIOS version F.40.
Since doing the BIOS update, my laptop now restarts whenever I shut the lid, press the power button, or attempt to shut it down. And the restart is immediate. As in, when I shut the lid, it'll restart while being shut, screen coming on and everything.
I've double-checked the settings for what it should do when I press the power button or shut the lid, I've turned off fast startup, I've updated my Intel drivers, I checked for Nvidia updates but apparently there are none... and this problem persists.