No answer to why power manager asking for authentication to suspend

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
kdlm
Level 1
Level 1
Posts: 41
Joined: Mon Sep 28, 2015 3:37 pm

No answer to why power manager asking for authentication to suspend

Post by kdlm »

I installed LM 19.3 xfce 64 on my Acer laptop, not a little because the power manager in 18.3 wasn't working. Suspend works great when I do it from the keyboard. Not so by way of the power manager. I've set the power manager to suspend after a period of non-use but it doesn't because it presents a window asking for authentication to suspend that I don't see until the screen unblanks. I've entered my password but it doesn't suspend even then and the process repeats the next time it ought to have suspended from non-use.

Image


Any idea why this request is keeping the power manager from suspending after a period of non-use and how to fix it?
kdlm
Level 1
Level 1
Posts: 41
Joined: Mon Sep 28, 2015 3:37 pm

Re: No answer to why power manager asking for authentication to suspend

Post by kdlm »

This is the first time I've not received any responses to a question. Can this problem be that out of the ordinary?
User avatar
MrEen
Level 20
Level 20
Posts: 11760
Joined: Mon Jun 12, 2017 8:39 pm

Re: No answer to why power manager asking for authentication to suspend

Post by MrEen »

kdlm wrote:
Sat Jan 25, 2020 12:09 pm
This is the first time I've not received any responses to a question. Can this problem be that out of the ordinary?
Hi kdlm. I think it might be.

I found only one thread on the Xfce forum that seems to have the same issue, and the fix that user used doesn't seem to be viable in this case as the path /etc/polkit-1/rules.d doesn't exist, at least on my 18.3 system. Nor are .rules files used anywhere in any polkit folders I can find (/var/lib/polkit-1 being the other.)

One question; Do you have more than one user logged into the system when this is happening? I could imagine that might cause this issue.
User avatar
powerwagon75
Level 4
Level 4
Posts: 277
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: No answer to why power manager asking for authentication to suspend

Post by powerwagon75 »

Hi kdlm,

You didn't expand the "details" before you took your screenshot. Is this the comment it shows in the details: <Authentication is required to update SMART data>

If so, can you see if you have this file: /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy

If you have that, open it in a text editor, and scroll down towards the end and look for the section called: <action id="org.freedesktop.udisks2.ata-smart-update">

Scroll down past the language options in that section, to the bottom of the section (just before the line break to the next section) and look at these settings:

<defaults>
<allow_any>
yes</allow_any> <--- (this was set to auth_admin originally)
<allow_inactive>
auth_admin</allow_inactive>
<allow_active>
yes</allow_active>
</defaults>
</action>


If you found all this thus far, then check if the word between the <allow any> brackets is yes. I had this problem on my main system (Mint 18) when I would go to a console via ctl-alt-F1-6; the message would be waiting for me when I got back to my main GUI screen. Also just recently rejuvenated an old Dell Vostro 1500 for a friend with Linux Lite, and it would not suspend as you stated, and was also showing the SMART data authentication request. Changing the <allow any> from no or auth_admin to a yes fixed both.
Image
Custom tower w/Mint 18
HP laptop w/Mint 18
Acer w/W10/Mint 18.3
Macbook w/El Capitan/Mint 18.3
Optiplex 960 "Frankenbox" w/Fedora 30/Mint 18.3/Mint 19.2
Acer C720 Chromebook w/GalliumOS
Mac PPC G4 w/Lubuntu
kdlm
Level 1
Level 1
Posts: 41
Joined: Mon Sep 28, 2015 3:37 pm

Re: No answer to why power manager asking for authentication to suspend

Post by kdlm »

I feeling confused. I don’t get the connection between “udisks2.ata-smart-update" and this problem.

But I do have this file: /usr/share/polkit-1/actions/org.xfce.power.policy.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>

  

  <vendor>XFCE Power Manager</vendor>
  <vendor_url>http://goodies.xfce.org/projects/applications/xfce4-power-manager</vendor_url>
  <icon_name>battery</icon_name>

  <action id="org.xfce.power.backlight-helper">
    
    <description>Modify the laptop display brightness</description>
    <message>Authentication is required to modify the laptop display brightness</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/xfpm-power-backlight-helper</annotate>
  </action>

  <action id="org.xfce.power.xfce4-pm-helper">
    
    <description>Suspend or hibernate the system</description>
    <message>Authentication is required to place the system in suspend or hibernate mode</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/xfce4-pm-helper</annotate>
  </action>

