Why might Eigen calls cause video corruption?

46 Views Asked by At

When I run some C++ code that uses the Eigen library, bars of corruption appear on my external monitor. Not immediately, but after a few seconds or minutes. I'm using the SparseMatrix, VectorXd, and BiCGSTAB classes. When I run the code without the Eigen calls, the problem does not occur. I'm using an Optimus-enabled laptop. The corruption never appears on my built-in monitor.

Other observations:

  • Turning the external monitor off and on again fixes the problem temporarily.
  • Windows vs. Linux makes no difference.
  • Nouveau vs. NVIDIA drivers make no difference.
  • Screen resolution makes no difference; HDMI vs. DisplayPort makes no difference.
  • For a while, the corruption only appeared when making Eigen calls. Then it started happening when using unrelated software (e.g., Firefox, Evince), but not as frequently as with my Eigen-calling code. So I swapped out my dGPU (GeForce 940mx) for a used one off eBay. I expected this would either solve the problem or change nothing. To my bewilderment, it brought things back to the earlier state, where running my Eigen code causes corruption, but not other software.
  • Someone told me my dGPU renders my external monitor, but when swapping out my dGPU, I saw that my HDMI and DisplayPort appear wired to the motherboard, not the graphics daughter board. I think that means my iGPU (Intel HD 620) is rendering video for my external monitor after all?
  • My code is userspace, no root privilege.
  • Valgrind doesn't show any leaks.

I expect there's hardware trouble involved somehow and that this is not a bug in Eigen. But I'm lost, and Eigen has something to do with it, so I'm hoping some people following the Eigen tag here might have a thought.

0

There are 0 best solutions below