I have XUbuntu 18.04.
I want to close the lid on my laptop and have the screen immediately go blank (black) or off, but the computer itself to remain awake (active [not suspended]).
I've installed gnome-tweaks and that allowed me to disable the suspension feature, but it also disables the screen blanking.
logind.conf doesn't have a setting for this and gnome-tweaks and xfce-power both seem to override it regardless.
In regards to @ptetteh227, this file is entirely commented out. I've looked at the man page for it and there are no settings one can make to achieve the action that I need. https://pastebin.com/MXKnikKn
Have considered allowing it go to a lock screen but seems like another question to me.