I'm trying to log into my PC running 18.04 with lightDM, and whenever I attempt to sign in, the screen flashes black and returns to my lightDM greeter. If I switch to a different tty and run startx, gnome will start and appears to run fine. I've tried reinstalling lightdm*, which changed nothing, tried gdm3, which would freeze after clicking my user, saying 'authentication error', reinstalling nvidia drivers (affecting nothing), and trying this on a few different users. If I check .xsession-errors, these are the only lines that stand out:
xrdb: Can't open display '' xhost: unable to open display "" xhost: unable to open display ""
It seems that X/gnome work fine, so I'm not exactly sure where the problem resides.