I am running Ubuntu 22.04.2 LTS
in a dual monitor setup and whenever a monitor is turned off, VS Code starts to lag in another monitor significantly
It starts taking around 1-5 seconds to register key strokes and sometimes after cursor is moved by arrow keys it just keep jumping back and forth from new location to old location.
System configuration:
intel core i5 8400
16 gb RAM
RTX 2060
I have tried Reinstalling Nvidia Graphic Driver multiple times, Also upgraded to new version and issue is still the same. Everything works fine in recovery mode though.
I have also tried installing the driver from nvidia's official site it made the system unbootable, I had to go in recovery mode and reinstall the driver from ppa to boot in normal mode. Issue is still the same.
I also couldn't see any significant jump in CPU or GPU usage when it starts to lag.
When i switch to vscode from any other apps it works smoothly for 5-10 seconds and then starts to lag again.
Ideally it should lag when both monitor is turned on since the load gets higher but for my case it lags when only single monitor is on and works smoothly when both monitors are on.
My Solution was to either turn on the second monitor, or just work in recovery mode.
Since one of my monitor died recently i am working in recovery mode as the lag is unbearable.