Question: This is the error message I get when trying to logout or shutdown from the menu in Xubuntu 16.04 on my Dell laptop.

Interestingly when I choose "Log Out..." from the actions menu the first time nothing happens, but if I try it again then do I get the `Session manager must be in idle state when requesting a shutdown` error dialog.

I have tried the answers [here](https://askubuntu.com/questions/116990/cannot-log-off-or-shutdown-in-ubuntu-10-10#) and [here](https://askubuntu.com/questions/727752/shutdown-problem) and some others from google to no avail. 

I am able to shutdown by running `sudo shutdown now` from the terminal.

Not sure how to proceed.

Answer: 
The same thing happend with me today, it was the first time:

I've decided to go to the terminal mode by ctrl+alt+f1 and then find out the process id of session manager, by 'pidof xfce-session' then close it with 'kill -9 ID'.
Then it started working fine.
Upgrading from 16.04 to 16.10 fixed the issue.