[Question] Support of nvidia eGPU with nvidia Optimus GPU ?
See original GitHub issueHi , I recently acquired an eGPU enclose and equipped it with and RTX2060 to work on CAD because my MX150 was struggling a little on some projects. On Windows 10, thanks to the Nvidia driver, switching between the two GPU is really easy and it made me wondering if something similar could be achieved on linux thanks to this tool.
I’m running an ArchLinux (kernel 5.3.1) with Xorg 1.20.5, nvidia driver 435.21 and optimus-manager 1.2
I configured the xorg-nvidia-config
with the following lines to enable the support of eGPU and eGPU outputs:
Option "AllowExternalGpus" "true"
Option "AllowEmptyInitialConfiguration" "true"
I run the nvidia-smi and saw that my eGPU was indeed loaded:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce MX150 Off | 00000000:01:00.0 Off | N/A |
| N/A 42C P0 N/A / N/A | 411MiB / 2002MiB | 2% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce RTX 2060 Off | 00000000:09:00.0 Off | N/A |
| 0% 34C P8 6W / 170W | 1MiB / 5934MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 7931 G /usr/lib/Xorg 202MiB |
| 0 8042 G /usr/bin/kwin_x11 121MiB |
| 0 8053 G /usr/bin/plasmashell 71MiB |
+-----------------------------------------------------------------------------+
But when i ran the glxinfo utility, i saw that my optimus GPU is still being used as the OpenGL renderer:
lucasgrelaud@lg-laptop ~]$ glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 2048 MB
Total available memory: 2048 MB
Currently available dedicated video memory: 1589 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce MX150/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 435.21
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6.0 NVIDIA 435.21
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 435.21
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
So i’m wondering if I can disable the MX150 so the RTX2060 willl be set as the main OpenGL / Xorg rernderer and use its power under archlinux.
Any idea of the feasibility of this request ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@Askannz I know this is closed, but i had the same problem and i think i have a solution. i would make a pull request for this, but lets check first if this is a sane idea. I saw that optimus-manager looks for the available nvida gpu bus ids and picks the first one. Would it be an idea to give a “preferred bus id” or “prefered product ID” option in the config for nvidia cards. If then the eGPU is not connected, the dGPU will be selected, but if it is connected the eGPU will be selected. the eGPU will then act as the dGPU.
I would like this feature in optimus-manager because:
If you like the idea i will start to make it and make a pull request in the near future
@MilesConn no I didn’t get a response so I didn’t bother with it anymore. Maybe someone else did?