While copying a vast number of multi-megabyte sound files, the Kubuntu desktop becomes intermittently unresponsive (the mouse pointer can move, but Firefox, Konsole, and KDE itself temporarily ignore keyboard presses, mouse clicks, and network I/O).

$ uname -a
Linux jaguar 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010 x86_64 GNU/Linux

$ cp -Rnv /home/user/music/flac/* .

The PID is 11544, and I subsequently tried:

$ renice -n 19 -p 11544
$ ionice -c 3 -p 11544

Strangely, when remotely accessing a laptop on the local network (via TightVNC), the remote screen continuously updates (if I am using the laptop). Similarly, playing music files off the USB drive (even a file that has not been fully copied) does not get affected by the intermittent unresponsive problem.

Pressing Control-Z to suspend the copy process results in normal behaviour (once the keystroke is finally accepted by Konsole) instantly.

What I was trying to accomplish was the following:

  1. Rip CDs to desktop (Linux) computer.
  2. Plug USB drive into laptop.
  3. Run WinSCP on laptop.
  4. Copy music files using WinSCP from desktop computer to USB drive on laptop.

However, no matter what software I used (WinSCP, Tunnelier, or rsync over Cygwin), the copy would start at a zippy 2 MB/s, then choke to 60 KB/s after a few seconds. Effectively, the secure copy would stall.


Searches have found a few people who have experienced similar problems. The issues went away for most of them by switching to Tunnelier. This did not work for me. Other people switched to FreeBSD to solve the problem. That's not an option at this time. Still others switched from SSH Protocol 2 to SSH Protocol 1. That did not work for me, either.

Log Files

The USB drive checked out fine using chkdsk /f on Windows. There are no relevant error messages in any of the log files from /var/log.


Monitoring the system using top shows nothing suspicious when the "pauses" occur. (top continues to refresh during a moment of unresponsiveness.) The program hald-addon-storage shows it polls /dev/sr0 every 2 seconds. Whatever that means.


Quad-core with 8 GB of RAM. The /tmp drive is empty and / shows 72% usage. RAM has 2 GB free and not a single CPU is pegged beyond 1% usage, even during the pauses.


Does anyone have any ideas on what might be happening, or avenues to explore to try and understand what is happening with the system?


I'm a bit confused as well. First you show commands suggesting the problem is copying stuff from your home directory to a USB drive, but then you start talking about your Windows laptop and scp. So what are you actually doing?

Wrt. to poor Linux desktop interactivity when writing heaviliy to a slow device, the recent 2.6.36 kernel contains a patch that is supposed to fix this particular issue.

As you seem to be using Ubuntu 10.04, you could try the new kernel from the kernel PPA and see if that fixes the issue for you.

| improve this answer | |

I got quite lost after the cp/renice/ionice examples you provided. :) Was the USB drive connected to your desktop during those examples (so no network traffic between desktop and laptop was needed), or did you try that desktop + (laptop+usb) combo later? And when you say "rip CDs to Linux desktop", do you store those files on a local hard drive or that USB disk?

In many Linux distributions USB drives will get mounted with sync mount option by default. That means safer writes, but on the other hand with some drives that might mean very slow write performance and all kind of other funny side-effects. Mounting the drive with mount -o remount,async /your/usbdrive/mountpoint will probably speed up the write operations a lot.

Does the Linux desktop stall if you do your WinSCP stanza, but instead of USB drive try to copy to local drive in your laptop?

| improve this answer | |
  • Is this equivalent to enabling write caching for the target device/disk? – ThorSummoner Oct 19 '15 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.