Logout/Shutdown from menu requires two attempts

Ever since I installed Fedora (27) MATE, the Logout or Shutdown options from the menu (System → Logout or Shutdown) needs to be attempted twice to work.

The first time, nothing happens. No errors, no messages, just nothing. Doing it a second time works without problems.

This is always the case on a freshly booted system (within a few minutes of booting). After a long time of being up, sometimes Logout/Shutdown works on the first try, but not always.

On the other hand shutdown -r now always works.

It’s a minor nuisance, but still annoying. What could be the problem with the Logout/Shutdown menu?

I seem to recall something happening like this some time ago. However, if i recall correctly, I think the issue was solved in an update not by a setting somewhere. Since Fedora 27 stopped getting support on November 30 2018 I would highly suggest moving to F29 or F30 when you can so you will keep getting bug fixes and security updates.

I’ve always updated, and am currently on Fedora 30. I was just pointing out this has happened since I first installed Fedora with version 27.

Well, this was happening to me too in some past version. BTW I don’t remember, but some update solved the issue.
What you can do is looking at the logs: Viewing logs in Fedora :: Fedora Docs
And you could also test if the same issue happens with another user.

I’ll check journalctl next time I reboot or logout (usually only about once a week), but I don’t recall there being anything interesting.

I tried rebooting from the menu (on a freshly booted system) with journalctl -f running. It did not reboot. No unusual messages. I waited a good 5 minutes and saw other normal log entries appear for systemd services, dnf makecache, cron tasks, etc. It simply did nothing until I tried a second time, at which point it rebooted immediately, as expected.

You can temporary create a new user with clean default profile and test from his session.
Also test the MATE analogue of gnome-session-quit.

I think it is mate-session-save --logout, mate-session-save --logout-dialog, or mate-session-save --shutdown-dialog. I’ll try next time.

Ok I tried it: session-mate-save --logout and mate-session-save --logout-dialog both needed to be invoked twice to take effect.

The two attempts are required on each new login, not necessarily just on each new reboot. I did not stay logged in long enough to see if the issue exists on a new user login on a non-freshly-booted system. Something to try another time.

I also tried creating a new user, but logging in as that user resulted in a black screen with just a mouse cursor. Not sure what needs to be configured for the user’s graphical account to work.

I assume there’s no relevant information neither in the terminal output nor in the logs.

Probably the session type:

grep -r -e Session /var/lib/AccountsService/users

I found the problem with the test user unable to login: the system creates users with an invalid user ID: Old askbot-based Ask Fedora archives are gone — look for new answers here instead! - Ask Fedora

So I can confirm the two-attempts-to-logout/shutdown issue does not exist with the test user.

Yes, there’s no terminal output or anything in journalctl when the first attempt fails (with my user).

Then it’s likely some config file in your user profile that causes the issue.
Perhaps strace can help you to localize it.
You can also try to use the exclusion method, but it may result in a lot of work.

Any specific suggestions?

What might cause this ignoring of only the first attempt to logout/reboot, and only for some duration of time after login/reboot? As noted before, after the system has been up for some time, login/reboot works from the menu on the first try.

With Fedora 38 and 39 I have the same issue on two different computers, and I’ve always had it. It’s 2023.

We have no detailed info on your hardware and this thread is necro by 4 years (and apparently at least 10 fedora versions).
If you wish assistance please post your own new thread and provide information about your system and fedora version.

I am closing this thread