Install Ubuntu to Nvidia laptop

I tried to install Ubuntu 18.04 to MSI  GS43VR 7RE laptop. It is a laptop with GTX 1060 gpu. I kind of expected hiccups with installation. Actually, I couldn’t even get Ubuntu to start with plain installation. The culprit is NVidia driver as expected. Adding “nomodeset” to boot option fixed the problem.  One may also try to add “noapci” if Ubuntu still refuses to boot as it starts.

After Ubuntu was installed, I still got stuck with Windows 10 (Grub was not loaded and entered to Win 10 directly.) First I disabled fast startup in Windows 10 as instructed here. I also tried to fix the boot with “boot repair” as follows.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

But that alone didn’t solved my problem. It turns out this post saved the day. Running the following in the command prompt as administrator in Windows 10 fixed the problem.

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

Note that if you are running this in PowerShell instead of command prompt. Extra quotes are needed as below

bcdedit /set "{bootmgr}" path "\EFI\ubuntu\grubx64.efi"

After I finally got into my new Ubuntu (again, one needs to include “nomodeset” in boot option to get in), I followed this to install the NVidia driver.

Running

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
ubuntu-drivers devices

lists out the recommended drivers for devices including the NVidia gpu. Finally, one may then go ahead to install the recommended drivers with

sudo ubuntu-drivers autoinstall

 

Leave a Reply

Your email address will not be published. Required fields are marked *