These problems are typically caused by graphics drivers or some incompatibilities with cuda versions.
Workaround:
1. First switch to the terminal (Ctrl + Alt + f1~f6 corresponding tty1~tty6) login interface, enter user name and password login;
2. Uninstall the Cuda already installed, the command is:
sudo apt-get remove cuda*
* For all CUDA related programs, you can use the TAB key to query what CUDA applications are installed
3. Uninstall NVIDIA graphics driver, command:
sudo apt-get remove nvidia*
* represents all NVIDIA related programs, IBID., you can use the TAB key to see
4. For many desktops, in the graphics driver or Cuda has not been installed before, if you want to operate under the graphical interface, you can first monitor to the computer with the graphics card (CPU integration) on;
5. The corresponding graphics driver version can be in the NVIDIA official online query http://www.geforce.cn/drivers; If you do not download, it is recommended in the Ubuntu system settings-software and updates-the additional driver to the GPU selected 367.* series drive;
6. Cuda 7.5 and later versions generally have no problem with them; a low version of Cuda may have some bugs on its own.