Why does my touchpad occasionally becomes much slower?

I am using a notebook. No USB mice are connected to it. My touchpad behaves erratically: Sometimes it works normally, but occasionally it will start… Well, not drifting, because I’m still controlling it, but it moves way slower and becomes harder to control.

I don’t know what could be causing it. The problem seems to happen more often when the charger is connected to the notebook.