! 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 !
Screen is not locked on wake after suspend to ram
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Eric Toombs 2015-11-16 09:38:28 CET
I have asked the power manager to lock the screen when suspending to ram, but it doesn't. This has happened on every computer I have tried it on.

Incidentally, I run archlinux and I have tried it on 32- and 64-bit computers.
Comment 1 Federico G. Schwindt 2015-11-24 06:24:52 CET
I was going to open a bug but I will just add to this.
In my case doing this fixes the issue:

    xfconf-query -c xfce4-power-manager  -p /xfce4-power-manager/logind-handle-lid-switch -s false

I'm not using lightdm.

Can you share your details before I add more info to this bug?
Comment 2 Eric Toombs 2015-11-25 21:05:51 CET
(In reply to Federico G. Schwindt from comment #1)
> In my case doing this fixes the issue:
> 
>     xfconf-query -c xfce4-power-manager  -p
> /xfce4-power-manager/logind-handle-lid-switch -s false
This has had no effect.
> Can you share your details before I add more info to this bug?
My dm is slim, though I have tried startx as well, with the same results. All logind settings are set to their defaults. That is if xfce4 hadn't started, logind would be handling lid and button events and executing the various default actions. I have also tried disabling logind's lid and button handling. This has had no effect.
Comment 3 Eric Toombs 2015-11-25 21:17:43 CET
As a temporary workaround, I have done the following:
xfce4-session-logout --suspend; slock
Replace slock with whatever screen-locking solution you use. This works from sh-like shells. It can be mapped to a global keyboard shortcut like Fn-sleep or given an alias in the shell.

Hibernation is basically the same:
xfce4-session-logout --hibernate; slock

I can't understand why the power manager can't just do this by itself!
Comment 4 Federico G. Schwindt 2015-11-27 13:31:14 CET
I'm also using xfce with slim and works fine in my case after setting the property I mentioned to false.

Can you share the output for these 2 commands?

xfconf-query -c xfce4-power-manager  -l -v
xfconf-query -c xfce4-session  -l -v
Comment 5 Eric Toombs 2015-11-30 22:56:46 CET
[eric@lazarus ~]% xfconf-query -c xfce4-power-manager  -l -v
/xfce4-power-manager/brightness-level-on-battery        1
/xfce4-power-manager/brightness-on-battery              17
/xfce4-power-manager/brightness-switch                  0
/xfce4-power-manager/brightness-switch-restore-on-exit  0
/xfce4-power-manager/critical-power-action              1
/xfce4-power-manager/lid-action-on-ac                   0
/xfce4-power-manager/lid-action-on-battery              0
/xfce4-power-manager/logind-handle-lid-switch           false
/xfce4-power-manager/show-tray-icon                     1
[eric@lazarus ~]% xfconf-query -c xfce4-session  -l -v
/general/FailsafeSessionName          Failsafe
/general/SaveOnExit                   false
/general/SessionName                  Default
/sessions/Failsafe/Client0_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client0_PerScreen  false
/sessions/Failsafe/Client1_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client1_PerScreen  false
/sessions/Failsafe/Client2_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client2_PerScreen  false
/sessions/Failsafe/Client3_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client3_PerScreen  false
/sessions/Failsafe/Client4_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client4_PerScreen  false
/sessions/Failsafe/Count              5
/sessions/Failsafe/IsFailsafe         true
/splash/Engine                        
[eric@lazarus ~]%
Comment 6 Simon Steinbeiss editbugs 2016-01-26 22:47:19 CET
Sorry for the late reply, but what happens if you call "xflock4"? Does it lock your session as expected? Theoretically it should support slock and xfce4-power-manager uses this script (usually residing in /usr/bin) to lock your session.
Comment 7 Federico G. Schwindt 2016-01-26 23:01:14 CET
@Eric:

I also forgot about this.

Judging by the xfconf-query output, it doesn't look like you have instructed xfce to lock the screen at all.

Have you set up the respective settings under power manager?
Comment 8 Eric Toombs 2016-01-28 04:34:48 CET
I just doublechecked the Power Manager settings, and "Lock screen when system is going for sleep" is indeed checked. When I call xflock4, the screen does lock.
Comment 9 Simon Steinbeiss editbugs 2016-01-28 22:57:23 CET
The line I don't see in your xfce4-session output is this:

/shutdown/LockScreen                  true

What versions of xfce4-session and xfce4-power-manager are you using exactly? Thing is, at some point this setting was handled by both the power-manager and the session, which seemed like an unnecessary and confusing duplication, so we made the xfce4-session-settings dialog handle it and the "lock screen on suspend" checkbox should only show up in xfce4-power-manager when used without xfce4-session.
Comment 10 Eric Toombs 2016-02-02 09:22:26 CET
Name            : xfce4-power-manager
Version         : 1.4.4-1

Name            : xfce4-session
Version         : 4.12.1-3

This is on x86-64 archlinux with slim as a DM. XFCE is started with "exec startxfce4" in ~/.xinitrc. I found the setting in the power manager settings. Looks like it should never have appeared there, though. I found the second setting you mentioned in the "Session and Startup" UI under "Advanced". It works just fine. So, yay? I have a workaround now. Thanks!

The problem remains, but it looks like the problem *really* is that "lock screen" appears in the power manager settings when it shouldn't.
Comment 11 Git Bot editbugs 2020-05-27 01:38:54 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/12.

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 #12316

Reported by:
Eric Toombs
Reported on: 2015-11-16
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
5 users

Version

Attachments

Additional information