backintime icon indicating copy to clipboard operation
backintime copied to clipboard

Suspend is not inhibited for root backup/restore jobs

Open Schroedingers-Cat opened this issue 9 years ago • 13 comments

It would make sense to have an option preventing Linux from entering suspend during backup creation and recovery. ATM, Ubuntu 16.04 suspend timer needs to be disabled for BIT to finish its tasks.

Schroedingers-Cat avatar Jul 20 '16 19:07 Schroedingers-Cat

Thats already implemented since version 1.1.0

Germar avatar Jul 20 '16 20:07 Germar

I'm using v1.1.12 on Ubuntu 16.04 and it doesn't work.

Is this an option I have to activate first? I checked the options menu twice before posting here.

Schroedingers-Cat avatar Jul 20 '16 22:07 Schroedingers-Cat

It's default. No option for this.

BTW great thumbnail

Germar avatar Jul 21 '16 00:07 Germar

Thanks :)

Tell me, if you need more info to reproduce/fix this bug.

Schroedingers-Cat avatar Jul 21 '16 15:07 Schroedingers-Cat

I just need to fix suspend/hibernate itself on my own machine to reproduce this :see_no_evil:

Germar avatar Jul 21 '16 16:07 Germar

Okay, I fixed suspend on my machine but I'm still not able to reproduce the bug here.

Please run backintime backup --debug from terminal and post the output here. There should be these lines:

INFO: [common/tools.py:1121 inhibitSuspend] Inhibit Suspend started. Reason: take snapshot
...
INFO: [common/tools.py:1141 unInhibitSuspend] Release inhibit Suspend

Between these both lines suspend should be inhibited.

Germar avatar Jul 25 '16 21:07 Germar

I think that is the reason:

DEBUG: [common/tools.py:808 inhibitSuspend] Inhibit Suspend failed because BIT was started as root.

Schroedingers-Cat avatar Jul 26 '16 13:07 Schroedingers-Cat

Ah, okay. I didn't found a way to inhibit suspend with root, yet. The normal method is using DBus SessionBus. But root has no SessionBus.

Germar avatar Jul 26 '16 16:07 Germar

Maybe you could somehow tunnel that command into a standard user?

Schroedingers-Cat avatar Jul 26 '16 17:07 Schroedingers-Cat

That would get quite ugly. There must be an other way. I just have to search for it... :wink:

Germar avatar Jul 26 '16 17:07 Germar

This suspend/inhibit feature was discussed on several Issues. Might we think about to just remove it (with long running deprecation warning) from BIT? Is BIT responsible for that?

buhtz avatar Jan 09 '24 09:01 buhtz

This suspend/inhibit feature was discussed on several Issues. Might we think about to just remove it (with long running deprecation warning) from BIT? Is BIT responsible for that?

We are using a dbus call to block suspend and this does not work as root (just had a fix for an issue where dbus call hang forever as root: https://github.com/bit-team/backintime/issues/1592#issuecomment-1871524882).

I suggest to close this and pursue #714 (see my FR description there).

aryoda avatar Jan 09 '24 09:01 aryoda

Something is definitely wonky with this feature, as documented in #1090 (which may be a duplicateof #714). It's one of the most annoying things in my own daily usage of BiT.

emtiu avatar Jan 09 '24 09:01 emtiu