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
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend
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.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#UserTasksMax=12288
UPDATE-1
I upgraded my system to Fedora 27, but still the problem remains. Any idea on how to solve it?
UPDATE-2
I tried @isapir answer, but it didn't work... More specifically
$ swapon -s
which gaveFilename Type Size Used Priority /dev/dm-2 partition 7864316 0 -2
Then I edited the
/etc/default/grub
file. On the entry aboutGRUB_CMDLINE_LINUX=
there was"rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet"
which I changed toresume=/dev/dm-2
To identify whether my system is
UEFI
orlegacy
I did$ sudo efibootmgr
. The output wasEFI variables are not supported on this system.
which I guess means that I own a legacy system. So finally I didgrub2-mkconfig -o /etc/grub2.cfg
Any idea on how to proceed?
UPDATE-3
I also checked the journal typing
sudo journalctl -b | grep "Feb 13" > journal.dat
but I am not sure what am I looking for. You can find the output here
Any idea on what's wrong?