After install Ubuntu 22.04, I found there’s not configuration item is available in “System Settings” to make Ubuntu not go in suspend when lid is closed. Here is the solution.
sudo apt install gnome-tweaks
Once installed, start the Tweaks application. In the General tab from the sidebar, toggle off the “Suspend when laptop lid is closed” button.
Open “/etc/systemd/logind.conf” and update it’s content:
# Find the following items, uncomment if necessary: