It happens rather randomly. The mouse input becomes really lagged first, everything on the screen freezes, then a few seconds later the screen goes dark. The light on the GPU would then start blinking (normally it stays on constantly). This happens sometimes in less than 15 mins from booting, and sometimes up to 3,4 hours.
I have an AMD CPU and a NVIDIA GPU. I installed their drivers. ( the appropriate version that’s required by cudnn and cuda)
I’ve tried everything I could find on the internet.
Also on the computer I also have windows installed, and I never have problems in windows. So presumably this is not a hardware problem.