Note the detailed heading. The subtitle should be "It's a miracle I got it to work at all". What follows are notes that I hope will help the next time I have to set this up, although I know they probably won't. They probably won't work for you either. Sorry.
Make sure you're in an xorg, not wayland, session.
- Remove any existing nvidia packages:
sudo apt autoremove nvidia* --purge
and/orsudo /usr/bin/nvidia-uninstall