I have a problem somewhat similar to the one in this question..
I am on Ubuntu 16.04 LTS and I usually install system updates when they are available. Yesterday I noticed that when I click on shutdown, the computer shows Logout and Lock dialog just before loging out AUTOMATICALLY instead of shutting down. I have to run shutdown command on the terminal to really shut down my computer. The above link did not help me. Hope you can understand me and solve my problem.