</policyconfig>
I don't know if it's a factor, but I chose to not require a login when starting up I installed 19.3 xfce. I do need to use a password after a period of inactivity.
Last edited by Moem on Sun Jan 26, 2020 3:01 pm, edited 1 time in total.
Reason: Swapped the [c] tags out for [code] tags; the code tags retain some formatting that makes your output easier to read.
User avatar
MrEen
Level 20
Level 20
Posts: 11760
Joined: Mon Jun 12, 2017 8:39 pm

Re: No answer to why power manager asking for authentication to suspend

Post by MrEen »

In your image in the OP, see the >Details link? Click on that and see if it shows <Authentication is required to update SMART data>

While the file you found does indicate you need authorization to suspend, I assume something else overrides that setting. I could be wrong about that, but my file looks the same, although I don't suspend my machine.
kdlm
Level 1
Level 1
Posts: 41
Joined: Mon Sep 28, 2015 3:37 pm

Re: No answer to why power manager asking for authentication to suspend

Post by kdlm »

i can't believe I hadn't looked at the detail. But when I let the computer be idle so I could get the window and the opportunity to see what the details said, the computer suspended. Now I'll have to wait till and if it happens again. I might have checked locked screen when going to sleep in the power manager but I can't say for sure that changed it.

Regardless, I can easily suspend from the keyboards and under 18.3 suspension by way of hardware was unreliable.

Thanks for the help. I come back here if need be.
kdlm
Level 1
Level 1
Posts: 41
Joined: Mon Sep 28, 2015 3:37 pm

Re: No answer to why power manager asking for authentication to suspend

Post by kdlm »

The authentication window returned. Here's what it looks like when details are clicked:


Image

So I have this file: /usr/share/polkit-1/actions/org.freedesktop.login1.policy which says "This file is part of systemd." Seems like it might be relevent to the problem. But it seems to offer controls for all sorts of things and I don't have any idea what if any I should change to stop the authentication requests.

Here it it:

