Looks like everything is in place, it just doesn’t work.
How did you install the 415 driver, from ppa? Did you uninstall the .run installer using the --uninstall option before?
- Don’t use the .run installers, use --uninstall to uninstall them
- purge anthing nvidia/cuda
- add the ubuntu graphics ppa [url]https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa[/url]
- install the driver from that (sudo apt install nvidia-driver-415)
- reinstall nvidia-prime and ubuntu-drivers-common