Laptop suspends when lid closes despite power settings

Manjaro XFCE Mikah 20.1

Power manager settings:

imgur com/a/jrlgncZ

I have my laptop connected to an external monitor via hdmi. In display manager, the laptop screen is already turned off. When I close the laptop lid, I expect nothing to happen thusly. However in reality the external monitor goes black because the laptop has suspended. How do I make it behave?

Do you have a swap partition?

Run:

lsblk

in terminal to find out. Also, please paste the output here.

I don’t have swap

NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
nvme0n1                                       259:0    0 476,9G  0 disk  
├─nvme0n1p1                                   259:1    0   300M  0 part  /boot/efi
└─nvme0n1p2                                   259:2    0 476,6G  0 part  
  └─luks-72aea425-613d-4a0d-a0e2-d679a9e50959 254:0    0 476,6G  0 crypt /

Do you have a live usb you can boot from?

If so, boot from it and shrink one of your partitions with gparted by 8 GB.

Then, make a new partition in gparted that is 8 GB.

Then go to terminal and:

lsblk

Look for the new partition and then type:

sudo mkswap /dev/(whichever partition is new)

then

sudo swapon /dev/(whichever partition you just turned swap on for)

then this command

sudo bash -c "echo UUID=$(lsblk -no UUID /dev/your-partition-name) none swap defaults 0 0 >> /etc/fstab"

to add it to your /etc/fstab file

ht!tps://wiki.manjaro.org/index.php?title=Swap

You can also follow this guide^^^

Hi, I don’t really see what an on disk memory pool has to do with unwanted suspending? You might be thinking of hibernating and saving state to disk which to reiterate is even further from what I want.

I also do not want a swap because it murders my ssd writes.

I apologize. That was my misunderstanding.

As a side note, I enabled the noatime flag in my fstab and have had 0 issues with read/write with a swap file.

I will continue to try and help if that’s okay…

Also, the reason I suggested the swap file is because I was having the same issue with my laptop when I first got it and I made the swap file and the problem went away.

1 Like

Interesting, but I’d still rather not use a swap. Sorry for my rude tone.

No problems. I will keep searching for a solution.

Unfortunately, I can’t post links on here,

but there is a discord server for Manjaro support.

They are extremely knowledgeable and have helped me twice. If I am not mistaken they are the ones that helped me when my laptop was doing this.

I will continue looking though.

Here is the discord invite code:

zFXWWP

1 Like

This is what they told me to tell you:

<@!400290721396948992> tell them to edit /etc/systemd/logind.conf and set HandleLidSwitch=ignore in there

I have opened #ticket-0336

I already read that on another forum but it doesn’t seem to do anything (I have rebooted since editing)

$ cat /etc/systemd/logind.conf 
#  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=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodes=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

I have this same issue. I do have swap configured for hibernate.

My system is a Thinkpad E595 with the USB-C dock with external monitors connected to that. Running Manjaro XFCE, fully updated.

Uname info:

5.8.6-1-MANJARO #1 SMP PREEMPT Thu Sep 3 14:19:36 UTC 2020 x86_64 GNU/Linux

What’s interesting is that I can initiate a reboot, then close the lid and all the bios will show on the external monitor, unlock the disk, and show the login screen just fine. But as soon as I log in, the system suspends itself and the screen goes black.

I’ve edited the logind.conf file to ignore all of the lid related stuff, and tried every permutation of power/lid related config I can find in the GUI tools. Full reboot after every single config change.

Any thoughts or suggestions?

$ lsblk
NAME                                        MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
nvme0n1                                     259:0    0  1.8T  0 disk  
├─nvme0n1p1                                 259:1    0  300M  0 part  /boot/efi
├─nvme0n1p2                                 259:2    0  1.8T  0 part  
│ └─luks-dc5a97cc-2ec8-4d6e-8ccd-4de5363805c3
│                                           254:0    0  1.8T  0 crypt /
└─nvme0n1p3                                 259:3    0 32.3G  0 part  
  └─luks-0dd82f96-39b7-491b-bb20-df201f270653
                                            254:1    0 32.3G  0 crypt [SWAP]