Cannot get the nvidia driver to work

I was able to fix it with uninstalling the nvidia driver and then using the “Additional drivers” app on ubuntu to install the appropriate driver. Now everything works as it should.