On Ubuntu 16.04 with lightdm, and an autologin account, I can restart the graphical session with command :
sudo service lightdm restart
The account logs in automatically.
On Ubuntu 18.04 (and also on 19.04), the same autologin account is setup, but the command :
sudo service gdm3 restart
fails to autologin, and bring the display to the login page.
In gdm logs, I can find
systemd[1]: gdm.service: Succeeded.
systemd[1]: Stopped GNOME Display Manager.
systemd[1]: Starting GNOME Display Manager...
systemd[1]: Started GNOME Display Manager.
gdm-autologin][4091]: gkr-pam: no password is available for user
gdm-autologin][4091]: pam_unix(gdm-autologin:session): session opened for user screen by (uid=0)
gdm-autologin][4091]: gkr-pam: couldn't unlock the login keyring.
How to properly restart the user session, with autologin user logged in on ubuntu 18.04 ?
journalctl -xn
?