OS is Debian 10. File manager is Thunar.

I've noticed that when I copy a few dozen gigabytes to my USB flash drive, the process only takes a minute or two. Then when I go to eject, the ejection process can take an hour or more. The USB drive is fine, it's just a lot of data to flush from the disk cache.

The issue is this: I have no clue how much time is left on the ejection process.

There must be a way to see the progress on this. Or better yet, is there a way to copy files to a USB flash drive and skip the disk cache entirely, just for that physical device?

I know how to skip the disk cache for dd, but that is useless here.

And of course, sync has no progress bar and as far as I know doesn't allow you specify a physical device.

3 Answers 3


I have never used Thunar (for anything else than getting an overview of a gallery), so I don't know how it handles mounting, it might use this "fancy" new thing called udisks2.

A solution might be to mount the device with the sync option, in the good old days that would have been handled through /etc/fstab, if whatever Thunar uses honors that, it's still doable, else you'll have to figure out if it can be configured some other way.


You've discovered Why were "USB-stick stall" problems reported in 2013? Why wasn't this problem solved by the existing "No-I/O dirty throttling" code?

How to solve it? Unforuntately Linux doesn't allow to have dirty buffers per device, so here's I how I solved it for myself (per Linux Torvalds advice):

cat /etc/sysctl.d/limit_dirty_buffers.conf
# Per Torvalds advice
vm.dirty_background_bytes = 33554432
vm.dirty_bytes = 134217728

syncing periodically is not the best idea as it causes higher tear and wear and slows down the process even further.


A possible solution might be to run a daemon doing sync(2) calls every few seconds. This could slow down your entire Linux system.

My sync-periodically.c program is such a daemon. GPLv3+ licensed, so NO WARRANTY and you could lose all your data. You got the source code, and you could improve it.

It is a command line, not a GUI interface, program (no progress bar). You might start it from /etc/crontab - see crontab(5).

PS. Contact me by email to [email protected] (near Paris, in France) for details.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .