Bug 281270 - When copying files to a removable disk, speed and progress reflect copying to the local cache not to the disk itself
Summary: When copying files to a removable disk, speed and progress reflect copying to...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: VHI critical
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
: 326744 335851 361224 383995 416248 416783 442536 443126 457959 489924 497286 500917 518325 521159 527419 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-03 14:01 UTC by Alexander
Modified: 2026-10-29 01:35 UTC (History)
79 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.32
Sentry Crash Report:


Attachments
video example (752.94 KB, video/mp4)
2022-03-15 07:34 UTC, MarcSerra
Details
It fails to recognize that the transfer is completed. (3.86 MB, video/x-matroska)
2025-01-09 20:14 UTC, Fernando Marcelino Muniz
Details
Reaching 100% completion doesn't mean it's 100% completed. (125.35 KB, image/png)
2025-01-09 20:15 UTC, Fernando Marcelino Muniz
Details
Issue on Dolphin 25.12.1 (1016.27 KB, video/mp4)
2026-01-26 03:58 UTC, Fernando Marcelino Muniz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2011-09-03 14:01:13 UTC
Version:           4.7 (using KDE 4.7.0) 
OS:                Linux

All going fine when I copy files from my USB device and the problem occurs only when I copy files TO it. The KDE's notification shows that copying speed is about 50Mb/s (yes, namely megabytes), so it is about 400 megabits per second and it is too fast for a full-speed USB device (12MB/s is maximum for USB 1.1).

Alan Stern, one of the kernel developers, described to me what actually happens. The problem is in that actually it show the speed with which files are copied into the RAM (it could be even faster if the HDD allow it), therefore it shows that the copying operation is finished when it has not even been started. Also when target files are too small the "operation progress" popup will not appears at all.

Reproducible: Always

Steps to Reproduce:
Plug in any USB device and try to send any files to it.

Actual Results:  
The operation progress show the progress but for the wrong operation. It also doesn't give me a possibility to pause/cancel the operation.

Expected Results:  
The operation progress notification should display actual data transfer progress and should also allow to user to pause/stop the operation.

https://bugzilla.kernel.org/show_bug.cgi?id=41472#c7
> Yes, the information displayed in the progress window is off. This really
> isn't a kernel problem so much as a problem in KDE.
Comment 1 Christoph Feck 2011-09-05 01:46:17 UTC
> therefore it shows that the copying operation is finished when it has not even been started

Do kernel developers also know a POSIX interface way to tell us when and how fast this buffered data is actually written to the disk, without causing massive slow downs that any "sync" type calls would cause?
Comment 2 Alexander 2011-09-06 09:45:04 UTC
This is sad, but seems that they do not know how to do it without sync :-( But if you agree that the progress information is wrong and there is no way to implement it correctly, we probably should send a feature request/bug report to kernel devs? How you think, should we? Actually, this is weird to have such problems after 20 years of development :)
Comment 3 Alexander 2011-09-19 15:57:54 UTC
Hello.
Sorry, forgot to post this earlier. I got next mail from Alan:
"Bugzilla is currently down, so I have to send this reply by regular 
email.

On Mon, 5 Sep 2011 bugzilla-daemon@bugzilla.kernel.org wrote:
>...

I did some asking around, and people said to look at the
sync_file_range(2) system call (see also fsync and fdatasync).  It's
not a POSIX interface but it should solve the KDE problem.

Alan Stern"

Could it be useful?
Comment 4 Christoph Feck 2011-09-24 11:55:58 UTC
I haven't checked if it degrades performance, but looking from the description, it looks like it would be exactly what we need. Thanks for the pointer!
Comment 5 Alexander 2011-12-03 23:20:36 UTC
Sorry for noise, but is there any progress with this? I working with the different usb drives all the time and this issue makes me crazy. I trying to detect the operation progress using htop, orienting by I/O indication...
Comment 6 Alassane 2013-10-17 00:49:01 UTC
I have this issue with the latest stable release. When I transfer fairly large files, the plasma notification report that 100% have been transferred well before the actual transfer is complete.

KDE 4.11.2 with OpenSuse packages.
Comment 7 Rune Jensen 2013-10-27 13:10:09 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Christoph Feck 2014-06-06 00:29:06 UTC
*** Bug 335851 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2016-04-05 01:31:09 UTC
*** Bug 361224 has been marked as a duplicate of this bug. ***
Comment 10 dexy 2016-04-05 02:57:08 UTC
On 05/04/16 13:31, Christoph Feck via KDE Bugzilla wrote:
> https://bugs.kde.org/show_bug.cgi?id=281270
>
> Christoph Feck <cfeck@kde.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |dexy@xtra.co.nz
>
> --- Comment #9 from Christoph Feck <cfeck@kde.org> ---
> *** Bug 361224 has been marked as a duplicate of this bug. ***
>
HI Christoph

    From this I take it the KIO team has assumed the task, and it's 
still in progress?

    The companion email has it marked as resolved in the Dolpin stream.