'''

Code: Select all

<?xml version="1.0" encoding="UTF-8"?> <!--*-nxml-*-->
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
        "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">

<!--
  SPDX-License-Identifier: LGPL-2.1+

  This file is part of systemd.

  systemd is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published by
  the Free Software Foundation; either version 2.1 of the License, or
  (at your option) any later version.
-->

<policyconfig>

        <vendor>The systemd Project</vendor>
        <vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>

        <action id="org.freedesktop.login1.inhibit-block-shutdown">
                <description gettext-domain="systemd">Allow applications to inhibit system shutdown</description>
                <message gettext-domain="systemd">Authentication is required for an application to inhibit system shutdown.</message>
                <defaults>
                        <allow_any>no</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-delay-shutdown org.freedesktop.login1.inhibit-block-sleep org.freedesktop.login1.inhibit-delay-sleep org.freedesktop.login1.inhibit-block-idle</annotate>
        </action>

        <action id="org.freedesktop.login1.inhibit-delay-shutdown">
                <description gettext-domain="systemd">Allow applications to delay system shutdown</description>
                <message gettext-domain="systemd">Authentication is required for an application to delay system shutdown.</message>
                <defaults>
                        <allow_any>yes</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-delay-sleep</annotate>
        </action>

        <action id="org.freedesktop.login1.inhibit-block-sleep">
                <description gettext-domain="systemd">Allow applications to inhibit system sleep</description>
                <message gettext-domain="systemd">Authentication is required for an application to inhibit system sleep.</message>
                <defaults>
                        <allow_any>no</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-delay-sleep org.freedesktop.login1.inhibit-block-idle</annotate>
        </action>

        <action id="org.freedesktop.login1.inhibit-delay-sleep">
                <description gettext-domain="systemd">Allow applications to delay system sleep</description>
                <message gettext-domain="systemd">Authentication is required for an application to delay system sleep.</message>
                <defaults>
                        <allow_any>yes</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.inhibit-block-idle">
                <description gettext-domain="systemd">Allow applications to inhibit automatic system suspend</description>
                <message gettext-domain="systemd">Authentication is required for an application to inhibit automatic system suspend.</message>
                <defaults>
                        <allow_any>yes</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.inhibit-handle-power-key">
                <description gettext-domain="systemd">Allow applications to inhibit system handling of the power key</description>
                <message gettext-domain="systemd">Authentication is required for an application to inhibit system handling of the power key.</message>
                <defaults>
                        <allow_any>no</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-handle-suspend-key org.freedesktop.login1.inhibit-handle-hibernate-key org.freedesktop.login1.inhibit-handle-lid-switch</annotate>
        </action>

        <action id="org.freedesktop.login1.inhibit-handle-suspend-key">
                <description gettext-domain="systemd">Allow applications to inhibit system handling of the suspend key</description>
                <message gettext-domain="systemd">Authentication is required for an application to inhibit system handling of the suspend key.</message>
                <defaults>
                        <allow_any>no</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-handle-hibernate-key org.freedesktop.login1.inhibit-handle-lid-switch</annotate>
        </action>

        <action id="org.freedesktop.login1.inhibit-handle-hibernate-key">
                <description gettext-domain="systemd">Allow applications to inhibit system handling of the hibernate key</description>
                <message gettext-domain="systemd">Authentication is required for an application to inhibit system handling of the hibernate key.</message>
                <defaults>
                        <allow_any>no</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.inhibit-handle-lid-switch">
                <description gettext-domain="systemd">Allow applications to inhibit system handling of the lid switch</description>
                <message gettext-domain="systemd">Authentication is required for an application to inhibit system handling of the lid switch.</message>
                <defaults>
                        <allow_any>no</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.set-self-linger">
                <description gettext-domain="systemd">Allow non-logged-in user to run programs</description>
                <message gettext-domain="systemd">Explicit request is required to run programs as a non-logged-in user.</message>
                <defaults>
                        <allow_any>yes</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.set-user-linger">
                <description gettext-domain="systemd">Allow non-logged-in users to run programs</description>
                <message gettext-domain="systemd">Authentication is required to run programs as a non-logged-in user.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.attach-device">
                <description gettext-domain="systemd">Allow attaching devices to seats</description>
                <message gettext-domain="systemd">Authentication is required for attaching a device to a seat.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.flush-devices</annotate>
        </action>

        <action id="org.freedesktop.login1.flush-devices">
                <description gettext-domain="systemd">Flush device to seat attachments</description>
                <message gettext-domain="systemd">Authentication is required for resetting how devices are attached to seats.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.power-off">
                <description gettext-domain="systemd">Power off the system</description>
                <message gettext-domain="systemd">Authentication is required for powering off the system.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.set-wall-message</annotate>
        </action>

        <action id="org.freedesktop.login1.power-off-multiple-sessions">
                <description gettext-domain="systemd">Power off the system while other users are logged in</description>
                <message gettext-domain="systemd">Authentication is required for powering off the system while other users are logged in.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.power-off</annotate>
        </action>

        <action id="org.freedesktop.login1.power-off-ignore-inhibit">
                <description gettext-domain="systemd">Power off the system while an application asked to inhibit it</description>
                <message gettext-domain="systemd">Authentication is required for powering off the system while an application asked to inhibit it.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.power-off</annotate>
        </action>

        <action id="org.freedesktop.login1.reboot">
                <description gettext-domain="systemd">Reboot the system</description>
                <message gettext-domain="systemd">Authentication is required for rebooting the system.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.set-wall-message</annotate>
        </action>

        <action id="org.freedesktop.login1.reboot-multiple-sessions">
                <description gettext-domain="systemd">Reboot the system while other users are logged in</description>
                <message gettext-domain="systemd">Authentication is required for rebooting the system while other users are logged in.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.reboot</annotate>
        </action>

        <action id="org.freedesktop.login1.reboot-ignore-inhibit">
                <description gettext-domain="systemd">Reboot the system while an application asked to inhibit it</description>
                <message gettext-domain="systemd">Authentication is required for rebooting the system while an application asked to inhibit it.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.reboot</annotate>
        </action>

        <action id="org.freedesktop.login1.halt">
                <description gettext-domain="systemd">Halt the system</description>
                <message gettext-domain="systemd">Authentication is required for halting the system.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.set-wall-message</annotate>
        </action>

        <action id="org.freedesktop.login1.halt-multiple-sessions">
                <description gettext-domain="systemd">Halt the system while other users are logged in</description>
                <message gettext-domain="systemd">Authentication is required for halting the system while other users are logged in.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.halt</annotate>
        </action>

        <action id="org.freedesktop.login1.halt-ignore-inhibit">
                <description gettext-domain="systemd">Halt the system while an application asked to inhibit it</description>
                <message gettext-domain="systemd">Authentication is required for halting the system while an application asked to inhibit it.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.halt</annotate>
        </action>

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

        <action id="org.freedesktop.login1.suspend-multiple-sessions">
                <description gettext-domain="systemd">Suspend the system while other users are logged in</description>
                <message gettext-domain="systemd">Authentication is required for suspending the system while other users are logged in.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.suspend</annotate>
        </action>

        <action id="org.freedesktop.login1.suspend-ignore-inhibit">
                <description gettext-domain="systemd">Suspend the system while an application asked to inhibit it</description>
                <message gettext-domain="systemd">Authentication is required for suspending the system while an application asked to inhibit it.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.suspend</annotate>
        </action>

        <action id="org.freedesktop.login1.hibernate">
                <description gettext-domain="systemd">Hibernate the system</description>
                <message gettext-domain="systemd">Authentication is required for hibernating the system.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.hibernate-multiple-sessions">
                <description gettext-domain="systemd">Hibernate the system while other users are logged in</description>
                <message gettext-domain="systemd">Authentication is required for hibernating the system while other users are logged in.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.hibernate</annotate>
        </action>

        <action id="org.freedesktop.login1.hibernate-ignore-inhibit">
                <description gettext-domain="systemd">Hibernate the system while an application asked to inhibit it</description>
                <message gettext-domain="systemd">Authentication is required for hibernating the system while an application asked to inhibit it.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.hibernate</annotate>
        </action>

        <action id="org.freedesktop.login1.manage">
                <description gettext-domain="systemd">Manage active sessions, users and seats</description>
                <message gettext-domain="systemd">Authentication is required for managing active sessions, users and seats.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.lock-sessions">
                <description gettext-domain="systemd">Lock or unlock active sessions</description>
                <message gettext-domain="systemd">Authentication is required to lock or unlock active sessions.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.set-reboot-to-firmware-setup">
                <description gettext-domain="systemd">Allow indication to the firmware to boot to setup interface</description>
                <message gettext-domain="systemd">Authentication is required to indicate to the firmware to boot to setup interface.</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
        </action>

        <action id="org.freedesktop.login1.set-wall-message">
                <description gettext-domain="systemd">Set a wall message</description>
                <message gettext-domain="systemd">Authentication is required to set a wall message</message>
                <defaults>
                        <allow_any>auth_admin_keep</allow_any>
                        <allow_inactive>auth_admin_keep</allow_inactive>
                        <allow_active>auth_admin_keep</allow_active>
                </defaults>
        </action>

</policyconfig>
So much above my pay grade!
Last edited by Moem on Fri Jan 31, 2020 12:02 pm, edited 1 time in total.
Reason: Swapped the [c] tags out for [code] tags; the code tags put long output in a scrollable box, and retain some helpful formatting.
User avatar
powerwagon75
Level 4
Level 4
Posts: 277
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: No answer to why power manager asking for authentication to suspend

Post by powerwagon75 »

Your logind.suspend section is the same as what I see on five different systems here, with the exception of the one system I previously mentioned that I edited. (btw, it is not recommended to typically edit this file directly as it may get overwritten on a susbsequent update.) There is a way to make local rules, but not sure if its necessary yet, as there may be something else going on, as other machines/OS's work just fine with these settings.

Code: Select all

<action id="org.freedesktop.login1.suspend">
<description gettext-domain="systemd">Suspend the system</description>
<message gettext-domain="systemd">Authentication is required for suspending the system.</message>
<defaults>
<allow_any>auth_admin_keep</allow_any>     <-------------- (all other systems checked work with this setting for suspend)
<allow_inactive>auth_admin_keep</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
In a terminal, can you run systemd-inhibit --list, and respond back/paste the results with the Code </> button above your reply text box?

This will list your active delay and block inhibit events.

Partial example output:
Who: hmlx (UID 1000/hmlx, PID 20537/cinnamon-settin)
What: handle-lid-switch
Why: Multiple displays attached
Mode: block

Who: NetworkManager (UID 0/root, PID 1123/NetworkManager)
What: sleep
Why: NetworkManager needs to turn off networks
Mode: delay
Image
Custom tower w/Mint 18
HP laptop w/Mint 18
Acer w/W10/Mint 18.3
Macbook w/El Capitan/Mint 18.3
Optiplex 960 "Frankenbox" w/Fedora 30/Mint 18.3/Mint 19.2
Acer C720 Chromebook w/GalliumOS
Mac PPC G4 w/Lubuntu
kdlm
Level 1
Level 1
Posts: 41
Joined: Mon Sep 28, 2015 3:37 pm

Re: No answer to why power manager asking for authentication to suspend

Post by kdlm »

That seems like a useful command. It produced:

Code: Select all

kd@kd-Spin-SP513-51:~$ systemd-inhibit --list
     Who: UPower (UID 0/root, PID 1189/upowerd)
    What: sleep
     Why: Pause device polling
    Mode: delay

     Who: Screen Locker (UID 1000/kd, PID 1284/light-locker)
    What: sleep
     Why: Lock the screen on suspend/resume
    Mode: delay

     Who: NetworkManager (UID 0/root, PID 808/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

     Who: xfce4-power-manager (UID 1000/kd, PID 1302/xfce4-power-man)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: xfce4-power-manager handles these events
    Mode: block

     Who: ModemManager (UID 0/root, PID 777/ModemManager)
    What: sleep
     Why: ModemManager needs to reset devices
    Mode: delay

5 inhibitors listed.
I just had my first keyboard sleep failure. I did it again and it went to sleep, but the internet woudn't work until I rebooted after waking up.
User avatar
powerwagon75
Level 4
Level 4
Posts: 277
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: No answer to why power manager asking for authentication to suspend

Post by powerwagon75 »

Hi kdlm,

Hmm..this one seems a little difficult to assist with remotely. Lets try digging up a little more info.

Try suspending a couple times to see if you can get it to cause the authentication to pop up. When it does, enter your password and try to suspend.

After waking it back up, run the following in terminal, and reply each one back in its own code box ( </> button), and see if we can find any clues there.
(NOTE: if you lose your internet capability, still run the commands, and paste them all into separate text files, prior to rebooting, where you can retrieve the data from them to post later after the reboot. )

inxi -Fxz

dmesg | grep ACPI

cat /var/log/kern.log | grep sleep

cat /var/log/kern.log | grep suspend

If we determine nothing conclusive here, I would suggest you could try this in your org.freedesktop.login1.policy file :

<action id="org.freedesktop.login1.suspend">
<description gettext-domain="systemd">Suspend the system</description>
<message gettext-domain="systemd">Authentication is required for suspending the system.</message>
<defaults>
<allow_any>yes</allow_any <-------------- (change it to yes, instead of auth_admin_keep)
<allow_inactive>auth_admin_keep</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>


See if that eliminates the suspend authentication pop-ups. As stated before, editing this file can be done; shouldn't cause any issues. Only thing that might ever happen when writing to the policy directly instead of a local adaption is your change could get overwritten back to the default on an update. Also, mind your fingers over the keyboard when in a large file. Wouldn't want to inject a space or character accidentally. I use <ctl+f> to search for "suspend" to get me close to that area of the file.

As for your internet connectivity issue, is that something new, or has it happened before? The two issues would seem unrelated, unless your (wireless?) driver has a problem--with being put to sleep and woken back up. Also, I should have asked this up front, have you by chance recently performed a kernel update?
Image
Custom tower w/Mint 18
HP laptop w/Mint 18
Acer w/W10/Mint 18.3
Macbook w/El Capitan/Mint 18.3
Optiplex 960 "Frankenbox" w/Fedora 30/Mint 18.3/Mint 19.2
Acer C720 Chromebook w/GalliumOS
Mac PPC G4 w/Lubuntu
bene242
Level 1
Level 1
Posts: 1
Joined: Sun Jul 12, 2020 5:19 am

Re: No answer to why power manager asking for authentication to suspend

Post by bene242 »

Hi kdlm

I have exactly the same problem (Lenovo T440, freshly installed Mint 20 xfce). Did you manage to solve yours?
@powerwagon75: changing the policy (-> yes) did not solve my problems. the output of the commands shows nothing useful.

Best regards Benedikt
Post Reply

Return to “Newbie Questions”