z170 freezes after a couple of minutes [solved]

I just build a pc :
Asus z170 pro gaming
i5 6600k
Samsung 850
MSI gtx 970 gaming
corsair vengeance dd4 lpx 2x8 gb

Here"s the problem this rig freezes after about 2 minutes i tried using just 1 stick ram and is switched the stick to check for bad stick but they are fine.
i suspect it may be the CPU but I'm not sure anyone familiar with this problem any help is much appreciated.

reseat the cpu.
If the cpu is not seated properly in the socket, then strange freezes can happen.

Also make sure ya heatsink is on their properly because it's gonna crash if it gets too toasty down there.

oh i forgot to mention it stays at 30celsius so no temp problem

Could you give us some temps maybe?

its hard to say exactly because it even freezes in the bios

Try reseating and booting without the GPU, try reseating the CPU, CPU heatsink.

what OS? I had this problem on linux with an older kernel with IOMMU turned on in UEFI. Disabling is a fine work around if you don't plan to use PCIe Passthrough on virtual machines.

also before it hangs get to a text terminal and type dmesg
and see if there is anything useful in the output there.

We some how managed to install windows 7 and a lot of drivers the problem started when we inserted a third hard drive (with the pc shut down of course) we tought the hard drive caused the freezin so we removed it that did't fix it sadly so i'm gonna try to reseat the cpu first thin tomorrow

check the iommu thing before reseating.. its possible installing a driver (or a driver from windows update) is causing the issue.

Can that iommu thing cause the uefi to freeze because the uefi freezes too

Not likely. :(
Are you running xmp on the memory profile?

I was untill i tought that that was the problem.so disabled it still no fix

I forgot to mention we earlier already had it not post because the cooler was to tight on there so i unscrewed it a few turns and it posted should i try turning it a couple times more, the cooler wil still be on there tight (it's a hyper 212 evo)

I reseated the CPU 4 hours ago and it seems to be a stable machine now.

Thanks for the help guys it's much appreciated