Artifacts and crashes after switching to another TTY and back

First: I don’t know if this issue is specific to CS:GO, or affects other fulscreen OpenGL games. I reported it also on CS:GO issue tracker.
The issue is: if you play CS:GO (probably also other fulscreen OpenGL games), switch to another TTY while playing, and switch back, massive visual artifacts appear, the only solution is game restart. Sometimes, when this bug is happening and you alt-tab out of the game and then back, or switch TTY’s few times, game crashes. Video of bug, crashdumps, setup info are provided here . Don’t know if this is problem of Nvidia drivers or CS:GO, maybe both.

Currently I use KDE on TTY1, handled by Intel’s iGPU, and OpenBox WM on TTY2 handled by GTX970 (thanks to nvidia-xrun . Game is running in TTY2.
I thought it may be a problem of the setup, but the issue also happens with more basic configuration (TTY1 with KDE powered by GTX970)
nvidia-bug-report.log.gz (152 KB)

Nvidia bug report taken with artifacts visible:
@edit Attatched to the first post.

It would be really nice to get any response.

You’re still using the intel driver with sna accel for Prime, that’s not really supported anymore. Use the modesetting driver instead.
You should change /etc/X11/xorg.conf.d/90-mhwd.conf

Edit: forget about it, have to think about your current setup.

Section "Device"
    Identifier  "Device0"
    Driver      "intel"
    BusID       "PCI:0:2:0"
    Option      "AccelMethod" "sna"
	Option      "DRI"    "true"


Section "Device"
    Identifier  "Device0"
    Driver      "modesetting"
    BusID       "PCI:0:2:0"
    Option      "AccelMethod" "none"

and delete

Section "Extensions"
    Option "Composite" "Enable"
    Option "RENDER"    "Enable"

Then retry.

On second look, what kind of device is this, an Optimus laptop or a desktop with the iGPU still active?
One Xserver at :0 is running the intel driver, one Xserver at :1 modesetting+nvidia?
Edit: Ok, looks like a desktop with some creative setup…

Putting your setup aside, cs:go crashes in glibc. Can you actually install a glibc with debug symbols so you could get a meaningful backtrace?
Did you try with something simple like glxgears?
Did you try with a plain Xserver, i.e. without kwin and its known problems with the nvidia driver?