! 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 !
Regression: No suspend on lid close
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description ToZ editbugs 2014-09-13 13:20:16 CEST
Created attachment 5648 
xfce4-power-manager debug output

Commit 03193df6cad651841e8d9960335b4a3bf13afdad (Fix logic of xfconf logind inhibition keys) has broken suspend on lid close on my laptop.

Xfce Power Manager 1.3.2git-9c737fd (built from git)
Running on Arch Linux

System recognizes lid actions, but no suspend on lid close. Suspending manually or from menu, works. Adding the new "logind-handle-lid-switch" xfconf key and setting it "False" results in double-suspend actions.

Reverting the above commit returns to successful lid close suspend functionality.

Attached is output from running xfce4-power-manager with --debug parameter.
Comment 1 Simon P 2014-09-14 15:50:35 CEST
I too have this, on debian/testing. It seems the change in logic is incomplete. It's fixed for me with this patch to xfpm-manager.c:

--- a/src/xfpm-manager.c
+++ b/src/xfpm-manager.c
@@ -335,7 +335,7 @@
               LOGIND_HANDLE_LID_SWITCH, &logind_handle_lid_switch,
               NULL);
 
-        if (!logind_handle_lid_switch)
+        if (logind_handle_lid_switch)
             return;
     }
Comment 2 Eric Koegel editbugs 2014-09-15 13:46:20 CEST
Created attachment 5649 
Fix handle lid switch

I wish I got bug emails for xfpm. Sorry I missed the bug report prior to release. Somehow I missed it when I looked this morning.

I turned Simon P's change into a patch, can you verify it works ToZ? Thanks for finding what looks like the fix Simon :)
Comment 3 ToZ editbugs 2014-09-16 00:17:28 CEST
I can confirm that this patch fixes the problem.

Eric, if I find anymore power-manager bugs, I'll try to remember to copy you on them.
Comment 4 Eric Koegel editbugs 2014-09-16 18:12:44 CEST
Thanks for testing ToZ. I'll poke Nick about setting up bugzilla to annoy Simon, Harald, and myself (and anyone else interested) when Nick is around again.

Pushed to master in:

commit f62e82256cb2a45b4f044b7d603017952f7dd63e
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Mon Sep 15 14:35:00 2014 +0300

    Fix handle lid switch with loginD (Bug 11160)
    
    The xfconf settings logic for logind interactions were inverted
    in commit: 03193df6cad651841e8d9960335b4a3bf13afdad
    However the handle lid switch in the xfpm_manager_lid_changed_cb
    also needs to be inverted. This patch fixes it. Patch submitted
    by Simon P.
http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=f62e82256cb2a45b4f044b7d603017952f7dd63e

Bug #11160

Reported by:
ToZ
Reported on: 2014-09-13
Last modified on: 2014-09-16

People

Assignee:
Ali Abdallah
CC List:
2 users

Version

Version:
Unspecified

Attachments

xfce4-power-manager debug output (10.59 KB, text/plain)
2014-09-13 13:20 CEST , ToZ
no flags
Fix handle lid switch (997 bytes, patch)
2014-09-15 13:46 CEST , Eric Koegel
no flags

Additional information