Bug 473575 - Avoid sleep while flushing cache to removable drive
Summary: Avoid sleep while flushing cache to removable drive
Status: REPORTED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.109.0
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-20 19:44 UTC by frankgrimy
Modified: 2024-05-10 19:08 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description frankgrimy 2023-08-20 19:44:37 UTC
Today I was copying an ISO image to a Ventoy-enabled USB drive (exfat).
It seems that the file transfer was cached by default, so the file transfer dialog was closed after the file was cached.
After clicking the secure-remove button, Plasma showed me the message to not unplug the device until the flush was done.

After 10 minutes (by setting) my computer went to sleep, and after resuming the flush message was still showing. It would mean that the flush might not finish prior to sleep.

It would be nice to have a feature to disable sleep while a cached file transfer is still being done since file corruption might happen.

STEPS TO REPRODUCE
1. Transfer a file to a device with write cache enabled.
2. Wait for the computer to sleep (make sure to set an appropriate time threshold so the sleep can occur while the flush is still going).
3. Resume the computer and check the flush dialog and/or file corruption.

OBSERVED RESULT
The computer goes to sleep but after resuming, the cache flush is still ongoing.

EXPECTED RESULT
The computer goes to sleep only after the cache flush has ended.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux, 6.4.11-arch2-1
(available in About System)
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Running on Wayland
Comment 1 Nate Graham 2023-08-22 21:14:40 UTC
Hmm, Bug 454363 says the opposite thing happens: that sleep is inhibited and you don't know why.