DEV Community

Cover image for Solving the Linux 'Fake 100%' USB Copy Problem: True USB Write Progress
Ashen Chathuranga
Ashen Chathuranga

Posted on

Solving the Linux 'Fake 100%' USB Copy Problem: True USB Write Progress

Have you ever copied a massive movie file or an ISO to a USB flash drive on Linux? Your file manager happily zips to 100% in a matter of seconds, the dialog box closes, and you think you're good to go. You pull out the drive, plug it into another machine, and—bam. Data corrupted.

If you are a Linux user, you have likely experienced this. It’s incredibly frustrating, but it isn't a bug in your file manager. It's a byproduct of how Linux handles memory and background writing.

Fortunately, a new open-source GNOME extension called True USB Write Progress (created by Ashen Chathuranga) offers an elegant, native solution to this exact problem.

The Problem: Why Linux Lies to You

When you copy a file to a USB drive in Linux, the operating system doesn't write it directly to the slow USB stick. Instead, it aggressively caches the data into your system's RAM (specifically, into what's known as the dirty cache).

Because writing to RAM is practically instantaneous, your file manager (like Nautilus or Dolphin) thinks the job is done. It reports 100% completion and closes the progress window. Meanwhile, the Linux kernel is quietly flushing that cached data out to your USB drive in the background.

If you yank the drive out during this invisible background process, the transfer is interrupted, and your files are destroyed. The traditional workaround? Opening a terminal and typing sync, then waiting for the prompt to return. But in 2026, we shouldn't have to rely on terminal commands just to know when it's safe to unplug a thumb drive.

The Solution: True USB Write Progress

True USB Write Progress is a GNOME Shell extension that puts a real-time top-bar widget on your screen. It monitors the kernel's dirty-cache writes destined for removable USB block devices, showing you exactly what is happening under the hood.

Instead of guessing, you get a visual indicator that stays active until the background flush is actually done. When the indicator disappears, you know with 100% certainty that the drive is safe to eject.

How It Works Under the Hood

Tracking background I/O accurately without creating a flickering, annoying UI is surprisingly complex. The extension uses a smart, multi-phase logic system to ensure accuracy:

  1. Phase 1 — The Trigger:
    The extension uses strict thresholds to filter out tiny background operations. Small metadata writes (like journal commits, inode updates, or directory entries) won't trigger the UI. It only wakes up when it detects large, sustained I/O—the exact signature of a file copy.

  2. Phase 2 — The Sustain:
    Once a large copy triggers the extension, the logic shifts. ANY device write activity (even small ones) will keep the indicator alive. Because the Linux kernel flushes cache in "bursts," this prevents the progress bar from rapidly flickering on and off between those bursts.

  3. The "Done" State:
    The extension doesn't just guess when the write is over. It waits until the device is truly idle—meaning absolutely zero sector changes and zero in-flight I/O—for a sustained 10-second grace period. Only then does it declare the job finished.

Why You Should Use It

If you regularly transfer files to thumb drives, SD cards, or external hard drives via GNOME, this extension is a must-have. It bridges the gap between advanced kernel memory management and everyday desktop usability.

  • No more corrupted files: You know exactly when the physical write operation finishes.
  • No more terminal workarounds: You can finally retire the sync command.
  • Native GNOME feel: It integrates cleanly into your top bar without feeling like bloatware.

Get the Extension

Ready to stop guessing? You can check out the source code and contribute on GitHub, or install it directly from the GNOME Extensions marketplace.

Top comments (0)