Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] [SOLVED] systemd.conf handlelidswitch=lock is not working  (Read 3573 times)

Offline vilde

  • User
  • Posts: 708
[EN] [SOLVED] systemd.conf handlelidswitch=lock is not working
« on: 2016/05/12, 15:27:52 »
I want my laptop (Thinkpad T420) to lock screen when I close the lid. But it's not working, the screen will not lock. XFCE 64 bit.

logind.conf looks like this:
Code: [Select]
#  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.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=lock
HandleLidSwitchDocked=lock
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#UserTasksMax=12288
« Last Edit: 2016/05/17, 16:09:43 by vilde »

Offline hendrikL

  • Administrator
  • User
  • *****
  • Gravatar
  • Posts: 945
Re: systemd.conf handlelidswitch=lock is not working
« Reply #1 on: 2016/05/13, 10:18:30 »
hi, did you configure the settings via the xfce systemsettings?
I think, maybe i am wrong, but if you are in multiuser level (init 3), than it will work with your settings.
To get it work in X, iirc, you need to set it up via the xfce systemsettings or use
"xfce4-power-manager-settings" dialog.

greetz

Offline vilde

  • User
  • Posts: 708
Re: systemd.conf handlelidswitch=lock is not working
« Reply #2 on: 2016/05/13, 23:44:12 »
hi, did you configure the settings via the xfce systemsettings?
I think, maybe i am wrong, but if you are in multiuser level (init 3), than it will work with your settings.
To get it work in X, iirc, you need to set it up via the xfce systemsettings or use
"xfce4-power-manager-settings" dialog.

greetz
Xfce power manager is also set to lock screen, doesn't work anyway

Offline hendrikL

  • Administrator
  • User
  • *****
  • Gravatar
  • Posts: 945
Re: systemd.conf handlelidswitch=lock is not working
« Reply #3 on: 2016/05/17, 08:09:33 »
What’s happen when you press the "lock screen" button?

I tested it and it doesn’t worked for me, also if i closed the lid the screen wasn't locked.
So i installed xscreensaver and now it works.
Maybe "xss-lock" is a good alternative too and to prefer, but i never tested it.

greetings

Offline vilde

  • User
  • Posts: 708
Re: systemd.conf handlelidswitch=lock is not working
« Reply #4 on: 2016/05/17, 16:08:31 »
What’s happen when you press the "lock screen" button?

I tested it and it doesn’t worked for me, also if i closed the lid the screen wasn't locked.
So i installed xscreensaver and now it works.
Maybe "xss-lock" is a good alternative too and to prefer, but i never tested it.

greetings

Nothing happens ehen I press the lock screen button, I did install xcreensaver and without any adjustments the screen locks when I close the lid.
I have no idea why systemd is not handling this as it shall but it doesn't matter no, for me the goal is reached and I consider this as solved now.
Thanks hendrikL :)