Ask Your Question

Fedora 25 - laptop won't suspend when closing lid after hard shutdown

asked 2018-01-02 06:50:23 -0500

Thanos gravatar image

updated 2018-02-13 01:18:43 -0500

I am facing this rather bizarre situation. After shutting down my laptop by pushing the power button for a few seconds and powering it on again the "suspend when lid is closed" option isn't working.

So when I close the lid, the laptop powers off. The strange thing is that when I open the lid the laptop powers on! This is strange because I don't push any power button whatsoever!

I checked my /etc/systemd/logind.conf file, but the following lines are uncommented


Any idea on what might be the issue?

I am pasting the entire logind.conf file, because it might be useful to locate the problem.

#  This file is part of systemd.
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
# See logind.conf(5) for details.


I also upgraded my system to Fedora 27, but still the problem remains.

Additionally I tried to edit the grub file by following the steps seen below 1. $ swapon -s which gave

`Filename               Type        Size    Used    Priority
/dev/dm-2                               partition   7864316 0   -2`
  1. Then I edited the /etc/default/grub file. On the entry about GRUB_CMDLINE_LINUX= there was " rhgb quiet" which I changed to resume=/dev/dm-2

  2. To identify whether my system is UEFI or legacy I did $ sudo efibootmgr. The output was EFI variables are not supported on this system. which I guess means that I own a legacy system. So finally I did grub2-mkconfig -o /etc/grub2.cfg

I also checked the journal by typing sudo journalctl -b | grep "Feb 13" > journal.dat but I don't know how to see if there is something wrong there. The output can be found here

Any idea on how to proceed?

edit retag flag offensive close merge delete


I'd suggest running ‍journalctl -lfk > suspend.log, then closing your laptop lid, waiting for whatever happens. Then open the lid, turn on your laptop and run fpaste suspend.log and then post the given link.

hedayat gravatar imagehedayat ( 2018-02-26 15:29:02 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-01-26 01:00:52 -0500

isapir gravatar image

updated 2018-01-26 19:36:53 -0500

I think that your laptop is trying to resume from the wrong partition. Try this:

# swapon -s

That should show you which partition is used for Swap. On my machine, for example, it shows /dev/dm-1

Filename        Type        Size     Used   Priority
/dev/dm-1       partition   8388604  0      -2

Then edit /etc/default/grub and find the line that starts with GRUB_CMDLINE_LINUX=. It needs to have a value of resume=<your-swap-device>. In my example that is resume=/dev/dm-1. If the resume entry is there, update it. If not, add it.

Now you have to regenerate the grub. On UEFI systems that would be:

# grub2-mkconfig -o /etc/grub2-efi.cfg

On legacy systems that would be

# grub2-mkconfig -o /etc/grub2.cfg

The next time that your computer tries to recover from suspend it should find the information that it needs.


edit flag offensive delete link more


Suspend is meaning suspend to ram. What you are talking about is suspend to disk, which is also called hibernate.

erik gravatar imageerik ( 2018-01-28 05:01:39 -0500 )edit

Having same problem with everything configured on Fedora 27, i hope someone solved it :D

eugene_xci gravatar imageeugene_xci ( 2018-02-16 20:32:44 -0500 )edit

Question Tools

1 follower


Asked: 2018-01-02 06:50:23 -0500

Seen: 1,519 times

Last updated: Feb 13 '18