I am running Ubuntu 16.04 on a Dell XPS 15 with an Nvidia GTX1050i graphics card. I have several nvidia driver versions installed but 410.79 is the one being used. My kernel version is 4.15, which I believe is the latest. (I have done previously done the same on 18.04 with the same results.)
I recently began using tensorflow-gpu with cuda 9.0 (latest version that tensorflow is compatible with) and since then the computer has been freezing every couple of hours seemingly out of the blue. The cursor disappears and it doesn't respond to any commands, and I have to force shutdown. The fan also begins spinning loudly and the laptop heats up, as if it is running a very taxing process. Once it froze while displaying htop though, and I didn't see any unusual processes listed.
There is a suggestion here to install modprobe, but I already have the latest version. I also tried the solution here, but this gave errors when tensorflow tried to use the gpu.
Most recently I have removed and reinstalled all of:
cuda-9.0, from tensorflow instructions, the deb(local) option, followed by the 4 patches cudnn, from nvidia webiste, runtime (deb) option tensorflow-gpu in that order, and it hasn't helped.