Comment 9 for bug 1422794

Revision history for this message
T Mee (tm221) wrote :

For me, this problem occurs in Ubuntu-18.04 and 20.04. It occurs when dynamic hostnames are used. However, different errors seem to cause the LightDM sessions to fail. But you can look at the logs to see how many "new session c" sessions are logged. After a reboot and one login, there should only be two (using a single display). The problem occurs because lightdm starts before the hostname is changed from localhost to the one from DNS. So all we have to do is start lightdm after that by simply changing /lib/systemd/system/lightdm.service to add "network-online.target" to the end of this line:

After=systemd-user-sessions.service <email address hidden> plymouth-quit.service

It works if the network is not plugged in too--the hostname remains localhost.

This is my solution. Maybe an expert can review it to see if it is the right change and hopefully backport it to Ubuntu-18.04 too.