Cheers
Dex (Fester :) )
Comment 11 Christoph Feck 2016-04-06 22:26:10 UTC
> still in progress?

No, work has not started yet (if it is, the bug gets status ASSIGNED).
Comment 12 Christoph Feck 2017-09-17 17:04:38 UTC
*** Bug 383995 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2018-05-08 17:31:55 UTC
Is this still applicable with KDE Frameworks 5.45?
Comment 14 CnZhx 2018-05-08 19:13:45 UTC
I am using openSUSE Tumbleweed with KDE Frameworks 5.25.0 now. This problem seems still there.

I just copied a 800MB file to a Kingston USB drive that has usually 10+MB/s write-in capacity. The copying progress is showing for about several seconds at a speed of around 100MB/s. After this, the Notifier said the copy finished. But when I tried to reject the USB drive, it took about 2 minutes for removing. Then, the Notifier said the device can be removed then.
Comment 15 CnZhx 2018-05-08 19:14:24 UTC
Sorry, it is 5.45.0 instead of 5.25.0.
Comment 16 Nate Graham 2018-05-08 19:22:02 UTC
Thanks for confirming!
Comment 17 dexy 2018-05-08 19:43:59 UTC
Hi Nate.

Firstly, how deep is your 'to-do' queue? I asked this years ago, several 
OS upgrades ago.
Secondly, how can I tell which KDE Frameworks? I'm a user not a 
programmer. I'm running a fully-upgraded Kubuntu 18.04 amd64 now, and 
it's still this way - has been since seemingly year dot, certainly 
14.04,last LTS.
Thirdly, I'm also running a Raspberry Pi, and that's got the same 
'gotcha'. Is this a Deeeep-OS 'feature' of Debian? or Linux itself? Not 
closing off a file on completion of a transfer?  I transfer to a USB 
stick or external disk and after 'completion' go have a cuppa before the 
LED stops flashing.

Cheers
Dex

On 09/05/18 05:31, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=281270
>
> Nate Graham <nate@kde.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|CONFIRMED                   |NEEDSINFO
>           Resolution|---                         |WAITINGFORINFO
>                   CC|                            |nate@kde.org
>
> --- Comment #13 from Nate Graham <nate@kde.org> ---
> Is this still applicable with KDE Frameworks 5.45?
>
Comment 18 dexy 2018-06-18 09:18:27 UTC
On 09/05/18 07:22, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=281270
>
> Nate Graham <nate@kde.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Product|kio                         |frameworks-kio
>                   CC|                            |kdelibs-bugs@kde.org
>           Resolution|WAITINGFORINFO              |---
>            Component|general                     |general
>               Status|NEEDSINFO                   |CONFIRMED
>              Summary|Show progress actually      |When copying files to a
>                     |transferred to disk instead |removable disk, speed and
>                     |of to caches                |progress reflect copying to
>                     |                            |the local cache not to the
>                     |                            |disk itself
>
> --- Comment #16 from Nate Graham <nate@kde.org> ---
> Thanks for confirming!
>
FYI: this occurs on ALL transfers - USB, Network , and same-machine 
either inter-disk or inter-directory!
My attempt at a semi-graphical user's view:
Present system:

Source  Buffer Medium  Destination
|   ---|-->   |-------|        |
  ^        v
Command Report/Display

1.Command is given to transfer x(GB?) to Destination.
2. Source looks and sees Buffer- 100'of MB?. Fills Buffer.
3. Buffer reports quantity Q filled, system displays Q/x transferred.
WRONG! data hasn't even got as far as the Medium.
4. Medium meanwhile reports "I accept quantity q at a time for transport".
5. Buffer delivers q to Medium, it's sent and Medium reports Q-q to 
system, "I need filling".
6. Source delivers q to refill Buffer, return to step 3 until Q = 0.

Better system?

Source  Buffer Medium  Destination
|   ---|-->   |-------|->        |
  ^           v<- - - - -(checksum)
Command <- calc/check
              v
            Report/Display

1.Command is given to transfer x(GB?) to Destination.
2. Source looks through chain to destination and sees Medium (or 
sequence of).
3. System creates Buffer q, enough to fill smallest (or first?) buffer 
in Medium chain.
4. System fills Buffer.
5. Buffer delivers q to Medium, it's sent and Medium reports "I need 
filling".
6. Using checksum 'back-channel', verify arrival intact.  If incorrect 
checksum, error code sent to Buffer,Medium,Destination and transfer 
abandoned, else add q to 'delivered' sum D.
7. System displays D/x transferred
8. If D<x, return to step 4 ...

Realistic? Helpful?
Cheers, Dex
Comment 19 Christoph Feck 2018-11-20 10:57:50 UTC
*** Bug 326744 has been marked as a duplicate of this bug. ***
Comment 20 Christoph Feck 2020-01-14 18:15:43 UTC
*** Bug 416248 has been marked as a duplicate of this bug. ***
Comment 21 Nate Graham 2020-11-25 01:08:56 UTC
*** Bug 416783 has been marked as a duplicate of this bug. ***
Comment 22 Riyadul Islam Mollick 2021-06-15 12:25:00 UTC
I am still getting this bug on plasma 5.22, OS: KDE Neon
Comment 23 dave 2021-07-13 16:21:00 UTC
Still experiencing this issue in Kubuntu 21.04 and Manjaro 21.0.7 and I believe it affects any file transfer from one medium to another; I can replicate the issue with SATA to SATA, SATA to USB and SATA to WEBDAV.

