Lag spikes when running games using the NVIDIA GPU on an Optimus laptop

What appears to have fixed it is commenting out the line services.thermald.enable = true. I accidentally didn’t create this post under the “Help” thread, so I cannot set this as SOLVED.