ubuntu 18.04 on optimus VII/nvidia

erik_0000

Bronze Level Poster
i finally got around to upgrading my laptop from 17.04 to 18.04. it was a nightmare, it took me an entire day, and i ended up rerunning the installation at least a dozen times. below is what i wish i had known at the start, in case someone else finds it helpful. the biggest culprit is ubuntu for providing an installer that freezes under nvidia.

cheers
erik

- the keystroke to enter UEFI at startup is F2. the only change that i needed to make in UEFI was to change the boot sequence to tell it to boot from USB first. don't downgrade to BIOS. i came across various posts which advised downgrading to BIOS as a solution to some of the problems that i encountered below but this is not the right thing to do. similarly many people advise turning off secure boot but i did not need to do that.

- the keystroke to enter GRUB is Escape. probably you will hammer the Escape key repeatedly as the machine boots. what happens then is that the grub menu comes up, you escape out of it to the grub prompt at which you enter multiple further escapes (generating carriage returns). at that point if you exit the grub command line, the machine boots up without giving you a chance to get back to the grub menu. the solution is to enter "normal" (without the quotes) at the grub command line, followed by the Enter key, this kicks off the boot process but if you immediately hit Escape once more then you arrive back at the grub menu.

- at the grub menu, choose the desired option (e.g. the option to install ubuntu) and hit "e" to edit the line. on the line starting with "linux", near the end, before the dashes, enter "nomodeset". then kick off the startup. i found that i needed to do this in order to prevent the machine from freezing at the install menu.

- during installation you will be prompted to choose what kind of installation you want to do e.g. clean install of 18.04, 18.04 alongside any other existing OSes, etc. when i did a clean install, it worked. however for various reasons i needed to go back and choose "something else" so that i could decide myself how to partition the disks. i tried formatting the boot partition as ext4 and mounting it at /boot but this does not work, the installation fails later with an error installing grub. you have to format the boot partition as FAT32 and mount it at /boot/efi.

- once the system boots up you have to install the correct drivers for nvidia, the command to do that is "sudo ubuntu-drivers autoinstall".
 
Last edited:
Top