! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Disabling the automatic sleep causes data loss
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description bugzilla.xfce.org 2015-04-04 10:53:39 CEST
I have let my laptop run on battery. Sometime the battery runs out, and to protect the system from losing data, it automatically suspends when the battery is low.

Or rather: It is supposed to do that.

These days I instead get an annoying dialog box:

"""Are you sure you want to hibernate the system? An application is currently disabling the automatic sleep. Doing this action now may damage the working state of this application."""

I cannot disable this dialog box for good saying: "I do not care that the Youtube video currently playing is disabling automatic sleep: I want you to suspend when you are low on battery, because if you do not, I will lose serious work."

I have now lost serious work due to this several times.

Please make it possible to protect my work when battery is running out - no matter what program might be running.

And personally I would prefer it disabled completely: When I ask the system to suspend I have yet to find any program where the state is seriously affected.
Comment 1 Wil 2018-09-04 11:15:58 CEST
https://unix.stackexchange.com/questions/448702

When my laptop attempts to suspend itself to avoid powerfail, instead of successfully suspending, I get a popup from xfce4-power-manager: "Are you sure you want to hibernate the system? An application is currently disabling the automatic sleep. Doing this action now may damage the working state of this application."

How do I prevent applications from preventing suspend when battery is low?

$ dbus-send --print-reply --dest=org.freedesktop.PowerManagement /org/freedesktop/PowerManagement/Inhibit org.freedesktop.PowerManagement.Inhibit.GetInhibitors
reveals:

freedesktop/PowerManagement/Inhibit org.freedesktop.PowerManagement.Inhibit.GetInhibitors method return time=1528483300.093042 sender=:1.35 -> destination=:1.96 serial=81 reply_serial=2 array [ string "/usr/lib/chromium-browser/chromium-browser" ]

but sometimes there are others too.

Needless to say this is disastrous to my laptop's state of charge and battery health and results in recoverable filesystem corruption when these apps idiotically force the system to powerfail by prematurely depleting the battery and then preventing the life-saving suspend that would have prevented them losing state.

Ideally some of these applications should still be able to prevent suspend when the system is not low on battery, but I'd like be given an opportunity to permit that behaviour. It should never have been made a default setting that applications can overcome power management settings which are in place to protect the hardware and filesystem consistency!

This error ironically only occurs when running on battery. The system suspends fine 100% of the time when it is plugged in.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: xfce4-power-manager 1.6.1-0ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-22.24-generic 4.15.17
Uname: Linux 4.15.0-22-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Jun 8 12:16:51 2018
ExecutablePath: /usr/bin/xfce4-power-manager
InstallationDate: Installed on 2018-05-08 (31 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
LocalLibraries: /usr/local/lib/libffi.so.6.0.4
ProcEnviron:
 LANGUAGE=en_CA
 PATH=(custom, user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: xfce4-power-manager
UpgradeStatus: No upgrade log present (probably fresh install)
Comment 2 Git Bot editbugs 2020-05-27 01:38:20 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/9.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #11795

Reported by:
bugzilla.xfce.org
Reported on: 2015-04-04
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
4 users

Version

Attachments

Additional information