As far as I can tell, this is not an issue within other DEs I have used (mainly XFCE and Cinnamon).

This is the difference between a complete, beautiful, fun-to-use D.E. and a broken system.  It is a deal-breaker, for me.

I don't feel like it is my place to criticise people doing things that are beyond my ken, and if it was a simple fix, it would have been done by now.

Additionally, I suspect it causes large webdav file transfers to fail under KDE.  My experience is, transferring files larger than 2GB by webdav fails in KDE but never demonstrates an issue in other DEs.
Comment 24 Nate Graham 2021-09-16 18:20:32 UTC
*** Bug 442536 has been marked as a duplicate of this bug. ***
Comment 25 Nate Graham 2021-09-16 18:21:11 UTC
Marking critical as this can result in data loss if the user does a move operation rather than a copy operation.
Comment 26 Nate Graham 2021-09-30 15:28:46 UTC
*** Bug 443126 has been marked as a duplicate of this bug. ***
Comment 27 sg7e0f7m 2021-09-30 16:47:38 UTC
Does anyone have any suggestions on how to fix this issue that has been around for nearly 10 years now?
Comment 28 sg7e0f7m 2021-10-02 06:43:16 UTC
Disabling write cache for a USB stick did show the real write rate, but it caused a 75% increase in overall transfer time.

