I'm guessing you installed Ubuntu in EFI-boot mode? The nvidia drivers does not work in EFI-boot mode and if you want to use the nvidia driver you would have to change to legacy boot mode.
Since you got your display back, you can run this simple snippet to determine if you have installed in EFI-mode:
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
And here is an guide on how to convert to legacy boot mode:
I had the same problem on my Macbook Air.
Here's a thread on the nvidia forum about adding support for efi-mode:
Here's a reference for nvidia chipset not working in efi-mode: