upowerd kills USB performance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upower (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
After launching Kubuntu and logging in to KDE I mount a USB storage device to e.g. /mnt/tmp and try the following command:
dd if=/dev/zero of=/mnt/
I don't wait until it finishes, because when I press Ctrl+C, it waits several more seconds and prints that it has copied only one record and the speed was from 200 kB/s to 1.8MB/s, which is nowhere near the speed the device can operate.
On the other hand, if I rename /usr/lib/
This hasn't happened on Kubuntu 12.04, but does happen on 14.04.
Running powertop at the "Tunables" tab doesn't show any difference, so it doesn't look related to autosuspend or similar things.
This also happens with Kubuntu 14.04 LiveCD, not only with the already installed system.
I've tested this with 3 different USB devices: Transcend JF780 16GB (in USB 3.0 and 2.0 ports), OCZ ATV 8GB (USB 2.0 device) and Seagate SRD00F2 2TB (in USB 3.0 and 2.0 ports) with identical results.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: upower 0.9.23-2ubuntu1
ProcVersionSign
Uname: Linux 3.13.0-30-generic i686
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: i386
CurrentDesktop: KDE
Date: Wed Jul 16 00:29:34 2014
InstallationDate: Installed on 2014-05-26 (50 days ago)
InstallationMedia: Kubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20140416.1)
SourcePackage: upower
UpgradeStatus: No upgrade log present (probably fresh install)
This appears to be because upowerd calls `pm-powersave false`, which in turn activates /usr/lib/ pm-utils/ power.d/ laptop- mode, which writes 10 and 5 to /proc/sys/ vm/dirty_ ratio and /proc/sys/ vm/dirty_ background_ ratio, respectively, replacing default 20 and 10.
Commenting this line in laptop-mode file works around this bug.
Now I'm not sure whether this bug is a kernel bug or a pm-utils one. It seems definitely not a upower bug.
BTW, this bug doesn't appear on another machine I tested it on, with GA-I915G-MF motherboard, while it appears on the problematic motherboard MSI B85-G41 PC Mate.