May I suggest that before we reset to factory settings (its a pain, you have to reinstall all your programs, updates, settings etc), may I suggest a few possible solutions to your problems.
If it were my computer, I would start with a full anti virus scan and then download and run a full scan with malwarebytes. I would then follow the tutorial that I gave you.
If you prefer to go back to factory specs, it seems that with your computer it is either rapidly hitting either f10 or f 11 at boot. Try both and see which works.