Ever since I updated using packages recently (less than a week ago), I notice that my laptop doesn’t sleep anymore when my external monitor is connected. I’ve checked power management settings and nothing seems to be the problem. I set laptop lid close and power button press to suspend. I have to unplug my the HDMI cord in order for it to suspend properly. Is there a way to fix this? I’m wondering if one of the packages that got updated changed the functionality?
Welcome to the Manjaro Community!
Some settings get changed during the update process; it should (hopefully) be a simple process of going through those and putting them back as you desire; e.g. settings for what the machine does with a lid close event when an external monitor is connected. This is available in Plasma; don’t know about Xfce.
I exclusively use Plasma as my daily driver but I do know there have also been changes in Xfce settings particularly with 4.20, which may be affecting display blanking etc. and my only Xfce installation is with Linux Mint.
Welcome,
I have done all the necessary changes to xfce4-screensaver-preferences
,
configured /etc/systemd/logind.conf
and sleep.conf
, to try to adress the changes
made in systemd and xfce 4.20, but it didn’t work.
logind.conf
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
sleep.conf
[Sleep]
AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#MemorySleepMode=
#HibernateDelaySec=
#HibernateOnACPower=yes
#SuspendEstimationSec=60min
Workaround;
Open the xfce4-settings-editor,
go to section xfce4-power-manager,
change logind-handle-lid-switch
from false to true.
Changes are adopted immediately, the session will be locked, you can try out, just close the lid.
This will (at least on my system) result in a warning message in xfce4-screensaver-preferences
GUI.
If you tick the solve button, you will undo the workaround.
Hopefully this will also work for you.
Thanks for the reply! Unfortunately, logind-handle-lid-switch
isn’t listed as an option in the settings editor.
Yeah, I checked here and it’s not listed. In fact, a couple options you have listed aren’t here for me. Unfortunately, I’m not able to embed images in posts so I can’t show you.
Please show
/etc/systemd/logind.conf
/etc/systemd/sleep.conf
cat /etc/systemd/sleep.conf
[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#MemorySleepMode=
#HibernateDelaySec=
#HibernateOnACPower=yes
#SuspendEstimationSec=60min
cat /etc/systemd/logind.conf
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#SleepOperation=suspend-then-hibernate suspend
#HandlePowerKey=poweroff
#HandlePowerKeyLongPress=ignore
#HandleRebootKey=reboot
#HandleRebootKeyLongPress=poweroff
#HandleSuspendKey=suspend
#HandleSuspendKeyLongPress=hibernate
#HandleHibernateKey=hibernate
#HandleHibernateKeyLongPress=ignore
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
#HandleSecureAttentionKey=secure-attention-key
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=no
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#StopIdleSessionSec=infinity
#DesignatedMaintenanceTime=
try
AllowSuspend=yes
…and so on, one after the other (see my examples).
Changing these might also make changes to your xfce4-settings-editor
.
Further you have the option to create a logind.conf.d
and a sleep.conf.d
for configuration, without touching the original files.