16.04 to 17.10 login loop because of xsession and upstart

long story short, I upgraded from 16.04 to 17.10, and when I try to login I get a black screen for a second then I'm back to the login screen again. After inspecting .xsession-errors I found this line

/etc/X11/Xsession.d/99x11-common_start: line 5: /sbin/upstart: No such file or directory

The referenced file has only one line - except for the comments

exec $STARTUP

but there's another file in the same directory named 99upstart that has this line

STARTUP="/sbin/upstart --user

I tried searching how to fix this, but all I could find is that systemd is replacing upstart, with no way mentioned of how to fix this


Just move or remove upstart files from Xsession.d to get it running. In my case, 00upstart, 99upstart, 99x11-common_start needed to be moved.


sudo apt purge upstart

fixed that problem for me.

Upstart is replaced by systemd in 17.10.