Can't login after suspend on Ubuntu 17.10

6,715

Solution 1

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

Solution 2

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!

Share:
6,715

Related videos on Youtube

Collierre
Author by

Collierre

Updated on September 18, 2022

Comments

  • Collierre
    Collierre over 1 year

    Did a fresh install of Ubuntu 17.10 a few days ago on my Lenovo Thinkpad Edge (using an existing home directory on a different partition).

    When I close the lid and put it to sleep, on waking it I can no longer login. Sometimes it spends ages checking the password, then says the password is wrong. Sometimes I can't even enter anything into the password box. To fix this I have to shut down and restart. Login always works fine on a restart.

    Any help?

    • davidmw
      davidmw over 6 years
      If you have to turn screen-lock to "off" because of this issue, that's a security flaw.
    • davidmw
      davidmw over 6 years
      Does your ThinkPad use Intel video acceleration? Mine does. I saw some older issues where switching to nVidia fixed a similar gnome issue.
    • Collierre
      Collierre over 6 years
      Not sure, how do I find out?
    • davidmw
      davidmw over 6 years
      I fixed it on my machine. If you use CrashPlan, my updated answer should fix it for you too!
  • pvaesrtdoe
    pvaesrtdoe over 6 years
    Does "uncomment" mean delete the hashtag?
  • rafrsr
    rafrsr over 6 years
    yes, like the example above, and restart.
  • Collierre
    Collierre over 6 years
    Unfortunately it seems to happen the same whether I'm using Wayland or Xorg. Is there an alternative login manager?
  • davidmw
    davidmw over 6 years
    Did not make any difference for me.
  • davidmw
    davidmw over 6 years
    Isn't lightdm the "old" way of doing things? I mean, since Ubuntu switched to Gnome, lightdm isn't going to work in future releases, is it?
  • Collierre
    Collierre over 6 years
    I'm not sure how long it's going to work for. If I don't solve this in this release I'll try again next release.
  • Gunnar Hjalmarsson
    Gunnar Hjalmarsson over 6 years
    @GlenPeterson: LightDM is used by all the flavors, so it won't be dropped just like that.
  • Collierre
    Collierre over 6 years
    Amazing, I do use crashplan and this was the problem!
  • davidmw
    davidmw over 6 years
    What I should have done first: Write down the exact time when problem occurs. Then cd /etc/log (the logs folder) then ls -tl to sort by time (newest first) to see which log files have been updated since the time of the issue. Then look in those 5 or so files and find messages from at or near the time I had the problem. Then search the web with the likely errors. Whole process took about 30 minutes. As compared to imagining stuff and randomly trying things - that took several hours.
  • chris
    chris over 6 years
    I'll second the "amazing" comment. CrashPlan was the problem for me also.