Playing games with nvidia card kills X server

nvidia-bug-report.log.gz (347.2 KB)

When playing games with prime-run steam, after sometime, the screen is stuck, keyboard and mouse are unresponsive. I had to hard reboot my laptop. But when playing games with the integrated intel gpu, i.e. without the prime-run, games run fine.

Later I ran steam from the terminal, dumping the output into a file, just when the screen is stuck steam reported this:
X IO error received (X server probably went away)

I ssh-ed from another device when the screen was stuck to run the which is attached above.

You’re running into

[   658.642] (WW) modeset(0): flip queue failed: Invalid argument
[   658.642] (WW) modeset(0): Page flip failed: Invalid argument
[   658.642] (EE) modeset(0): present flip failed

Seems to be a bug in the modesetting driver triggered by kernel 5.11: