CUDA Driver Error on MSI Laptop

Hey,

I’m a total newbie to CUDA and trying to run it on my machine. I’ve installed the driver on Ubuntu 16.04 and it worked for like a week without any problems but then it stopped working for no reason. OS didn’t even detect the driver.
Then I reinstalled Ubuntu 16.04 more than 5 times and on 14.04 once but each time, after restarting the laptop I got a different error and had to reinstall Ubuntu. Once I got a black screen when I turned on my laptop, once I made it to login screen but it didn’t login after typing my password, it redirected me to the same screen over and over again. After each installation, I got a different type of error and couldn’t even start the OS.
So I think there must be a problem with the driver or my machine. My machine is MSI GT72S 6QE Dominator Pro G Tobii. CPU: Intel Core i7 6820HK and GPU: Geforce GTX 980m (you can see the full specs here: https://www.msi.com/Laptop/GT72S-6QE-DOMINATOR-PRO-G-tobii.html#hero-overview)

So I need some help on how to run CUDA on Ubuntu 16.04 properly. Thanks in advance.