Would KDE be able to read the write rate to the USB stick instead of the write rate to the cache?
Comment 29 romuluspb 2021-12-06 20:23:03 UTC
(In reply to francois072 from comment #27)
> Does anyone have any suggestions on how to fix this issue that has been
> around for nearly 10 years now?

I have a C demonstration on how to fix this:

https://github.com/RomuloPBenedetti/SaneFileTransfer

Basically it consists on creating a dynamic buffer in userspace that monitors fdatasync and through this, calculate ideal user space buffer size, so we don't send the entire file to the system cache.
Comment 30 romuluspb 2021-12-06 20:36:55 UTC
(In reply to Christoph Feck from comment #1)
> > therefore it shows that the copying operation is finished when it has not even been started
> 
> Do kernel developers also know a POSIX interface way to tell us when and how
> fast this buffered data is actually written to the disk, without causing
> massive slow downs that any "sync" type calls would cause?

About sync slowdowns, not sure about back there in 2011 but I believe calling fdatasync on the destiny file descriptor will not perturb system performance.
Comment 31 Gilberto Caetano de Andrade 2021-12-29 17:16:27 UTC
I confirm this issue. Copying an ISO file to usb stick takes some minutes but clicking remove with security takes longer than normal. It disappears in Dolphin but in notifications continues with msg: removing device....

OpenSUSE 15.3
Dolphin 20.04.2
Comment 32 Nate Graham 2022-01-18 16:27:00 UTC
The message displayed in the Disks & Devices applet was just improved to handle this case: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1367
Comment 33 Gilberto Caetano de Andrade 2022-01-19 16:31:24 UTC
(In reply to Nate Graham from comment #32)
> The message displayed in the Disks & Devices applet was just improved to
> handle this case:
> https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1367

I don't see problem with the actual msg, but thus with the operation that never finishes and invariably corrupts usb content.
Comment 34 Nate Graham 2022-01-19 16:32:30 UTC
It should finish *eventually*, even if it takes a long time.

If it doesn't, that's a separate bug.
Comment 35 MarcSerra 2022-03-15 07:34:41 UTC
Created attachment 147502 [details]
video example

As you can see at the attached video (don't pay attention to the second 11 glitch, I moved a window by mistake while recording the video), after the progress bar has arribed to the end, we must wait for a minute (or more) before can unplug the USB disk.
Comment 36 MarcSerra 2022-03-15 07:35:28 UTC
This happens to me in KDE neon when show to my wife how to move a cartoon film for our son to an USB drive.

If don't pay attention to this notification, you cannot unplug the disk safely.

Maybe can be included into 15-minute bug initiative?
Comment 37 Nate Graham 2022-03-15 15:03:28 UTC
Once we broaden it to include Frameworks bugs, definitely. Right now we're only doing bugs in Plasma-aligned software.

None of that prevents anyone from fixing it anyway, of course. :)
Comment 38 Nate Graham 2022-08-17 19:41:30 UTC
*** Bug 457959 has been marked as a duplicate of this bug. ***
Comment 39 Christoph Feck 2023-10-27 13:29:23 UTC
The Linux kernel recently got a new "cachestat" syscall. It might help to find out if pages have been written to disk.
Comment 40 Méven Car 2023-10-28 19:19:26 UTC
(In reply to Christoph Feck from comment #39)
> The Linux kernel recently got a new "cachestat" syscall. It might help to
> find out if pages have been written to disk.

https://www.phoronix.com/news/Linux-6.5-MM-cachestat

Next glibc will expose it:
https://sourceware.org/git/?p=glibc.git;a=commit;h=72511f539cc34681ec61c6a0dc2fe6d684760ffe
Comment 41 daf 2024-07-14 20:09:49 UTC
Does glibc 3.39 already have cachestat or is it pending for glibc 3.40?
Comment 42 Christoph Feck 2024-07-25 17:40:15 UTC
__NR_cachestat is exposed with glib 2.39. I quickly wrote a test, and the syscall works (nr_dirty shrinks gradually while the data is being written). I only tested with rotating rust, not slow USB, though.

Some issues:

* The call is per file, not per fs.

* You have to keep all files open and repeatedly call it for them as long as nr_dirty != 0. An idea could be to try the largest files first, and hope that the smaller files have "long" been written out.

* Unsure if nr_dirty is set to 0 when the mm requested the last page to be written out, or if it waits for the device driver to indicate that the device has _actually_ finished writing the data.

* The fs needs to update metadata, so even if the last file has nr_dirty == 0, you wouldn't know how long the fs needs to write it.

So the "unmount spinning indicator" MUST STILL BE RESPECTED to avoid data loss, even if this syscall was used to monitor writeback progress.
Comment 43 tagwerk19 2024-08-28 05:36:12 UTC
(In reply to Christoph Feck from comment #42)
> ... __NR_cachestat is exposed with glib 2.39. I quickly wrote a test ...
How do you call this? Do you have a code snippet you can share?

And, sorry naive question, what would happen with systems that do not support it?
Comment 44 Méven Car 2024-09-09 11:50:12 UTC
io_uring can do partial fsync, https://man7.org/linux/man-pages/man3/io_uring_prep_fsync.3.html
Potentially as the input file is read, that is it should have a negligeable impact on perf.
io_uring should be more performant than the current copy_file_range implementation.
Comment 45 Bug Janitor Service 2024-09-15 19:01:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1718
Comment 46 Bug Janitor Service 2024-11-24 12:00:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1764
Comment 47 Bug Janitor Service 2024-11-24 13:51:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/862
Comment 48 Akseli Lahtinen 2025-01-09 19:35:13 UTC
*** Bug 497286 has been marked as a duplicate of this bug. ***
Comment 49 Fernando Marcelino Muniz 2025-01-09 20:14:29 UTC
Created attachment 177238 [details]
It fails to recognize that the transfer is completed.

File transfer box is stuck at 99% with no transfer speed when moving massive files to an Android phone.

This must be a bug on Dolphin's end because I always manage to fully extract the supposedly 1% unfinished .tar.gz file after I copy the same file from the phone back into my notebook. Curiously enough, the file transfer always concludes when transferring back.

Which means that Dolphin doesn't recognize the fact that the transferring has completed, even though its transfer speed has stopped and disappeared from the box.
Comment 50 Fernando Marcelino Muniz 2025-01-09 20:15:59 UTC
Created attachment 177239 [details]
Reaching 100% completion doesn't mean it's 100% completed.
Comment 51 Bruno Gonçalves 2025-01-15 14:31:08 UTC
Reducing the cache usage for saving files to USB devices has been solving this problem for the past 2 years.

Here is how we are using it, but basically it is a noudev rule that calls a simple script, where $1 is the USB device to limit the RAM cache size while copying files, we are using a 16 MB limit, which is enough so that the recording does not become too slow and at the same time when completing a recording, almost immediately the device can be ejected.

echo 1 > /sys/block/$1/bdi/strict_limit
echo 16777216 > /sys/block/$1/bdi/max_bytes

https://github.com/biglinux/usb-dirty-pages-udev
Comment 52 Akseli Lahtinen 2025-03-03 12:20:36 UTC
*** Bug 500917 has been marked as a duplicate of this bug. ***
Comment 53 Nate Graham 2025-04-07 05:06:10 UTC
*** Bug 502488 has been marked as a duplicate of this bug. ***
Comment 54 Eduardo Correia 2025-05-26 11:13:49 UTC
This bug is now 14 years old and is one of the most common basically everyday bugs since it SEVERELY affects exFAT drives and most external USB drives are now formatted as exFAT out of the box, even the cheaper ones. Will this ever get fixed? Let's remember that users are used to just remove their USB stick if a transfer shows "finished" and many "tips" and tutorials on the web nowadays state that the "remove safely" option on other OSs is obsolete and unneeded. Works fine on all other OSs and DEs except KDE (discover specifically). This bug makes basically ALL the files that are bigger than a few KBs take much longer and will always be corrupted when users just remove their USB stick thinking the file transfer is "done" when in reality it isn't.

Bugs like these keep new users annoyed with KDE without understanding why (even if they understand, it still a huge annoyance). People that can't stand GNOME and just use KDE usually end up moving back to Windows after severe corruption cases like these.

We are not developers so we don't know how to fix this, and yet the KDE community advises us users to report any bugs we encounter. Well we did, 14 years ago and still waiting to be fixed. There are dozens of reports of this bug, many of which are now marked as duplicate. We know, and we keep reporting it because it keeps being ignored, for 14 years and counting. Also it was reported in KDE 4.7, we are now on 6.3 and the bug still persists ! Maybe drop/revise this ancient code ? If the KDE developer community can't do housekeeping on everything, which is very understandable, maybe we should start dropping a few features from KDE because clearly there is just not enough dev-power to support all of them.

I'm sorry if I'm being rude, I'm just stressed out because I just corrupted some very important big files that I CTRL X + CTRL V (move) to an external USB drive and removed the USB right after it showed finished. It deleted the source file automatically, because its was a move operation so I effectively lost both copies. And please don't blame me for thinking a "finished" transfer was actually finished. We should not depend on the "remove safely" option thing, that many people don't even remember or even know how to use.

I basically experienced what is reported in 2021 (4 years ago) in bug #442536 (marked as duplicate of this one) , but I actually lost important data this time.

Bug still present at 26 May 2025, using Fedora/Nobara 42, KDE 6.3.4, Frameworks 6.13.0, Qt 6.9.0, Kernel 6.14.8, Wayland.
Comment 55 BryanLiang 2025-08-04 06:00:33 UTC
The bug still exists in KDE Plasma 6.4.3, framework 6.16.0. I copied a 1.3GB ISO file to my external disk and the progress indicator just showed up for a second and disappeared immediately. When I tried to eject the disk, I got a warning that the transfer wasn’t finished.
Comment 56 Jyothish Atheendran 2025-08-18 21:24:40 UTC
Can confirm this issue still exists in Fedora KDE Plasma 6.4.4
Comment 57 TraceyC 2025-08-19 15:33:26 UTC
Méven, has there been progress on the MRs for this VHI bug?
Comment 58 gggeri91 2025-09-07 11:17:47 UTC
This behavior drives me crazy. Fedora 42 with latest KDE Plasma 6.4.4 still has this issue. Today it is 07. September 2025. This ticket has been created in 2011. May I ask why new features are being developed instead of focusing on fundamental usability issues? It's like copying files don't matter? Every single time I have to open up the terminal to monitor disk activity to make sure the system flushed all bytes to my stick. And sometimes the KDE Plasma Desktop just hangs up completely while copying. That is an awesome user experience guys. Congratulations.

Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.16.4-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 64 GiB of RAM (62.7 GiB usable)
Comment 59 Méven 2025-09-07 16:04:39 UTC
(In reply to gggeri91 from comment #58)
> This behavior drives me crazy. Fedora 42 with latest KDE Plasma 6.4.4 still
> has this issue. Today it is 07. September 2025. This ticket has been created
> in 2011. May I ask why new features are being developed instead of focusing
> on fundamental usability issues? It's like copying files don't matter?

It does, the age of the issue is not very relevant but the number of comments and duplicate bugs very much.
It is marked VHI critical. 

> Every
> single time I have to open up the terminal to monitor disk activity to make
> sure the system flushed all bytes to my stick. And sometimes the KDE Plasma
> Desktop just hangs up completely while copying. That is an awesome user
> experience guys. Congratulations.

Most of KDE contributors are volunteers, like myself, working from the good of their heart, making free software on their weekend.
Keep this in minds.

> 
> Operating System: Fedora Linux 42
> KDE Plasma Version: 6.4.4
> KDE Frameworks Version: 6.17.0
> Qt Version: 6.9.1
> Kernel Version: 6.16.4-200.fc42.x86_64 (64-bit)
> Graphics Platform: Wayland
> Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
> Memory: 64 GiB of RAM (62.7 GiB usable)

Here you can find some a simple workaround:
https://bugs.kde.org/show_bug.cgi?id=281270#c51

This workaround is shipped by two distributions biglinux and manjaro (https://github.com/biglinux/usb-dirty-pages-udev)

And I have been doing some research into fixing this, (multiple times):
https://invent.kde.org/frameworks/kio/-/merge_requests/1764#note_1112617
Not clear how to fix this yet.
Comment 60 sg7e0f7m 2025-09-07 17:58:43 UTC Comment hidden (off-topic)
Comment 61 Francisco H 2025-10-02 23:30:49 UTC
I can confirm this bug exists on endeavouros, is there a feature branch for this or any status updates so that I can contribute?
Comment 62 Francisco H 2025-10-02 23:34:17 UTC
(In reply to Francisco H from comment #61)
> I can confirm this bug exists on endeavouros, is there a feature branch for
> this or any status updates so that I can contribute?

my bad here it is https://invent.kde.org/frameworks/kio/-/merge_requests/1764#note_1112617
Comment 63 Francisco H 2025-10-03 01:36:43 UTC
(In reply to dave from comment #23)
> Still experiencing this issue in Kubuntu 21.04 and Manjaro 21.0.7 and I
> believe it affects any file transfer from one medium to another; I can
> replicate the issue with SATA to SATA, SATA to USB and SATA to WEBDAV.
> 
> As far as I can tell, this is not an issue within other DEs I have used
> (mainly XFCE and Cinnamon).
> 
> This is the difference between a complete, beautiful, fun-to-use D.E. and a
> broken system.  It is a deal-breaker, for me.
> 
> I don't feel like it is my place to criticise people doing things that are
> beyond my ken, and if it was a simple fix, it would have been done by now.
> 
> Additionally, I suspect it causes large webdav file transfers to fail under
> KDE.  My experience is, transferring files larger than 2GB by webdav fails
> in KDE but never demonstrates an issue in other DEs.

I have experienced this in cinnamon in linux mint.
Comment 64 Fernando Marcelino Muniz 2026-01-26 03:58:03 UTC
Created attachment 188884 [details]
Issue on Dolphin 25.12.1

Operating System: CachyOS Linux 
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1
Kernel Version: 6.12.67-2-cachyos-lts (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-11300H @ 3.10GHz
Memory: 9 GB of RAM (8.1 GB usable)
Graphics Processor 1: Intel® Iris® Xe Graphics
Graphics Processor 2: NVIDIA GeForce GTX 1650
Manufacturer: LENOVO
Product Name: 82MG
System Version: IdeaPad Gaming 3 15IHU6
Comment 65 Bug Janitor Service 2026-02-22 15:18:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/2162
Comment 66 Bug Janitor Service 2026-06-22 11:48:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/2282
Comment 67 Bug Janitor Service 2026-06-22 12:09:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/2283
Comment 68 aristsakas 2026-08-10 10:35:14 UTC
*** Bug 521159 has been marked as a duplicate of this bug. ***
Comment 69 aristsakas 2026-08-10 10:35:20 UTC
*** Bug 518325 has been marked as a duplicate of this bug. ***
Comment 70 aristsakas 2026-08-10 10:35:34 UTC
*** Bug 489924 has been marked as a duplicate of this bug. ***
Comment 71 Mahendra Tallur 2026-09-17 07:23:14 UTC Comment hidden (off-topic)
Comment 72 Méven 2026-09-17 07:43:50 UTC
(In reply to Mahendra Tallur from comment #71)
> Hi ! Manjaro user here. It seems the aforementioned workaround (Use udev to
> specify dirty pages for usb devices) does not work as both exfat and ext4
> USB drives still show up a 2.46 GB cache here (lsblk ->
> /sys/class/bdi/8:0/max_bytes)
>
Report this to the workaround author: https://github.com/biglinux/usb-dirty-pages-udev/tree/main
This is a third-party solution, nothing to do with KDE software.
 
> Is there another place to discuss / bump this / related issues ? I feel
> pretty uncomfortable each time I have to copy stuff to usb drives :)

That's the one place. The issue is fundamentally hard to fix, the Linux kernel does not make  this easy.
Somebody has to invest some serious effort to fix, and kio/dolphin are maintained almost entirely by volunteers.
I recommend you https://pointieststick.com/2020/05/18/why-dont-you-just-fix-thing-already/

I have a draft as a start: https://invent.kde.org/frameworks/kio/-/merge_requests/2283
Comment 73 Mahendra Tallur 2026-09-17 07:51:40 UTC Comment hidden (off-topic)
Comment 74 John Kizer 2026-10-21 21:57:51 UTC
*** Bug 527419 has been marked as a duplicate of this bug. ***
Comment 75 Bug Janitor Service 2026-10-24 14:30:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/2515
Comment 76 Méven 2026-10-24 15:03:23 UTC
Git commit b3ccad20b7da849b0a5b6edbe043fb0deabc609c by Méven Car.
Committed on 24/10/2026 at 14:27.
Pushed by meven into branch 'master'.

file: report a copy to a removable device

The file worker writes one file per command. A copy to a USB stick can
leave its data in the page cache when the command ends, and nothing
informs the job that the device still needs a flush.

copy() and put() now set the flush-destination metadata when the
destination folder is on a removable device. The answer comes from the
mount table and is kept for each mount, so it costs one statx() per
file. KIO_FILE_FORCE_REMOVABLE makes any destination count as
removable, for tests.

M  +42   -0    autotests/jobtest.cpp
M  +2    -0    autotests/jobtest.h
M  +8    -0    src/kioworkers/file/file.cpp
M  +4    -0    src/kioworkers/file/file.h
M  +110  -0    src/kioworkers/file/file_unix_copy.cpp

https://invent.kde.org/frameworks/kio/-/commit/b3ccad20b7da849b0a5b6edbe043fb0deabc609c
Comment 77 Méven 2026-10-24 15:03:31 UTC
Git commit 29a6e2c71077dfd22396027b1ca1864a9fbfea1f by Méven Car.
Committed on 24/10/2026 at 14:30.
Pushed by meven into branch 'master'.

file: add a command that flushes a folder on a removable device

The file worker copies one file per command, so it cannot flush a whole
copy at its end. The new special command writes back the filesystem
that holds a folder with syncfs(), when the folder is on a removable
device. For any other folder it does nothing. While it flushes, it
notifies the job with an info message.

A copy to a removable device sets the flush-destination metadata, so a
job sends the command only for such a copy.

M  +50   -0    autotests/jobtest.cpp
M  +2    -0    autotests/jobtest.h
M  +7    -0    src/kioworkers/file/file.cpp
M  +3    -0    src/kioworkers/file/file.h
M  +25   -0    src/kioworkers/file/file_unix_copy.cpp

https://invent.kde.org/frameworks/kio/-/commit/29a6e2c71077dfd22396027b1ca1864a9fbfea1f
Comment 78 Bug Janitor Service 2026-10-24 17:12:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/2517
Comment 79 Méven 2026-10-24 17:26:26 UTC
Git commit 9ad576b9e48b7aaa50df61834c24724e5e63a2d8 by Méven Car.
Committed on 24/10/2026 at 15:05.
Pushed by meven into branch 'master'.

filecopyjob: keep the metadata that the worker sent for the copy

Before this change, a FileCopyJob dropped the metadata that the worker
sent with the result of a copy or a put. A CopyJob merges the metadata
of each file it copies, so it never received flush-destination.

M  +43   -0    autotests/jobtest.cpp
M  +2    -0    autotests/jobtest.h
M  +4    -0    src/core/filecopyjob.cpp

https://invent.kde.org/frameworks/kio/-/commit/9ad576b9e48b7aaa50df61834c24724e5e63a2d8
Comment 80 Bug Janitor Service 2026-10-24 17:32:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/2518
Comment 81 Méven 2026-10-26 08:57:28 UTC
Git commit bdfd848ab9cc0ab499387a4d74a337366756a447 by Méven Car.
Committed on 26/10/2026 at 08:46.
Pushed by meven into branch 'master'.

copyjob: write a copy to a removable device before reporting success

Before this change, a copy to a USB stick reported success while the
copied files were still in the page cache. Unplugging the stick then
lost them.

When the file worker reports flush-destination, CopyJob now sends the
flush command for the destination folder before it reports success.
A copy to any other folder sends no extra command. One syncfs() covers
every file of the copy. An error from the flush is the error of the job,
because the data may not be on the device.

M  +50   -0    autotests/jobtest.cpp
M  +2    -0    autotests/jobtest.h
M  +53   -4    src/core/copyjob.cpp

https://invent.kde.org/frameworks/kio/-/commit/bdfd848ab9cc0ab499387a4d74a337366756a447
Comment 82 Méven 2026-10-26 08:57:36 UTC
Git commit e135cd32bd06b072a1c436b9d002afcc3aeae6fa by Méven Car.
Committed on 26/10/2026 at 08:46.
Pushed by meven into branch 'master'.

copyjob: delete moved sources after the flush of a removable device

Before this change, a move from another partition to a removable device
deleted each source file right after its copy. The flush ran only at the
end of the job, so unplugging the device before the flush lost the files
in both places.

A moved file whose copy or put reports flush-destination now keeps its
source, when the destination has a local path or a local
UDS_TARGET_URL. CopyJob deletes these sources one by one after the flush
succeeds, then the source folders. When the flush or a delete fails, the
remaining sources stay, and they are not reported as removed.

A source can now wait until the end of the job before its delete. CopyJob
stats it first, and keeps a source whose mtime or size changed since its
copy, with a warning.

M  +67   -7    autotests/jobtest.cpp
M  +149  -27   src/core/copyjob.cpp
M  +35   -4    src/core/filecopyjob.cpp
A  +27   -0    src/core/filecopyjob_p.h     [License: LGPL(v2.0+)]

https://invent.kde.org/frameworks/kio/-/commit/e135cd32bd06b072a1c436b9d002afcc3aeae6fa
Comment 83 Méven 2026-10-26 08:57:46 UTC
Git commit 64f961d725b520b775e9244a22be05ef3b54806e by Méven Car.
Committed on 26/10/2026 at 08:46.
Pushed by meven into branch 'master'.

copyjob: record a kept source for undo once it is deleted

Before this change, CopyJob emitted copyingDone and FileMoved for a
moved file as soon as its copy finished, even when its source waited
for the flush of a removable device. A source that changed after its
copy stays in place, but the undo record of the job still held it as
moved, so undoing the move hit the source that was still there.

A file whose source is kept is now reported when its source is deleted.
A file whose source stays is not in the undo record, and is not
reported as removed.

M  +35   -3    autotests/jobtest.cpp
M  +32   -25   src/core/copyjob.cpp

https://invent.kde.org/frameworks/kio/-/commit/64f961d725b520b775e9244a22be05ef3b54806e
Comment 84 Méven 2026-10-26 08:57:55 UTC
Git commit 73b21f586bc9ab7c2d85bd582d6d47226e9e051d by Méven Car.
Committed on 26/10/2026 at 08:46.
Pushed by meven into branch 'master'.

jobtest: test a move to a destination with a local target URL

A destination that a worker maps to a local folder only through
UDS_TARGET_URL had no test, nor had a move whose files go through put.

The test worker maps kio-test-flush:/device to a local folder, and its
put reports flush-destination as the file worker does for a removable
device. The test checks that the folder is flushed, and that the source
stays until the flush.

M  +121  -0    autotests/jobtest.cpp
M  +1    -0    autotests/jobtest.h

https://invent.kde.org/frameworks/kio/-/commit/73b21f586bc9ab7c2d85bd582d6d47226e9e051d
Comment 85 Méven 2026-10-26 09:04:10 UTC
Git commit 526201af02ccb49050d4fda24a914a485a2715a6 by Méven Car.
Committed on 26/10/2026 at 08:46.
Pushed by meven into branch 'master'.

copyjob: flush a removable device when the copy fails or is cancelled

Before this change, only a copy that succeeded flushed the device. A
copy that stopped on an error, or that the user cancelled, left the
files that it had already copied in the page cache. A move kept the
sources of all the files that it had moved so far, so they were in
both places.

A copy that ends with an error now flushes the device before it reports
that error. A cancelled copy cannot wait, so it starts a flush that
runs on its own. In both cases, the unchanged sources of the moved
files are deleted once the flush succeeds.

M  +116  -0    autotests/jobtest.cpp
M  +3    -0    autotests/jobtest.h
M  +148  -38   src/core/copyjob.cpp
M  +5    -0    src/core/copyjob.h

https://invent.kde.org/frameworks/kio/-/commit/526201af02ccb49050d4fda24a914a485a2715a6
Comment 86 Méven 2026-10-26 09:04:25 UTC
Git commit b8179fdef0e9e54046ae906c193584cdac27cb75 by Méven Car.
Committed on 26/10/2026 at 08:46.
Pushed by meven into branch 'master'.

file_unix_copy: flush a large file copied to a removable device

Before this change, a copy to a USB stick reported success while the data
was still in the page cache. Unplugging the stick right after lost data.

A file larger than the writeback window is now flushed with fsync(), and
then its folder, before the copy reports it done. The window has already
written back all but two windows, so the flush is short. Smaller files are
not flushed: a flush per file made 3000 files of 16 KiB take 10 s instead
of 0.04 s on a local disk.

M  +31   -11   src/kioworkers/file/file_unix_copy.cpp

https://invent.kde.org/frameworks/kio/-/commit/b8179fdef0e9e54046ae906c193584cdac27cb75
Comment 87 Méven 2026-10-26 09:14:04 UTC
Git commit 7807855c0e63575ee89a6d569e92a89b4522cc95 by Méven Car.
Committed on 26/10/2026 at 08:46.
Pushed by meven into branch 'master'.

copyjob: show which source a move deletes after the flush

After the flush of a removable device, a move deletes the sources of
the moved files one by one, with a stat before each delete. The job
showed no description during that phase. With many files on a remote
source, it stayed at 100% for a long time, and looked hung.

The job now shows "Deleting" with the source being deleted.

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

https://invent.kde.org/frameworks/kio/-/commit/7807855c0e63575ee89a6d569e92a89b4522cc95
Comment 88 Méven 2026-10-26 09:14:15 UTC
Git commit e94defc3e04b1d34c12505d875a6e8e2667f8f45 by Méven Car.
Committed on 26/10/2026 at 08:46.
Pushed by meven into branch 'master'.

file_unix_copy: write back copies to slow destinations as they go

Before this change, a copy left all its data in the page cache, and the
kernel wrote it back later. On a removable device the copy looked finished
long before the data was written. Its progress showed the speed of filling
the cache. On NFS and CIFS, the writeback of a large file held up other
requests to the share, such as listing a folder.

A copy to a removable device, NFS or CIFS now hands each full window of
written data to a helper thread. The helper writes the window back and waits
for it, while the copy fills the next window. The copy waits only for the
window before the one it hands over, so at most two windows are not written
back. The progress is at most one window ahead of the data written back, so
it follows the speed of the device. It never goes back.

Only the helper starts writeback. On CIFS, the thread that starts a
writeback sends the data itself, while it waits for credits from the server.
netfs runs one writeback of a file at a time, and drops a start that finds
one running.

A window holds about 200 ms of writeback, at the speed of the window before.
It starts at 1 MiB, at most doubles, and stays below 16 MiB, or 128 MiB on
CIFS. Every request to a CIFS server waits behind the window being sent.
Over a 5 MB/s link, a listing during a copy took 1.7 s, against 16 s before.

The type of the destination comes from the mount table, so the server of a
network filesystem is not asked. The lookup of whether a folder is
on a removable device now also keeps whether its mount is CIFS or NFS, for
each mount. KIO_FILE_FORCE_REMOVABLE turns the window on too.
Related: bug 423187

M  +1    -0    src/kioworkers/file/ConfigureChecks.cmake
M  +3    -0    src/kioworkers/file/config-kioworker-file.h.in
M  +249  -27   src/kioworkers/file/file_unix_copy.cpp

https://invent.kde.org/frameworks/kio/-/commit/e94defc3e04b1d34c12505d875a6e8e2667f8f45