Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-05-14 10:00:50

mikim
Member
Registered: 2025-05-14
Posts: 3
AndroidChrome 136.0

Which script is run on low battery hibernation

I have run to an issue related to a specific laptop model (proved by other users with the same device), that when hibernating on the recent arch kernels, the system hibernates to swap succesfully, but it doesn't turn off completely and has to be terminated with the push power button.

However, when the xfce power manager is set to hibernate when the battery discharges to certain threshold, it hibernates and shuts down afterwards without any issue. I am curious about what the procedure is when triggering low battery hibernation, because the basic `systemctl hibernate` does not shut down the laptop after hibernation. I've been looking to udev for a bit, as I think it may be related to the triggering by battery state, but with no luck yet.

Can anybody tell where I can trace the hibernating procedure?

Offline

#2 2025-05-14 14:59:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,012
LinuxFirefox 138.0

Re: Which script is run on low battery hibernation

Try:

pkexec /usr/sbin/xfce4-pm-helper --hibernate

You can try running xfce4-power-manager in debug mode:

xfce4-power-manager -q
xfce4-power-manager --no-daemon --debug

...to see what it says about the actual command that is being run.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-05-16 06:20:49

mikim
Member
Registered: 2025-05-14
Posts: 3
AndroidChrome 136.0

Re: Which script is run on low battery hibernation

ToZ wrote:

Try:

pkexec /usr/sbin/xfce4-pm-helper --hibernate

I am really wandering if this could do the trick, but running the command with either --hibernate or --suspend only finishes with error (no output) and does nothing.

Offline

#4 2025-05-16 10:19:28

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,012
LinuxFirefox 138.0

Re: Which script is run on low battery hibernation

only finishes with error (no output)

Can you post the actual error message?

Can you also post the debug output when a hibernate event happens?

Edit: Try dbus-send:

dbus-send --session --print-reply --dest="org.xfce.PowerManager" /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Hibernate

Last edited by ToZ (2025-05-16 10:36:53)


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-05-16 14:22:06

mikim
Member
Registered: 2025-05-14
Posts: 3
AndroidChrome 136.0

Re: Which script is run on low battery hibernation

Can you post the actual error message?

There is no error message. Just my p10k prints red cross, as if there was an error. And nothing else happens. No output from the command.

Edit: Try dbus-send:

dbus-send --session --print-reply --dest="org.xfce.PowerManager" /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Hibernate

This acts as `systemctl hibernate` - it does't shut down the laptop after hibernation.

Offline

#6 2025-05-16 14:54:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,012
LinuxFirefox 138.0

Re: Which script is run on low battery hibernation

Can you also post the debug output when a hibernate event happens?


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.015 seconds, 8 queries executed - Memory usage: 546.88 KiB (Peak: 547.73 KiB) ]