# NVIDIA Optimus configuration



## ldgc (Oct 31, 2017)

Branch: 11.1-Release
VGA: Intel graphics HD 620
3D: GeForce 940 MX

Observations:
1)  No BIOS option to disable one of the graphics adapters
2)  Intel graphics card is a Kabylake, so doesn't work on 11.1-Release 

Is it possible to disable Intel card and enable Nvidia card with /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf? 
If so, I would like to know how.

Thanks in advance


----------



## monwarez (Oct 31, 2017)

You could try following some instruction on : https://wiki.freebsd.org/OptimusVideoSupport for the nvidia xorg conf.
You will then have no glx extension when the primary X server start. But the second one, with the nvidia configuration may work.
You can then use VirtualGL to launch your application on the nvidia card.
It is not a real optimus configuration, since with the actual port, when installing nvidia driver, it is not possible to use
OpenGL application (since glx extension is disabled).
Here is some step that worked for me (note that I have my intel driver that is supported).
* First having nvidia-modeset in my kld_list
* Start my session as usual, then launch in bg (or in a terminal mutiplexer) : `X -config xorg.conf.nv -sharevts -noreset :8`
* and launch a program on the nvidia card: `/usr/local/VirtualGL/bin/vglrun -d ":8" application`


----------



## ldgc (Oct 31, 2017)

monwarez said:


> You could try following some instruction on : https://wiki.freebsd.org/OptimusVideoSupport for the nvidia xorg conf.
> You will then have no glx extension when the primary X server start. But the second one, with the nvidia configuration may work.
> You can then use VirtualGL to launch your application on the nvidia card.
> It is not a real optimus configuration, since with the actual port, when installing nvidia driver, it is not possible to use
> ...


Could it be like this: 

```
Section "Device"
   Identifier "nvidia"
   Driver "nvidia"
   BusID "<BusID for NVIDIA device here>"
   Option "AllowEmptyInitialConfiguration"
EndSection
```


----------



## monwarez (Oct 31, 2017)

Yes it should be enough, just try it and see. A simple way is to launch glxinfo with virtualgl to see if the nvidia driver is used


----------

