1

Since upgrading to 15.10, I am having suspend issue on my Thinkpad X1 Carbon (1st gen) which has been running five or six Ubuntu releases fine so far.

Upon lid close, no successful suspend happens right now: the machine stays on / immediately reverts to 'on'. When I first noticed that (about a month ago after upgrading) I simply reverted to booting into the older 3.* kernel. Following a reboot this week it turned out that under 3.50.* I had no wifi :-/ so the 3.* kernel is no viable option.

So back to 4.2.0-19, and after some research (and looking at existing bug reports) I found out that sudo pm-suspend; sudo pm-suspend works.

I tried to file a bug report but ubuntu-bug complains about third-party repositories so no luck. Happy to provide further details if it helps.

2 Answers2

1

There's an option in systemd that allows you to prevent your laptop to get into sleep mode when you close the lid.

Here are the steps to use that option:

  1. Open the file /etc/systemd/logind.conf with admin rights

  2. Add in a new line at the end of the file:

    HandleLidSwitch=ignore

Or, in one command in your terminal:

    echo "HandleLidSwitch=ignore" | sudo tee -a /etc/systemd/logind.conf

Here's what logind.conf manual says (source):

HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=, HandleLidSwitch=

       Controls whether logind shall handle the system power and sleep
       keys and the lid switch to trigger actions such as system power-off
       or suspend. Can be one of ignore, poweroff, reboot, halt, kexec,
       suspend, hibernate, hybrid-sleep and lock. If ignore logind will
       never handle these keys. If lock all running sessions will be
       screen locked. Otherwise the specified action will be taken in the
       respective event. Only input devices with the power-switch udev tag
       will be watched for key/lid switch events.  HandlePowerKey=
       defaults to poweroff.  HandleSuspendKey= and HandleLidSwitch=
       default to suspend.  HandleHibernateKey= defaults to hibernate.
MrVaykadji
  • 5,965
0

I also had this problem on Ubuntu 16.04

As detailed here for someone else, with a slightly different setup:

sh: echo: I/O error on pm-suspend Ubuntu 14.04

The problem was due to a constantly mounted USB stick. If I ensure the USB is unmounted prior to suspending it works perfectly.