Ubuntu 13.10 on Thinkpad slows down dramatically when power adapter is plugged in
After a long story which began with the same analysis as you told - power cable plug in => slow down the system - I found a solution and another better reproducible situation which works for me.
After waking up the system from suspend to ram the system is remarkable slow. I checked after a tip of a colleague the cpu frequency and the set governor. But the governor was set to performance (watch -s 1 'cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'
) and all cpu seems to run with full MHz. (watch -n 1 'cat /proc/cpuinfo | grep MHz'
). It seems that this information is not really reliable. After setting the governor to e.g. ondemand and than back to performance the system runs again as expected: fast!
For me the suspend to ram thing is a reproducible situation where the system slows down. But I think there are maybe also some other situations like the power cable - sometimes. And I had also a situation where the governor was automatically set to ondemand if I put some load to the cpu. Only a restart of the system stopped this behaviour.
For setting the governor i used this as a source: http://wiki.ubuntuusers.de/Prozessortaktung (German only) the tool for unity e.g. is indicator-cpufreq sudo apt-get install indicator-cpufreq
relogin or start it afterwards with indicator-cpufreq
.
Bugs which might be interesting in this context: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1188647 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1233479
I have a (seemingly) very similar issue on a Lenovo ThinkPad T61: (sometimes) when the laptop is plugged-in, it is very slowish. I plug-out the adapter, and the slowness stops.
Here I notice the following symptoms:
- The
kworker
orwatchdog
process is going haywire, spiking at 100% CPU every ~1sec (see also: Kworker, what is it and why is it hogging so much CPU?) - This causes UI freezes and essentially renders Ubuntu unusable
- When I type any text in any program then I experience freezes, and dyslexic typing (like: "dystyping")
- The green lights of my network ethernet controller is always on
I tracked it down to the following: it looks like the kernel is being under a shower of IRQ interrupts, possibly due to faulty behavior at driver level in the kernel. Apparently this is a known issue related to ACPI interrupt calls, but obviously it hasn't been fixed yet in the kernel for specific hardware (like ours).
Solution:
- The workaround that you suggested, unplugging, works here too. But this is only temporary.
- The "definitive" workaround is to do a cold reboot. You need to shutdown the laptop (NOT just reboot), if necessary even remove the charger and the battery after the shutdown, to make sure that nothing weird is happening. Then boot again. Usually this gets rid of the issue (and the ethernet lights turn off).
- Sometimes this is insufficient, and you need to make sure that the charger is disconnected while the kernel initializes at boot time. I usually wait until the login screen to avoid surprises.
This said, I'm still hoping for a nicer solution to this issue. The workaround is aggravating. Does it help?
We had the same problem (on a T520), and thanks to Honza's answer, we found that using a 90W adapter instead of the 65W adapter fixed the problem for us too (thanks!).
After some googling, I found an explanation here: http://linux-thinkpad.10952.n7.nabble.com/WARNING-Lenovo-ThinkPads-and-65W-power-supplies-td13173.html
Basically according to this post "the 65W power supplies alone are NOT sufficient to power the notebook in all scenarios...and the firmware knows this."
The post seems to imply that if your battery is charged then the performance won't be throttled because it can draw on both the 3.25A supply and/or the battery to supply a peak load without being underpowered, but if your battery is not present or not charged, then the cpu frequency will be throttled as a safety measure if it determines that your supply is underpowered.