! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
locking issues when lid is closed
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description jorge 2020-04-30 14:57:50 CEST
Hello:

Using Xfce in Gentoo. In power manager settings I have enabled to lock the screen when the lid closes (with ac and battery). 10 seconds or so after unlocking the screen (by reopening the lid) an error message is displayed: "None of the screen locks ran successfully, the screen will not be locked.", even if the screen lock worked correctly. If I issue a screen lock by clicking the lock screen in the "Actions Button",  or even by running the script xflock4 as an user, there is no error after unlocking the screen. 

I am using xfce4-screensaver as the screensaver. Do not have any other screensaver or standalone locker (alock,slock, xlockmore) installed. Also, I'm using systemd. The xfce4-session property "LockCommand" is blank (null string) and systemd is not allowed to handle this request (property login-handle-lid-switch is set to FALSE in xfce4-power-manager), that is, I have all properties to their base value as shipped from Gentoo.

From what I've investigated, the error comes from the source file  xfpm-manager.c. The proposed offending lines are (453-458):

if (!xfce_screensaver_lock (manager->priv->screensaver))
{
    xfce_dialog_show_error (NULL, NULL,
			    _("None of the screen lock tools ran "
			      "successfully, the screen will not "
			      "be locked."));
}

as you can see, this is executed only if the xfce_screensaver_lock method returns FALSE. This method is found on the source file xfce-screensaver.c (also of the power manager app). The important lines (501-525) are:

switch (saver->priv->screensaver_type) {
    case SCREENSAVER_TYPE_FREEDESKTOP:
    case SCREENSAVER_TYPE_MATE:
    case SCREENSAVER_TYPE_GNOME:
    case SCREENSAVER_TYPE_XFCE:
    {
        GVariant *response = NULL;
        response = g_dbus_proxy_call_sync (saver->priv->proxy,
                                           "Lock",
                                           g_variant_new ("()"),
                                           G_DBUS_CALL_FLAGS_NONE,
                                           -1,
                                           NULL,
                                           NULL);
        if (response != NULL)
        {
            g_variant_unref (response);
            return TRUE;
        }
        else
        {
            return FALSE;
        }
        break;
   }

As I'm using the default xfce4-screensaver, the case statement must have landed there. If this method (xfce_screensaver_lock) is returning FALSE, it means that the response was NULL and in turn that the call g_dbus_proxy_call_sync somehow always return NULL in my system. I don't see the variable saver->priv->proxy being declared in this method, so maybe the problem lies around there.
Comment 1 jorge 2020-05-03 01:24:48 CEST
As explained (briefly) in the first sentence, to lock the screen BOTH options (on battery and plugged in) must be "Lock screen". See Bug https://bugzilla.xfce.org/show_bug.cgi?id=16797
Comment 2 jorge 2020-05-05 05:23:32 CEST
Recent upgrades to xfce4 where released in Gentoo. 

xfce4-terminal-0.8.9.1 -> xfce4-terminal-0.8.9.2
xfce4-screensaver-0.1.8 -> xfce4-screensaver-0.1.10
thunar-1.8.12 -> thunar-1.8.14

Although this bug was reported to be a problem in xfce4-power-manager, the error message "None of the screen locks ran successfully, the screen will not be locked." does not appear anymore when the screensaver was changed from version 0.1.8 to 0.1.10 so this issue might be considered closed.
Comment 3 Git Bot editbugs 2020-05-27 01:49:45 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/83.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #16782

Reported by:
jorge
Reported on: 2020-04-30
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
5 users

Version

Attachments

Additional information