4th post. Came across it while trying to figure out the connection refused issue.
I'm going to guess I don't have a window manager installed. LightDM and GDM are the only two I can think of, neither of which are in my list of installed packages. Going to install LightDM and see what happens.
EDIT: Well, installing LightDM didn't help. Still has the connection refused message. Can only interact via SSH now, because it loads a GUI login that I cannot interact with. No mouse pointer, and can't switch to terminal with keyboard. Looks frozen.
One thing that's different is that nvidia-smi doesn't work now. The command gives me the message:
Unable to determine the device handle for GPU 000:04:00.0: GPU is lost. Reboot the system to recover this GPU.
dmesg also shows the following:
NVRM: Xid (PCI:0000:04:00): 79, GPU has fallen off the bus.
A quick search indicates that 79 could potentially mean hardware issues, such as defective GPU, or insufficient power, but this can't be the case, given that before I started this whole reinstallation thing, it had an uptime of several months running at full load.
Back to the drawing board!
EDIT2: Removed LightDM and installed GDM3. Not much better. Locally, the system is stuck in the late phases of booting, after the large list of [OK] messages. The monitor constantly goes blank, then returns to the same screen, almost like someone just keeps turning the screen off and on.
I can SSH just fine, however. smi works again, and top reports a Xorg process that seems to be using 50% to 75% CPU at all times, but smi reports no Xorg processes on the cards themselves. Going to try another display manager.
EDIT3: Aaaaand KVM/SDDM gives the same issues as LightDM. I've run out of display managers to try.
EDIT4: Apparently I don't need a display manager. I can just use startx. All it did was turn the screen blank for a couple of seconds, then display a message saying x successfully shut down. Logs show that it failed to initialise the GLX module. More research!