How to lock CPU speed?

While using retroarch on battery with battery saver turned off on my Moto E6, I’ve managed to dial in the settings for perfectly smooth scrolling and no crackling audio with threaded video on. However when I plug the phone in to charge the battery it starts stuttering all of a sudden. Does charging or running on battery change the CPU speed and how can I get retroarch to lock in the CPU speed at high performance in both modes?

Check whether your device has separate power consumption profiles for plugged/unplugged status.

No the only thing I see is adaptive battery in my settings but that is turned off. Will sustained performance mode in retroarch help keep the CPU from changing speed and keep it at Max performance?

It doesn’t keep it at max perf, AFAIK, but rather somewhat below max to provide a consistent, sustainable temp.

Well, I didn’t want to have to root my device just to install SET CPU app to lock in the CPU speed because it opens my phone to root kits/malware and such. Not sure if SET CPU could prevent CPU speeds from changing while charging or on battery.