20.04 – How to debug slow performance I experience when my computer is unplugged (running on battery)


My computer suddenly started performing very, very slowly, to the point where it was essentially unusable. At that point I had Ubuntu 20.04. Prior to the sudden performance problem, the computer had been working well for several months on 20.04.

Partly in an effort to address the performance problem, I upgraded to 22.04, but the issue did not improve at all. I then noticed that the computer does fine when it is plugged in. It only performs slowly when it is running on the battery.

Many people have experienced similar issues and have posted to various online forums, but there is almost never any resolution in the forum posts, so I don’t know how to solve this. Some people suggest running various diagnostics, or checking config files, but those files don’t exist on my computer and the commands don’t run.

I don’t know where to begin to diagnose the issue. Where should I start?

When my computer is plugged in, this is the output of free -h:

               total        used        free      shared  buff/cache   available
Mem:           7.6Gi       1.8Gi       2.1Gi       556Mi       3.8Gi       5.0Gi
Swap:          7.9Gi          0B       7.9Gi

When my computer is not plugged in, and performing more slowly, this is the output of free -h:

               total        used        free      shared  buff/cache   available
Mem:           7.6Gi       1.8Gi       2.1Gi       530Mi       3.8Gi       5.1Gi
Swap:          7.9Gi          0B       7.9Gi

To review: The computer worked fine on 20.04 for several months, both when plugged in and unplugged. But suddenly there was a dramatic loss of performance, and rebooting the computer didn’t help. So I upgraded to 22.04, but this has not helped with the issue. The issue only occurs when unplugged and running on battery.



Source link

Leave a Comment