Bug 362542 - Inhibit suspend when a file transfer is in progress
Summary: Inhibit suspend when a file transfer is in progress
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: HI wishlist
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords: usability
: 466704 478785 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-01 12:11 UTC by adr.fantini
Modified: 2025-05-14 15:43 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.15
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adr.fantini 2016-05-01 12:11:41 UTC
Powerdevil should inhibit any suspend / hibernate action when a file transfer (at least a Dolphin file transfer) is in progress.

Reproducible: Always
Comment 1 Kai Uwe Broulik 2016-05-01 12:35:16 UTC
It's the application's job (or in this case KIO) to request that from PowerDevil, re-assigning to KIO.
Comment 2 David Faure 2016-05-02 06:57:24 UTC
But how? KIO can't depend on powerdevil (which is in workspace).
Comment 3 Kai Uwe Broulik 2016-05-02 07:02:51 UTC
It just needs to send a DBus message to PowerDevil (and as a fallback to the FDO interface). Also, if... this [1] lands there'll be a Tier 1(?) solution for that.

[1] https://git.reviewboard.kde.org/r/126650/
Comment 4 Patrick Silva 2019-03-01 20:10:11 UTC
The problem persists. Computer sleeps while dolphin copies data to another internal partition. When computer resumes, copy process continues from the point where it stopped.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 5 Nate Graham 2023-12-21 21:30:30 UTC
*** Bug 478785 has been marked as a duplicate of this bug. ***
Comment 6 Prajna Sariputra 2024-01-25 16:33:46 UTC
*** Bug 466704 has been marked as a duplicate of this bug. ***
Comment 7 Luis 2025-04-19 18:33:09 UTC
I just went through this...
Comment 8 Bug Janitor Service 2025-04-20 10:51:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1868
Comment 9 Kai Uwe Broulik 2025-05-04 10:17:10 UTC
Git commit 60191c0473a96c41279519845030efa12fdd0bb4 by Kai Uwe Broulik.
Committed on 04/05/2025 at 09:29.
Pushed by broulik into branch 'master'.

CopyJob: Inhibit suspend during copy operation

Avoids the system going to sleep during a lengthy copy operation.

M  +21   -0    src/core/copyjob.cpp

https://invent.kde.org/frameworks/kio/-/commit/60191c0473a96c41279519845030efa12fdd0bb4
Comment 10 John 2025-05-10 14:41:17 UTC
Why is this fixed only for the copy operation?
Shouldn't be fixed also for the move operation?
Which is actually even more dangerous than the copy operation!
As with a broken copy you can just delete all the already copied folders and files in the destination ans start over the copy.
But with an interrupted move operation, it's hard to know what has already been moved and what happens when you try to move again the remaining items.

Another thing, can't this also be extended to inhibit the suspend for the archive / unarchive operations too?
Comment 11 postix 2025-05-10 14:44:17 UTC
John, that's just the terminology. If you look at the commit: 
https://invent.kde.org/frameworks/kio/-/commit/60191c0473a96c41279519845030efa12fdd0bb4#a255943687657ca8eb60300f623327855b34bd67_739_752
it covers also move transfers.
Comment 12 Roke Julian Lockhart Beedell 2025-05-10 14:52:51 UTC
(In reply to postix from comment #11)

> it covers also move transfers.

As someone who can't necessarily parse CPP well, does it also include (un)archival, like John mentions?

> can't this also be extended to inhibit the suspend for the archive / unarchive operations too?

I ask because I've NVMe drives, so intra and inter-drive transferral never takes much time, but my CPU can't unarchive > 3 GiB Tape Archive files particularly quickly. That's when I'd use this.
Comment 13 postix 2025-05-14 15:21:36 UTC
> As someone who can't necessarily parse CPP well, does it also include (un)archival, like John mentions?

Please see https://blog.broulik.de/2025/05/kio-goodies/#comment-214149
> Unfortunately it does not. The infrastructure (and corresponding job API) is private to KIO right now.
> That’s a good point, though, and might justify making this feature available to all of KJob.