Xid errors after resuming from suspend

Hi!
Sometimes after resuming from suspend to RAM I have these errors in my log:

мар 01 16:54:49 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:54:54 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:54:54 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:54:54 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:54:57 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:54:57 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:55:03 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:55:03 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:55:09 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:55:14 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:55:14 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:55:19 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:55:29 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:55:34 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:55:44 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:55:49 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:55:51 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:55:54 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:56:04 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:56:09 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:56:19 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:56:24 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:56:34 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001
мар 01 16:56:39 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000075c 0001004f 00000004 00000001
мар 01 16:56:49 linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 56, CMDre 00000000 0000045c 0001004b 00000004 00000001

After that it is very likely to get GPU hang in games with this error:

linux-cgf4.suse kernel: NVRM: Xid (PCI:0000:01:00): 31, Ch 00000062, intr 10000000. MMU Fault: ENGINE GRAPHICS GPCCLIENT_T1_1 faulted @ 0xff_baa8a000. Fault is of type FAULT_PRIV_VIOLATION ACCESS_TYPE_READ
System:    Host: linux-cgf4.suse Kernel: 4.12.14-lp150.12.48-default x86_64 bits: 64 Desktop: KDE Plasma 5.12.6
           Distro: openSUSE Leap 15.0
Machine:   Device: desktop Mobo: ASUSTeK model: P8Z77-V LE PLUS v: Rev X.0x serial: N/A
           BIOS: American Megatrends v: 0910 date: 03/18/2014
CPU:       Quad core Intel Core i7-3770 (-HT-MCP-) cache: 8192 KB
           clock speeds: max: 4300 MHz 1: 3400 MHz 2: 3400 MHz 3: 3400 MHz 4: 3400 MHz 5: 3400 MHz 6: 3400 MHz
           7: 3400 MHz 8: 3400 MHz
Graphics:  Card: NVIDIA GK104 [GeForce GTX 660 Ti]
           Display Server: x11 (X.Org 1.19.6 ) driver: nvidia Resolution: 1920x1080@60.00hz, 1920x1080@60.00hz
           OpenGL: renderer: GeForce GTX 660 Ti/PCIe/SSE2 version: 4.5.0 NVIDIA 418.31.03

This happens with 415.27 driver too.
Any thoughts?

I got this GPU error a couple time since installing the 418.43 driver, when running Wine applications using Vulkan.

I don’t suspend the machine anymore, however. This is regularly causing screen tearing in many steam games. The NVidia driver doesn’t like suspend.

Does the error disappear if you manually set a console resolution that resembles your Xorg resolution? My grub.cfg file looks like this for example (Notice the line in bold characters).

set timeout=5
menuentry 'Arch Linux' {
        set root='hd0,1'
        <b>set gfxpayload=1920x1080</b>
        linux /vmlinuz-linux-lts cryptdevice=/dev/sda3:root resume=/dev/mapper/swap root=/dev/mapper/root ro
        initrd /intel-ucode.img /initramfs-linux-lts.img
}

I think you can fix XID 31 by enabling persistence mode.