Writing to give you an update on the subject. So I might have mentioned that Lenovo technician came to replace my motherboard on thursday, but it didn't help. I wrote that to them and they now will probably want laptop to go to the service again. I told them it's probably NVIDIA Optimus that's why nothing helps, but they insisted anyway.
So in the meantime I've been messing around to get consistent repro steps of how to get stutters on both NVIDIA and AMD GPU. I have noticed several very interesting things about the stutters:
1. There is one type of stutters every 10-20 seconds when you unplug laptop from power, but there are two ways to trigger them.
1.1. One way to trigger them is to just run a stock Windows application on NVIDIA GPU. The stutters will appear immediately and will affect every application running on iGPU. Interesting enough, applications running on dGPU won't be affected.
1.2. Another way to trigger them is to plug in external monitor. This forces all Windows apps to be run through NVIDIA GPU for some reason, so the moment you unplug the monitor, stutters will appear on iGPU.
1.3. Plugging in external monitor will remove stuttering. Turning off applications running on NVIDIA GPU will also turn them off.
2. The second way is to make stutters appear on iGPU without the use of NVIDIA. I think this only happens when you use your laptop with external display, then unplug it, wait for all the apps on dGPU to turn off, and then hibernate it. After waking laptop up iGPU will stutter even though no app is running on dGPU.
2.1. In this case turning ON an application that runs on dGPU will make the stutters disappear.
2.2. On Lenovo you can also use CTRL+SHIFT+WIN+B key combination to restart GPU drivers. This will stop stuttering on iGPU, but then running apps on dGPU will cause them (so way one applies here).
Another interesting thing I have noticed: when stutters occur, overlays show that for some reason GPU PCIE Rx jumps from 0mb/s to 123 mb/s while GPU PCIE Tx jumps from 0 to 13mb/s. This disappears when you plug laptop to power or when you plug in external display.
So there are three factors affecting it:
1. Power source - unplugging causes stutters
2. Display - external display removes stutters
3. Windows - stutters are caused by stock Windows applications
It is possible that hibernation might be the factor no 4.