As it says in the answer to the question How to make laptop not suspend when the lid is closed, I’ve changed the setting When the lid is closed to Do nothing on A/C power and battery power on Power Management. But the laptop is still suspending when I close the lid.
The laptop is a Thinkpad T480 and I want to use it through ssh without the need to keep the screen on, but when I close the lid it suspends and the ssh connection hangs.
The laptop isn’t connected to an external monitor.
On a similar question I’ve seen someone ask for the output of lsblk
❯ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 465.8G 0 disk
├─nvme0n1p1 259:1 0 300M 0 part /boot/efi
├─nvme0n1p2 259:2 0 448.5G 0 part /
└─nvme0n1p3 259:3 0 16.9G 0 part [SWAP]
It should print the contents of all involved configurations after each other.
Ofcourse make sure your setting inside the drop-in is placed under a [Login] heading like in the original file
No need to re-install systemd, just undo your change in original file and check with above command and if all is ok, just reboot to test.