That has been happening in my logitech speakers recently. You can clean it and it will get better for a little while. I have also noticed if I turn the knob back and fourth several times, rather quickly, the problem goes away for a little while.
Both fixes are really just temporary though, I try and leave it at a set volume, and just either use windows to increase or decrease the volume. (Or my remote, in my case)