1

When I am running a very long program (e.g. A long python script) and when I plug in the charger, my laptop will switch between charging and not charging very frequently. However, if I stop that script, my laptop will charge normally when it is plugged in.

Does anyone know what might be causing this and how to fix it?

3
  • 1
    It's not a problem. There are times when the laptop needs extra processing power and will draw power from both the main and battery. When those resources are no longer needed, it will switch back to charging. This is normal behavior.
    – Allan
    Commented Jun 21, 2020 at 3:06
  • @Allan Thanks for your reply. However, when the long python script is running, my laptop switches between charge and not charge very frequently. I am not sure if it is still normal? Commented Jun 21, 2020 at 4:24
  • 1) thats not what you asked in your original question and 2) it depends on what your code is doing.
    – Allan
    Commented Jun 21, 2020 at 7:20

1 Answer 1

1

There's actually nothing you need to fix - it is intended behavior.

Consider that your laptop at idle is consuming (fictious numbers) 10W of power. You plugin a 61W power adapter, and it starts charging the battery at a rate up to 51W. I.e. this means that the power from the power adapter is used to power the computer primarily, and secondly to charge the battery.

Now you run a very power hungry program on your computer, and the computer starts to use 65W of power. Now all the power from the power adapter is used to power the computer, and the battery is also discharged slowly. This means that the status on the display will change from "charging" to "not charging".

Your Python script most probably does different things at different times - some that take a lot of power and some that take less power. As a result, you'll see that some times the battery is being charged, and at other times it is not being chargd.

You must log in to answer this question.

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