Fix laptop doesn’t suspend after lid is closed in Ubuntu 16.04

Apparently, many users of Ubuntu are reporting problem with laptop not going to suspend/sleep mode when the lid is closed. This is a confirmed bug in Ubuntu 16.04 and developers are working on a permanent fix to this problem. Seems like the problem may be due to hardware-kernel compatibility in some cases and for some, it is due to missing proprietary drivers. For now, the reasons are still vague and root cause is not yet determined as per the Ubuntu bug thread.

But don’t worry, there is a workaround to get through this problem by modifying the logind.conf file. Let’s get started. Note that it is important to first check if you have enabled the suspend settings for the laptop lid close setting in the ‘Power’ options.

Enable Laptop Lid Close Suspend/Sleep Action

Go to ‘Power’ settings and select ‘Suspend’ for the item “When the lid is closed”. You can do it for only the Battery power mode or also for ‘when plugged’ in option.

Power Settings
Power Settings

Once you have confirmed the setting is good, and still Ubuntu doesn’t go to suspend when laptop lid is closed, try this below workaround:

Workaround for the Bug: edit logind.conf file

STEP 1: Launch ‘Terminal’ and run the following command:

sudo vi /etc/systemd/logind.conf

STEP 2: Uncomment the line:


Uncomment means remove the # in front of it.

STEP 3: Change ‘ignore’ to ‘suspend’.


That’s it. Reboot your computer and see if the problem is fixed. Do let us know in comments below.

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. Hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more, and spread Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!


  1. Acer Aspire V5-473P-5602 Ubuntu 18.04LTS.

    Kiran, I’d no idea what I was trying, and it went all wrong. I had no idea; 1. that I was going to be editing a file using ‘special’ systemd edit commands. 2. That file, logind.conf, is now, after my attempts, entirely empty.

    So, if you can help please?

    1. Upon entering the terminal command “sudo vi /etc/systemd/logind.conf”, I now get this:

    “E325: ATTENTION
    Found a swap file by the name “/etc/systemd/.logind.conf.swp”
    owned by: root dated: Thu Nov 29 16:17:09 2018
    file name: /etc/systemd/logind.conf
    modified: YES
    user name: root host name: Acer-Aspire-V5-473P-5602
    process ID: 12868
    While opening file “/etc/systemd/logind.conf”

    (1) Another program may be editing the same file. If this is the case,
    be careful not to end up with two different instances of the same
    file when making changes. Quit, or continue with caution.
    (2) An edit session for this file crashed.
    If this is the case, use “:recover” or “vim -r /etc/systemd/logind.conf”
    to recover the changes (see “:help recovery”).
    If you did this already, delete the swap file “/etc/systemd/.logind.conf.swp

    to avoid this message.

    “/etc/systemd/logind.conf” [New File]

    2. I would like to have (or be able to somehow recover) the original contents of that file from my system (and I don’t even know it they were the default as originated with the OS, or had already been modified in other ways before I made my ‘effort’. I did actually search for such original contents, but didn’t find anything like that.

    3. Certainly, before I try again, I would like to know exactly where I can learn how to ‘properly’ edit and save the changes I make to the file, assuming I can actually first restore it.

    In other words, I’m entirely lost. Please help (and somehow, I’ll bear the laughter)?

    Thanks kindly…E


Please enter your comment!
Please enter your name here




tar command
Tar is a famous utility that is basically used for collecting multiple files in a single archive. This file is often called a 'tarball'. Today, we are going to tell you about the different things you can do with tarballs using the tar command, with practical examples.
Free up hard disk space ubuntu
Hard disk space can easily get filled up with cached package files, old kernels, and other obsolete files that occupy unwanted hard disk space. Here are top five best and safer ways to clean and free up hard disk space in Ubuntu. We show you Terminal and GUI way of cleaning up system.