Can't login after suspend on Ubuntu 17.10

CrashPlan Solution

The problem for me was CrashPlan keeping too many files open while I was away.

After rebooting, I looked in /etc/log/syslog and found "No space left on device" errors around the time of my login failure. If you use CrashPlan and find similar messages, then this might work for you too. Messages like:

Dec 11 13:01:43 myDesktop systemd[1]: anacron.service: Failed to add inotify watch descriptor for control group /system.slice/anacron.service: No space left on device
Dec 11 13:36:15 myDesktop gdm-password]: AccountsService: Failed to monitor logind session changes: No space left on device
Dec 11 13:36:40 myDesktop systemd[1]: apt-daily.service: Failed to add inotify watch descriptor for control group /system.slice/apt-daily.service: No space left on device

The instructions on the CrashPlan site worked for me (please read before trying on your system): https://support.code42.com/CrashPlan/4/Troubleshooting/Linux_real-time_file_watching_errors

Basically, as root I added this line at the end of /etc/sysctl.conf

fs.inotify.max_user_watches=1048576

I'm grateful to this bug on launchpad for sending me to the CrashPlan solution: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1726996


After many tests the following solution works for me:

Login using Xorg does not use Wayland has many errors yet, anyway the login screen still uses Wayland, to disable the Wayland in the login screen:

sudo nano /etc/gdm3/custom.conf

Uncomment the line WaylandEnable=false to force the login screen to use Xorg

[daemon]
# Uncoment the line below to force the login screen to use Xorg
WaylandEnable=false

Restart!