Hello to everyone.
I’ve been trying to use the nvidia driver alongside with opengl and mesa, i want to use the intel integrated card for X server and opengl and load the nvidia driver to be able to launch cuda executables and easily debug them.

The problem is that if i just load the nvidia driver with a simple xorg.conf:
Section “Device”
Identifier “nvidia”
Driver “nvidia”
Option “ConstrainCursor” “off”
, then opengl won’t work correctly.

I understood the problem might be ralated to the wrong library loaded in the /usr/lib/xorg/modules/extensions/ by xorg.

Did anyone manage to use intel for X and opengl and load nvidia drive?

read the linux install guide, it will indicate the process to load the driver. look for no-opengl

After you have loaded the driver without disturbing OpenGL, make sure that the xorg.conf makes no reference to the NVIDIA GPU.

Thanks for the answer.
I noticed my libGL was that of nvidia and not the mesa one and that was the problem.

yes, you can avoid that (on install) using the method I indicated.