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




gamemode enable linux
GameMode is a combination of various libraries and daemons that allows all the users to improve the gaming performance on the Linux system. Developed by games publisher Feral Interactive, it improves gaming performance by requesting a group of options that will be applied temporarily to the Linux system.
In this article, we will take a look at 10 of the best PDF editors and tools out there in 2019 that are available for Linux platforms. The editors are going to be judged on the basis of their functionalities, portability, ease of installation, price, and convenience.
cool and fun linux commands
The real purpose of this article is to help Linux newbies get comfortable and confident with the Linux command-line.  While knowledge and comfort of the Linux GUI allow great power, it is the mastery of the command line, or CLI, affords the Linux user unlimited power and certifies them as a Linux power user well on their way to becoming an expert.