Frequent freezes when playing Binding of Isaac with GTX 1050

When playing the Binding of Isaac: Afterbirth through Steam, I get fairly frequent freezes lasting for several seconds, where the entire system stops responding (though audio keeps playing); immediately after every freeze, a message like this appears in /var/log/Xorg.0.log:

nvLock: client timed out, taking the lock

The freezes appear to only happen after a suspend/resume cycle; after rebooting, I played for over an hour without suspending and did not observe any freeze, but after suspending the system overnight, I got a freeze within maybe 15 minutes. I haven’t observed this with other games.

I’m using a laptop with hybrid Intel/Nvidia graphics, running Ubuntu 18.04; the dGPU is a GTX 1050. The drivers I’m using are version 390.77, installed via the Ubuntu settings.
nvidia-bug-report.log.gz (160 KB)

Some updates:

  • This isn't limited to the Binding of Isaac, it also happens in Chrome after the game is closed.
  • The issue persists on driver 410.78.