You are not logged in.
Pages: 1
Topic closed
edit: was xfce-power-manager performs no action on lid close/open, see from post #2 onward
edit2: was xfce-power-manager does not lock screen on suspend via lid close/open, see post #6
edit3: TL;DR:
Quick fix
$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false
$ pacman -R xscreensaver
Hi, I've been trying to have my screen locked using slock on suspend induced by lid close using xfce's power management but so far I was unsuccessful.
I've disabled systemd power keys handling by setting almost all power-related options to ignore in /etc/systemd/logind.conf and now xfce power manager works in all instances except lid close, which seems to be fully ignored - the screen doesn't even get blanked. The acpi event occurs (checked that with acpi_listen) but there are no events visible in xev (should there be anything?)
I'm unable to produce any useful logs and I don't know what else to do except giving systemd the power control back. But that doesn't work for me either as I want to have my laptop both suspended AND locked when the lid is closed but with systemd I'm forced (among other things) to choose between the two.
What's next to check?
-m.
Last edited by mr.MikyMaus (2017-01-26 11:27:52)
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
Hi, I think this command can be useful for you:
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false
Source: Archwiki
Regards.
Offline
Thanks, I somehow missed that wiki entry though I'd swear I read that page at least twice
Anyway, it only helps a little - now lid close triggers suspend via xfce-power-manager but the screen still doesn't get locked. It is, however, locked when I suspend the laptop via power menu (i.e. clicking the "suspend" icon).
Seems like a bug to me. What do you guys think?
-m.
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
Make sure you also have Settings Manager > Session and Startup > Advanced > "Lock screen before sleep" enabled.
If that doesn't make a difference, can you post back your xfce4-power-manager's current settings:
xfconf-query -c xfce4-power-manager -lv
...as well as the contents of /etc/systemd/logind.conf?
Anf if you want to debug what is happening with xfce4-power-manager, you can first quit the running process:
xfce4-power-manager -q
...and then run it in debug mode:
xfce4-power-manager --no-daemon --debug
Offline
thanks toz:
Make sure you also have Settings Manager > Session and Startup > Advanced > "Lock screen before sleep" enabled.
It's enabled.
xfconf-query -c xfce4-power-manager -lv
...as well as the contents of /etc/systemd/logind.conf?
miky@getn ~ % xfconf-query -c xfce4-power-manager -lv
/xfce4-power-manager/blank-on-ac 0
/xfce4-power-manager/blank-on-battery 5
/xfce4-power-manager/brightness-level-on-ac 84
/xfce4-power-manager/brightness-on-battery 60
/xfce4-power-manager/brightness-switch 0
/xfce4-power-manager/brightness-switch-restore-on-exit 1
/xfce4-power-manager/critical-power-action 3
/xfce4-power-manager/critical-power-level 5
/xfce4-power-manager/dpms-enabled true
/xfce4-power-manager/dpms-on-ac-off 0
/xfce4-power-manager/dpms-on-ac-sleep 0
/xfce4-power-manager/dpms-on-battery-off 15
/xfce4-power-manager/dpms-on-battery-sleep 10
/xfce4-power-manager/general-notification true
/xfce4-power-manager/handle-brightness-keys true
/xfce4-power-manager/hibernate-button-action 3
/xfce4-power-manager/inactivity-on-battery 20
/xfce4-power-manager/inactivity-sleep-mode-on-battery 1
/xfce4-power-manager/lid-action-on-ac 3
/xfce4-power-manager/lid-action-on-battery 1
/xfce4-power-manager/lock-screen-suspend-hibernate true
/xfce4-power-manager/logind-handle-lid-switch false
/xfce4-power-manager/power-button-action 3
/xfce4-power-manager/presentation-mode true
/xfce4-power-manager/show-tray-icon 1
/xfce4-power-manager/sleep-button-action 3
miky@getn ~ % cat /etc/systemd/logind.conf
(... header removed ...)
[Login]
#NAutoVTs=6
#ReserveVT=6
KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
HandleSuspendKey=ignore
#HandleHibernateKey=hibernate
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=12288
Anf if you want to debug what is happening with xfce4-power-manager ...
( ... this apparently happens after lid is closed ... )
TRACE[xfpm-manager.c:440] xfpm_manager_lid_changed_cb(): LID close event: ((XfpmLidTriggerAction) LID_TRIGGER_SUSPEND)
** (xfce4-power-manager:23989): WARNING **: No outputs have backlight property
( ... this happens about one second after the lid is opened and laptop resumed from suspend ...)
xscreensaver-command: no screensaver is running on display :0.0
TRACE[xfpm-manager.c:473] xfpm_manager_lid_changed_cb(): LID opened: ((XfpmLidTriggerAction) LID_TRIGGER_SUSPEND)
TRACE[xfpm-dpms.c:284] xfpm_dpms_force_level(): start
TRACE[xfpm-dpms.c:297] xfpm_dpms_force_level(): DPMS is disabled
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:448] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:448] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:448] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:448] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:448] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:448] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/DisplayDevice
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[xfpm-manager.c:723] xfpm_manager_tray_update_icon(): updating icon
TRACE[xfpm-manager.c:707] xfpm_manager_tray_update_tooltip(): updating tooltip
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:448] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/DisplayDevice
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[xfpm-manager.c:723] xfpm_manager_tray_update_icon(): updating icon
TRACE[xfpm-manager.c:707] xfpm_manager_tray_update_tooltip(): updating tooltip
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:448] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/DisplayDevice
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[xfpm-manager.c:723] xfpm_manager_tray_update_icon(): updating icon
TRACE[xfpm-manager.c:707] xfpm_manager_tray_update_tooltip(): updating tooltip
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:448] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/DisplayDevice
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 12, upower_icon battery-full-symbolic
TRACE[xfpm-manager.c:723] xfpm_manager_tray_update_icon(): updating icon
TRACE[xfpm-manager.c:707] xfpm_manager_tray_update_tooltip(): updating tooltip
Apparently power manager tries to communicate with xscreensaver, presumably to use it as a screen locker. I was under the impression that power manager (and other XFCE tools) use `xflock4` which support `slock` which I use for screen locking.
I don't use xscreensaver but I started it to see if it makes a difference. It did, about a second to resume `xscreensaver` is started in lock mode. The problem is that the desktop is fully visible and operable during that second. It appears the xscreensaver method is somehow hardcoded to lid suspend handling in xfce power manager. Still seems like a bug to me.
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
The problem is that the desktop is fully visible and operable during that second.
To fix this issue, uncheck "Fade to black when blanking" on the Advanced tab in the xscreensaver preferences screen.
Apparently power manager tries to communicate with xscreensaver, presumably to use it as a screen locker. I was under the impression that power manager (and other XFCE tools) use `xflock4` which support `slock` which I use for screen locking.
If you look at the contents of the xflock4 script, you'll see that it will use xscreensaver or gnome-screensaver if their executables are installed. Otherwise, it will use xlock or slock. If you want to use slock, you will need to uninstall the other packages.
Offline
You're right, removing xscreensaver helped!
I completely forgot I even had it installed before.
Thanks all, now it works. It's quirky but it works.
-m.
Last edited by mr.MikyMaus (2017-01-26 11:29:12)
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
I have the same issue, but none of the fixes work for me.
I can configure the power manager to either lock the screeen or suspend, but not lock and suspend.
I currently use xflock4 -> cinnamon-lock with this fix. xflock4 works fine, suspending from the action button does in fact suspend&lock.
I have no xscreensaver installed.
Offline
I use a systemd sleep-hook now, seems to work satisfactory.
Offline
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
Pages: 1
Topic closed