Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-06-13 06:13:30

d9d6ka
Member
Registered: 2021-06-13
Posts: 2

Customizing suspend/hibernate.

Hi! I'm using a non-systemd distro (Void Linux).
When I try to hibernate my PC via logout dialog it just goes to sleep, PC is still on.
Void Linux built-in command ZZZ (inherited from OpenBSD I think) works as expected forcing system to hibernate and switching the PC off.

Is there any ability to make XFCE's hibernate option work as expected? Or call ZZZ when Hibernate option is selected in logout dialog? Thanks!

Offline

#2 2021-06-13 13:52:25

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,860

Re: Customizing suspend/hibernate.

Hello and welcome.

Unfortunately, it is hard coded. However, they may be a way to fool it to run ZZZ during a hibernate event.

https://git.xfce.org/xfce/xfce4-session … own.c#n317
In the xfsm_shutdown_try_hibernate() function, it first tries systemd hibernate, then consolekit hibernate then a fallback option. You've stated that void linux doesn't come with systemd, it probably doesn't use consolekit, so it would use the fallback option.

https://git.xfce.org/xfce/xfce4-session … ack.c#n359
In the xfsm_shutdown_fallback_try_action() function, for the hibernate case it references the UP_BACKEND_HIBERNATE_COMMAND variable.

https://git.xfce.org/xfce/xfce4-session … n-common.h
The UP_BACKEND_HIBERNATE_COMMAND for Linux systems is set to "/usr/sbin/pm-hibernate"

So you could try to replace the pm-hibernate command with an executable shell script that would run the ZZZ command or directly link the ZZZ command to pm-hibernate.

Not sure if it will work, but might be worth a try.

Offline

#3 2021-06-14 04:14:21

d9d6ka
Member
Registered: 2021-06-13
Posts: 2

Re: Customizing suspend/hibernate.

Thanks for your reply!

The problem turned out to be much more simple. The problem was in confusing Russian localization: the original English entry of "Hibernate" was translated in Russian as "Sleep mode" (I've translated meaning in English for your convenience), and original "Hybrid Sleep" was translated as "Hibernate".

Taking this into account everything works as expected.

Sorry for wasting your time!

Offline

Board footer

Powered by FluxBB