This issue has been going on in XFCE for as long as I can remember. And no matter how many times you fix it, after every update, it happens again. A message is displayed asking for permission to put the computer to sleep after a period of inactivity. This wouldn’t be a problem if it weren’t for the fact that this message is only seen when you return to the machine to continue working with it.

The solution is simple. Edit the file /usr/share/polkit-1/actions/org.freedesktop.login1.policy , so that the following section looks like this:

<action id="org.freedesktop.login1.suspend">
  <description gettext-domain="systemd">Suspend the system</description>
  <message gettext-domain="systemd">Authentication is required to suspend the system.</message>
    <defaults>
      <allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
</action>