Shutting laptop lid does not lock or sleep computer

On my i3WM machine I recently found that when i close the laptop lid the laptop does not lock or go to sleep. I know that when using Albert to get it to sleep it does sleep and does lock.

I have checked the power management and all seems fine.

Any help would be great.


Screen lock not working 2022

Check what process shows this message (in htop, etc.) to find where to look for some setting/configuration.