Hello there! this is kinda my first post on this website and still new here so i'm sorry if i'm repeating something that's been asked before, but here are the details:
a few months back i noticed with speccy that my pc has unreasonable temperatures, even when idle(went up to 80 celsius..and a 100 when playing a very old pc game on low resolution/quality settings...) so i had my cpu fan replaced, it turned out that my power supply sucked and it apparently caused my fan to stop working due to giving it too much electricity(i'm not sure if this really was the case but either way the power supply was terrible and one of the causes for my high temps when playing games).
after changing the fan and the power supply, my temp goes only as high as 59 at max when playing as heavy as games that this pc can handle, to my relief, but that didn't end the problems.
after getting the new power supply, i've had this happen two times - pc randomly restarts usually after long periods of being on(which didn't even happen with my old psu and fan going to crazy temps so it does not have to do with overheating), even when the temperature is nice and low. after shutting down randomly, it restarted, and after i entered my user and continued to do things again, a few minutes later it shut down again for the second time, but this time didn't restart, the power was COMPLETELY cut off the second time it shuts off - normally my pc would have it's mouse's laser or my gamepad's lights being on even when turned off but connected to my ups(which i always have had my pc plugged into btw, so the shutting off is not related with the electricity input either) so i can assume completely that this is not due to overheating at all, because most of the time the power doesn't completely cut off itself when overheating.
so after this happens and my power is just..off(not my monitor so i can also assume it's not my ups at fault), i have to manually turn off my ups and turn it back on again and start my pc and it finally works. both times this happened, it had this exact same pattern, and didn't turn off the third time it turned on, but both times after turning it on the third time, i just saw if it was still starting up correctly, turned it off and let it cool down. each time this happened my pc's power wire and psu were albeit warm. happened in the beginning of spring and today(summer here) so i doubt it has to do with surrounding temperatures because it was very cold during spring(i don't use any air conditioners even though it costs my pc a bit..)
so in my conclusion i am guessing that this may be my power supply. and yes, this had happened after long hours of heavy use, including gaming and/or high ram usage. it should also be noted that the wire i am using to connect my psu to mmy ups is not the wire that came with my psu, so it might not be compatible..
thank you for taking the time to read, i hope i didn't make this post too long, i just wanted to get all the details out so i didn't attract any generic replies like "it's overheating" or "you're having electricity shortages".
pc specs that might have to do with the problem(as much as i can provide):
psu: Value-Top ATX-20 500 WATT (this being my new psu of course)
cpu: Intel Core i3 2100 @ 3.10GHz