I tried to upgrade from Ubuntu 16.04 to Ubuntu 18.04 this morning. Everything went alright, except when the system finished upgrading and tried to reboot it could not enter the desktop environment and got stuck at a purple screen with 'ubuntu' and five dots below it. It lasted for about 5 hours when I realized that something probably had gone wrong.
Ubuntu 18.04 was not booting to the desktop environment because there was a problem with the Nvidia graphics driver. The computer has two GPUs, an integrated Intel GPU and a discrete Nvidia GTX 1050 graphics card. After changing the custom GPU to Intel in the BIOS/UEFI setup utility, it just worked.
Install proprietary Nvidia GTX 1050 graphics driver
Uninstall the existing proprietary Nvidia graphics driver and reboot before trying to automatically install the proprietary Nvidia graphics driver in Ubuntu 18.04. Don't uninstall the open source Nouveau graphics driver. The proprietary Nvidia graphics driver for the Nvidia GTX 1050 GPU can be installed in Ubuntu 18.04 from the terminal or console with the following commands:
sudo ubuntu-drivers autoinstall sudo reboot
When installing a proprietary graphics driver, it is not necessary to uninstall the built-in Nouveau open source graphics driver. The two graphics drivers can be installed alongside each other allowing the open source graphics driver to be used as a fallback alternative in case there is a problem using the proprietary graphics driver.
ubuntu-drivers autoinstall command installs drivers that are appropriate for automatic installation including their dependencies, and the Nvidia driver will also be updated automatically when an update is available.
You may have a problem with an older computer, with an older GPU. Try this...
- boot to recovery mode
- choose root access
sudo mount -o remount,rw / # to remount the disk r/w sudo pico /etc/gdm3/custom.conf # edit this file
The old machine I was using did this same thing, I realised it was because it's only 32 bit capable and 18.x is 64 bit