Steam games freezes / crash when using the RTX 4090

I am on ubuntu 22.10 with the 5.19 kernel and using the 525 Nvidia driver. Every time CSGO crashes and I check the dmesg I see this:

NVRM: GPU at PCI:0000:01:00: GPU-db60072d-5d03-b319-8c6c-ff6fc28b962c
[ 1588.693616] NVRM: Xid (PCI:0000:01:00): 13, pid=‘’, name=, Graphics Exception: Class 0x0 Subchannel 0x0 Mismatch
[ 1588.693622] NVRM: Xid (PCI:0000:01:00): 13, pid=‘’, name=, Graphics Exception: ESR 0x4041b0=0x0
[ 1588.693629] NVRM: Xid (PCI:0000:01:00): 13, pid=‘’, name=, Graphics Exception: ESR 0x404000=0x80000002
[ 1588.694186] NVRM: Xid (PCI:0000:01:00): 13, pid=15806, name=csgo_linux64, Graphics Exception: ChID 0033, Class 0000c997, Offset 00000100, Data deaddead
[ 2402.940321] traps: csgo_linux64[15806] general protection fault ip:7f78cf5ec65e sp:7fff45bda3df error:0 in client_client.so[7f78ce200000+1e10000]

When this happens, it looks like the Monitor disconnects (or the video card stops or goes to sleep) then comes back up and I can see the monitor notification about the resolution it is using showing again (Like the system would have rebooted), then it blinks a black screen and comes back to the game ONLY if I alt-tab and come back to it. Anyone looking at me ingame thinks I am AFK but it is going through this process for about 10 seconds. It looks like a crash, but it actually comes back after several seconds, but it feels like the video card went to sleep (I am not in a laptop just in case).

The only changes I have done are the grub parameters here

GRUB_CMDLINE_LINUX=“pcie_aspm=off mitigations=off split_lock_detect=off intel_idle.max_cstate=1”

Which ended up being a collection of things trying to solve other issues with the previous driver version of Nvidia.

What can be done to try to avoid the problem?
nvidia-bug-report.log.gz (440.9 KB)

Here is the latest one a couple of seconds ago:

[ 1588.693613] NVRM: GPU at PCI:0000:01:00: GPU-db60072d-5d03-b319-8c6c-ff6fc28b962c
[ 1588.693616] NVRM: Xid (PCI:0000:01:00): 13, pid=‘’, name=, Graphics Exception: Class 0x0 Subchannel 0x0 Mismatch
[ 1588.693622] NVRM: Xid (PCI:0000:01:00): 13, pid=‘’, name=, Graphics Exception: ESR 0x4041b0=0x0
[ 1588.693629] NVRM: Xid (PCI:0000:01:00): 13, pid=‘’, name=, Graphics Exception: ESR 0x404000=0x80000002
[ 1588.694186] NVRM: Xid (PCI:0000:01:00): 13, pid=15806, name=csgo_linux64, Graphics Exception: ChID 0033, Class 0000c997, Offset 00000100, Data deaddead
[ 2402.940321] traps: csgo_linux64[15806] general protection fault ip:7f78cf5ec65e sp:7fff45bda3df error:0 in client_client.so[7f78ce200000+1e10000]
[ 3525.507037] traps: Compositor[21663] trap invalid opcode ip:560c3ff9e236 sp:7f9af99f8a58 error:0 in chrome[560c3f9df000+9fc8000]
[ 3549.668229] NVRM: Xid (PCI:0000:01:00): 32, pid=21747, name=csgo_linux64, Channel ID 00000033 intr0 00040000
[ 3549.668919] NVRM: Xid (PCI:0000:01:00): 32, pid=21747, name=csgo_linux64, Channel ID 00000033 intr0 00040000
[ 3584.011681] NVRM: Going over RM unhandled interrupt threshold for irq 236
[ 3584.743438] NVRM: Going over RM unhandled interrupt threshold for irq 236

And here is the report in the original question.

OKay it looks like all games are having this issue after a couple of minutes of playtime. For example cyberpunk was working fine, but after the 525.60 update I get this after about 3 minutes:

[ 4123.266915] NVRM: GPU at PCI:0000:01:00: GPU-db60072d-5d03-b319-8c6c-ff6fc28b962c
[ 4123.266917] NVRM: Xid (PCI:0000:01:00): 109, pid=31275, name=GameThread, Ch 00000036, errorString CTX SWITCH TIMEOUT, Info 0xac01a