I recall encountering this problem in different GM games in the past, lag happens randomly just when you have a gamepad plugged in (no need for any software running in particular even). As soon as you unplug it, it's fine. I don't remember the precise cause, but I will see if there is anything that can be done about it.