You have already tried several solutions, but here are some other things to try:
- Go to Task Scheduler and see if there are any tasks that are set to wake up the PC. If you find any, right-click on them and select "Disable" to turn them off.
- This feature can sometimes cause a PC to turn on randomly. so, you need to Go to the device manager, select your network adapter, and find the "Advanced" tab. Look for a setting called "Wake on Magic Packet" or "Wake on LAN" and disable it.
- Visit the ASRock website and check for any BIOS updates for your motherboard. Installing the latest BIOS update may resolve the issue.
- Make sure that all connections inside the PC are tight and secure, including the cables connecting the keyboard and mouse.
- Try using a different keyboard to see if the problem persists. If it doesn't, the issue may be with the keyboard itself.
If none of these solutions works, you may have to consider replacing the hardware components that may be causing the issue.