However all the discussion did not cover my use case, which occurs on a daily basis:
- Play audio book.
- Run command to shutdown laptop after half an hour.
- close laptop lid turn off lights and go to sleep.
You can resolve this using the solution, provided by timlau, to use gsetting to manually set the power setting (He post links to a script to automatically set this using a zenity dialog).
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action “blank”
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action “blank”