Bios resets itself? gigabyte ga z77 d3h

Kel-al

Honorable
Dec 16, 2013
2
0
10,510
Okay I am having a weird problem.
Whenever I turn my computer off and come back to it at a later time. I start my computer up and it flashes its bios back to the original menu that was on the board when I purchased it. While in the older bios menu is active it changes all my bios settings including my hard drive connection type to IDE when it needs to be on AHCI.

Once it is fronzen at the older BIOS menu I have to turn my computer on and off several times before it will flash itself back to the newer BIOS menu.
After it has been flashed back to the newer BIOS menu, my computer runs very well.

What is going on?