Laptop inconsistently going to sleep when lid closed

(copy-paste of a reddit post I made on r/kde yesterday)

I made a post on r/ManjaroLinux a while ago about this same problem, but with a different computer: link. Basically, when I close my laptop lid, the computer doesn’t always go to sleep. This will result in a dead computer after several hours when I’m not using it, even though it should have been asleep drawing very little power. However, when I specifically go into KDE’s shutdown menu and choose “Sleep”, that has worked every time so far that I know of.

I just went into the /etc/systemd/logind.conf file and changed the values there, but the KDE settings are also set accordingly. Anyone know if this is a KDE thing, Manjaro thing, or Linux thing? I never had this problem on my laptops installed with Windows.

EDIT: Realizing I didn’t state it explicitly but I’m running Manjaro KDE 5.24.5.