Skip to content
Unix Server Solutions
  • Server
  • Apple
  • Database
  • Ubuntu
  • Linux

Ubuntu – Can’t login after suspend on Ubuntu 17.10

17.10login-screensuspend

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?

Best Answer

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

Related Solutions

Ubuntu – Screen switches off after waking up from suspend

Here are a few options to avoid or recover from the issue.

Temporary fix

In the main bug ticket there's now a fix which involves adding a PPA:

  1. Add the Xubuntu Developers PPA to get the new packages: sudo add-apt-repository ppa:xubuntu-dev/ppa

  2. Update package information and update the two crucial packages:

    sudo apt-get update && sudo apt-get install xfce4-power-manager light-locker-settings

    xfce4-power-manager-data will get upgraded at the same time

  3. Restart your machine.

To remove the upgrades and return your machine to it's state prior to testing

sudo ppa-purge ppa:xubuntu-dev/ppa

Temporary workaround

The easiest way to work around this bug is to disable lock on suspend in the light locker settings. Of course, this means that your machine will resume from suspend without a password.

Quick fix

If you end up in this situation you can get back to a working state (note that you'll lose your current session and a new one will be started) by:

  1. Switch to a virtual terminal: CtrlAltF1
  2. Restart lightdm: sudo service lightdm restart
Ubuntu – After waking from hibernation/suspend, screen displays noise pattern

Do you have hybrid graphics with an NVIDIA card on your system? If so, maybe try installing the NVIDIA graphics drivers. I had similar problems which were resolved upon installing the proprietary NVIDIA drivers. Steps to install the driver

This might not be the best solution, but it seemed to work for me.

Cheers!

Related Question
  • Ubuntu – Screen switches off after waking up from suspend
  • Ubuntu – After waking from hibernation/suspend, screen displays noise pattern