I have a fresh install of ubuntu 16.04 on a razer stealth rz09 with nvidia gtx1060 gpu (this gpu being the reason i got the machine). The system freezes often upon login, with both the current and previous kernels. If I use one of the grub options to do a dpkg repair occasionally I am able to boot, and I've managed to do apt-get update and upgrade but still hit the boot hang most of the time. I have a windows partition from which I am writing this but would like to continue with linux since the servers I work off are all linux. This is the second time I've installed linux on this machine, the first time getting stuck after attempting a cuda install - but this time the drivers are all stock! I currently boot with 'secure boot disabled' fwiw. Anyway if someone has some pointers I would appreciate it
Using 'nomodeset' in grub as described here and then install of driver using standard install worked for me.
Well, I had the same problem: My PC was freezing randomly. I tried Ubuntu 16, 17 and 18.04 and everything was the same. I tried several drivers and didn't get a solution. I tried several solutions that I found in the forums and got bad and harmful results.
My solution was: I stopped using the graphical nvidia card, removed it and now I'm using the integrated Intel HD graphics card (Intel® HD Graphics 530 card (Skylake GT2)) and all the problems were solved!