# OpenGL uses the Mesa implementation not the NVIDIA

**URL:** <https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073>\
**Category:** Linux\
**Tags:** opengl\
**Created:** [June 28, 2022, 2:08pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073 "2022-06-28T14:08:45Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![xueyun.long](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xueyun.long](https://forums.developer.nvidia.com/u/xueyun.long)\
**Post date:** [June 28, 2022, 2:08pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/1 "2022-06-28T14:08:45Z")

</div>

Dear all,

I want to use OptiX therefore I need the NVIDIA implementation of the OpenGL and it turns out I am using Mesa implementation. I know there are already a lot of post for this, but I tried to reinstall the driver or tried to use the prime-select to nvidia, or tried to change it in the control panel. None of them works, can anyone help me?

The basic information is:  
**Operating system:** Ubuntu 20.04 LTS

**Output of nvidia smi:**  
Tue Jun 28 15:54:00 2022  
±----------------------------------------------------------------------------+  
| NVIDIA-SMI 510.73.05 Driver Version: 510.73.05 CUDA Version: 11.6 |  
|-------------------------------±---------------------±---------------------+  
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |  
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |  
| | | MIG M. |  
|===============================+======================+======================|  
| 0 NVIDIA RTX A6000 Off | 00000000:01:00.0 Off | Off |  
| 30% 33C P8 16W / 300W | 6MiB / 49140MiB | 0% Default |  
| | | N/A |  
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+  
| Processes: |  
| GPU GI CI PID Type Process name GPU Memory |  
| ID ID Usage |  
|=============================================================================|  
| No running processes found |  
±----------------------------------------------------------------------------+

**Output of lshw -class display** :  
WARNING: you should run this program as super-user.  
\*-display  
description: VGA compatible controller  
product: NVIDIA Corporation  
vendor: NVIDIA Corporation  
physical id: 0  
bus info: pci@0000:01:00.0  
version: a1  
width: 64 bits  
clock: 33MHz  
capabilities: vga\_controller bus\_master cap\_list rom  
configuration: driver=nvidia latency=0  
resources: iomemory:2000-1fff iomemory:2000-1fff irq:183 memory:f6000000-f6ffffff memory:20090000000-2009fffffff memory:200a0000000-200a1ffffff ioport:3000(size=128) memory:f7000000-f707ffff  
\*-display  
description: VGA compatible controller  
product: ASPEED Graphics Family  
vendor: ASPEED Technology, Inc.  
physical id: 0  
bus info: pci@0000:69:00.0  
version: 52  
width: 32 bits  
clock: 33MHz  
capabilities: vga\_controller cap\_list rom  
configuration: driver=ast latency=0  
resources: irq:181 memory:c9000000-c9ffffff memory:ca000000-ca03ffff ioport:e000(size=128) memory:c0000-dffff  
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

**Output of lspci | grep -i vga** : (I know I have two graphics and opengl seems to use the ASPEED one)  
01:00.0 VGA compatible controller: NVIDIA Corporation Device 2230 (rev a1)  
69:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 52)

**Output of sudo prime-select query:** (I have made it to nvidia, before it was on-demand)  
nvidia

**Output of nvidia-settings** : (And a blank window of NVIDIA X Server Settings pops out)

ERROR: Unable to load info from any available system

(nvidia-settings:44901): GLib-GObject-CRITICAL \*\*: 15:55:14.096: g\_object\_unref: assertion ‘G\_IS\_OBJECT (object)’ failed  
\*\* Message: 15:55:14.098: PRIME: No offloading required. Abort  
\*\* Message: 15:55:14.098: PRIME: is it supported? no

**xorg.config file content:**

# nvidia-xconfig: X configuration file generated by nvidia-xconfig

# nvidia-xconfig: version 510.73.05

Section “ServerLayout”  
Identifier “Layout0”  
Screen 0 “Screen0”  
InputDevice “Keyboard0” “CoreKeyboard”  
InputDevice “Mouse0” “CorePointer”  
EndSection

Section “Files”  
EndSection

Section “InputDevice”  
# generated from default  
Identifier “Mouse0”  
Driver “mouse”  
Option “Protocol” “auto”  
Option “Device” “/dev/psaux”  
Option “Emulate3Buttons” “no”  
Option “ZAxisMapping” “4 5”  
EndSection

Section “InputDevice”  
# generated from default  
Identifier “Keyboard0”  
Driver “kbd”  
EndSection

Section “Monitor”  
Identifier “Monitor0”  
VendorName “Unknown”  
ModelName “Unknown”  
Option “DPMS”  
EndSection

Section “Device”  
Identifier “Device0”  
Driver “nvidia”  
VendorName “NVIDIA Corporation”  
BusID “PCI:1:0:0”  
EndSection

Section “Screen”  
Identifier “Screen0”  
Device “Device0”  
Monitor “Monitor0”  
DefaultDepth 24  
SubSection “Display”  
Depth 24  
EndSubSection  
EndSection

**Output of glxinfo | grep -i opengl:**  
OpenGL vendor string: Mesa/X.org  
OpenGL renderer string: llvmpipe (LLVM 12.0.0, 256 bits)  
OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.2.6  
OpenGL core profile shading language version string: 4.50  
OpenGL core profile context flags: (none)  
OpenGL core profile profile mask: core profile  
OpenGL core profile extensions:  
OpenGL version string: 3.1 Mesa 21.2.6  
OpenGL shading language version string: 1.40  
OpenGL context flags: (none)  
OpenGL extensions:  
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.6  
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20  
OpenGL ES profile extensions:

Can anyone help me to change the opengl implementation to nvidia? If other information is needed, I will add also.  
Many many thanks in advance!

Long  
[nvidia-bug-report.log.gz](https://forums.developer.nvidia.com/uploads/short-url/aG9O8CQjsEZNaEHUJCa1SLQ5Vyl.gz) (673.1 KB)

---

<div class="post-metadata">

**Author:** ![generix](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/generix/32/16024_2.png) [@generix](https://forums.developer.nvidia.com/u/generix)\
**Post date:** [June 28, 2022, 2:30pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/2 "2022-06-28T14:30:32Z")

</div>

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

---

<div class="post-metadata">

**Author:** ![xueyun.long](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xueyun.long](https://forums.developer.nvidia.com/u/xueyun.long)\
**Post date:** [June 28, 2022, 2:40pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/3 "2022-06-28T14:40:41Z")

</div>

I have added and thanks for the notification!

---

<div class="post-metadata">

**Author:** ![generix](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/generix/32/16024_2.png) [@generix](https://forums.developer.nvidia.com/u/generix)\
**Post date:** [June 28, 2022, 5:05pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/4 "2022-06-28T17:05:20Z")

</div>

Seems the driver was only loaded 10 minutes after boot. Please reboot, then create a new nvidia-bug-report.log.

---

<div class="post-metadata">

**Author:** ![xueyun.long](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xueyun.long](https://forums.developer.nvidia.com/u/xueyun.long)\
**Post date:** [June 29, 2022, 6:14am UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/5 "2022-06-29T06:14:47Z")

</div>

I have reboot and here is the new report. Thanks!  
[nvidia-bug-report.log.gz](https://forums.developer.nvidia.com/uploads/short-url/ecmYj0OEN1sG2cD9QB2O1jiazNp.gz) (585.7 KB)

---

<div class="post-metadata">

**Author:** ![generix](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/generix/32/16024_2.png) [@generix](https://forums.developer.nvidia.com/u/generix)\
**Post date:** [June 29, 2022, 9:06am UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/6 "2022-06-29T09:06:48Z")

</div>

Looks fine, the Xserver is now running on the nvidia gpu. It doesn’t have a monitor connected, though. Are you trying to use OptiX from remote?

---

<div class="post-metadata">

**Author:** ![xueyun.long](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xueyun.long](https://forums.developer.nvidia.com/u/xueyun.long)\
**Post date:** [June 29, 2022, 9:10am UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/7 "2022-06-29T09:10:57Z")

</div>

Yes, I am using this server computer through remote desktop. Is it possible that I can run OptiX like this?

---

<div class="post-metadata">

**Author:** ![generix](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/generix/32/16024_2.png) [@generix](https://forums.developer.nvidia.com/u/generix)\
**Post date:** [June 29, 2022, 9:19am UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/8 "2022-06-29T09:19:21Z")

</div>

rdpserver/vncserver only spawns a virtual Xserver, running on cpu. If you want to use the gpu hw accel, you’ll either have to connect to the real Xserver using x11vnc/vnc0server or set up VirtualGL. Though I don’t know whether VGL is enough to run OptiX.

---

<div class="post-metadata">

**Author:** ![xueyun.long](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xueyun.long](https://forums.developer.nvidia.com/u/xueyun.long)\
**Post date:** [June 29, 2022, 11:06am UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/9 "2022-06-29T11:06:10Z")

</div>

Thanks for the response!  
I want to connect to the real Xserver, so I have now connected the graphics directly to a monitor in the server room and I still wants to access it from remote desktop. So I have installed the x11vnc and run sudo x11vnc and it shows:

29/06/2022 13:01:17 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 41275  
29/06/2022 13:01:17 Using X display :10.0  
29/06/2022 13:01:17 rootwin: 0x510 reswin: 0x3400001 dpy: 0x2135990  
29/06/2022 13:01:17  
29/06/2022 13:01:17 ------------------ USEFUL INFORMATION ------------------  
29/06/2022 13:01:17 X DAMAGE available on display, using it for polling hints.  
29/06/2022 13:01:17 To disable this behavior use: ‘-noxdamage’  
29/06/2022 13:01:17  
29/06/2022 13:01:17 Most compositing window managers like ‘compiz’ or ‘beryl’  
29/06/2022 13:01:17 cause X DAMAGE to fail, and so you may not see any screen  
29/06/2022 13:01:17 updates via VNC. Either disable ‘compiz’ (recommended) or  
29/06/2022 13:01:17 supply the x11vnc ‘-noxdamage’ command line option.  
29/06/2022 13:01:17  
29/06/2022 13:01:17 Wireframing: -wireframe mode is in effect for window moves.  
29/06/2022 13:01:17 If this yields undesired behavior (poor response, painting  
29/06/2022 13:01:17 errors, etc) it may be disabled:  
29/06/2022 13:01:17 - use ‘-nowf’ to disable wireframing completely.  
29/06/2022 13:01:17 - use ‘-nowcr’ to disable the Copy Rectangle after the  
29/06/2022 13:01:17 moved window is released in the new position.  
29/06/2022 13:01:17 Also see the -help entry for tuning parameters.  
29/06/2022 13:01:17 You can press 3 Alt\_L’s (Left “Alt” key) in a row to  
29/06/2022 13:01:17 repaint the screen, also see the -fixscreen option for  
29/06/2022 13:01:17 periodic repaints.  
29/06/2022 13:01:17  
29/06/2022 13:01:17 XFIXES available on display, resetting cursor mode  
29/06/2022 13:01:17 to: ‘-cursor most’.  
29/06/2022 13:01:17 to disable this behavior use: ‘-cursor arrow’  
29/06/2022 13:01:17 or ‘-noxfixes’.  
29/06/2022 13:01:17 using XFIXES for cursor drawing.  
29/06/2022 13:01:17 GrabServer control via XTEST.  
29/06/2022 13:01:17  
29/06/2022 13:01:17 Scroll Detection: -scrollcopyrect mode is in effect to  
29/06/2022 13:01:17 use RECORD extension to try to detect scrolling windows  
29/06/2022 13:01:17 (induced by either user keystroke or mouse input).  
29/06/2022 13:01:17 If this yields undesired behavior (poor response, painting  
29/06/2022 13:01:17 errors, etc) it may be disabled via: ‘-noscr’  
29/06/2022 13:01:17 Also see the -help entry for tuning parameters.  
29/06/2022 13:01:17 You can press 3 Alt\_L’s (Left “Alt” key) in a row to  
29/06/2022 13:01:17 repaint the screen, also see the -fixscreen option for  
29/06/2022 13:01:17 periodic repaints.  
29/06/2022 13:01:17  
29/06/2022 13:01:17 XKEYBOARD: number of keysyms per keycode 15 is greater  
29/06/2022 13:01:17 than 4 and 443 keysyms are mapped above 4.  
29/06/2022 13:01:17 Automatically switching to -xkb mode.  
29/06/2022 13:01:17 If this makes the key mapping worse you can  
29/06/2022 13:01:17 disable it with the “-noxkb” option.  
29/06/2022 13:01:17 Also, remember “-remap DEAD” for accenting characters.  
29/06/2022 13:01:17  
29/06/2022 13:01:17 X FBPM extension not supported.  
Xlib: extension “DPMS” missing on display “:10.0”.  
29/06/2022 13:01:17 X display is not capable of DPMS.  
29/06/2022 13:01:17 --------------------------------------------------------  
29/06/2022 13:01:17  
29/06/2022 13:01:17 Default visual ID: 0x21  
29/06/2022 13:01:17 Read initial data from X display into framebuffer.  
29/06/2022 13:01:17 initialize\_screen: fb\_depth/fb\_bpp/fb\_Bpl 24/32/10240  
29/06/2022 13:01:17  
29/06/2022 13:01:17 X display :10.0 is 32bpp depth=24 true color  
29/06/2022 13:01:17  
29/06/2022 13:01:17 Autoprobing TCP port  
29/06/2022 13:01:17 Autoprobing selected TCP port 5900  
29/06/2022 13:01:17 Autoprobing TCP6 port  
29/06/2022 13:01:17 Autoprobing selected TCP6 port 5900  
29/06/2022 13:01:17 listen6: bind: Address already in use  
29/06/2022 13:01:17 Not listening on IPv6 interface.  
29/06/2022 13:01:17  
29/06/2022 13:01:17 Xinerama is present and active (e.g. multi-head).  
29/06/2022 13:01:17 Xinerama: number of sub-screens: 1  
29/06/2022 13:01:17 Xinerama: no blackouts needed (only one sub-screen)  
29/06/2022 13:01:17  
29/06/2022 13:01:17 fb read rate: 3046 MB/sec  
29/06/2022 13:01:17 fast read: reset -wait ms to: 10  
29/06/2022 13:01:17 fast read: reset -defer ms to: 10  
29/06/2022 13:01:17 The X server says there are 10 mouse buttons.  
29/06/2022 13:01:17 screen setup finished.  
29/06/2022 13:01:17  
29/06/2022 13:01:17 WARNING: You are running x11vnc WITHOUT a password. See  
29/06/2022 13:01:17 WARNING: the warning message printed above for more info.  
29/06/2022 13:01:17

The VNC desktop is: ihe-keros:0  
PORT=5900

* * *

Have you tried the x11vnc ‘-ncache’ VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster  
retrieval. It should work with any VNC viewer. Try it by running:

```
x11vnc -ncache 10 ...

```

One can also add -ncache\_cr for smooth ‘copyrect’ window motion.  
More info: [http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching](http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching)

Sorry that I am quiet new to linux and I am not sure if I am doing it correctly. But now the OptiX still doesn’t work. Can you help me with this?

Thanks in advance!  
Long

---

<div class="post-metadata">

**Author:** ![generix](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/generix/32/16024_2.png) [@generix](https://forums.developer.nvidia.com/u/generix)\
**Post date:** [June 29, 2022, 12:25pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/10 "2022-06-29T12:25:27Z")

</div>

> [@xueyun.long](#):
>
> Using X display :10.0

You connected to the ssh forwarded connection from your client.  
Of course, you need to connect to the server’s Xserver :0  
x11vnc -display :0

---

<div class="post-metadata">

**Author:** ![xueyun.long](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xueyun.long](https://forums.developer.nvidia.com/u/xueyun.long)\
**Post date:** [June 29, 2022, 1:04pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/11 "2022-06-29T13:04:18Z")

</div>

Then I have tried to run sudo x11vnc -display :0, the output is :

29/06/2022 15:02:02 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 54036  
No protocol specified  
29/06/2022 15:02:02 XOpenDisplay(“:0”) failed.  
29/06/2022 15:02:02 Trying again with XAUTHLOCALHOSTNAME=localhost …  
No protocol specified

29/06/2022 15:02:02 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
29/06/2022 15:02:02 \*\*\* XOpenDisplay failed (:0)

\*\*\* x11vnc was unable to open the X DISPLAY: “:0”, it cannot continue.  
\*\*\* There may be “Xlib:” error messages above with details about the failure.

---

<div class="post-metadata">

**Author:** ![generix](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/generix/32/16024_2.png) [@generix](https://forums.developer.nvidia.com/u/generix)\
**Post date:** [June 29, 2022, 2:01pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/12 "2022-06-29T14:01:22Z")

</div>

You’re likely connecting to the gdm login screen, this requires running as user gdm and setting the correct -auth (ps a |grep X).  
Doesn’t matter though since after login, gdm spawns a new Xserver for the user session so you would lose the connection. Please switch to e.g. lightdm.

---

<div class="post-metadata">

**Author:** ![xueyun.long](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xueyun.long](https://forums.developer.nvidia.com/u/xueyun.long)\
**Post date:** [June 29, 2022, 2:35pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/13 "2022-06-29T14:35:26Z")

</div>

I have now installed and changed to lightdm,output of cat /etc/X11/default-display-manager:  
/usr/sbin/lightdm  
and I tried sudo x11vnc -display :0 again, still gives the same results.

After searching a little bit, maybe I should turn on the x11vnc using the monitor in the server room (which is directly connected to the graphics, but not turn on x11vnc using the remote desktop?), and then I can connect with the Xserver from my windows computer using vnc viewer?  
Does that make sense?

---

<div class="post-metadata">

**Author:** ![generix](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/generix/32/16024_2.png) [@generix](https://forums.developer.nvidia.com/u/generix)\
**Post date:** [June 29, 2022, 7:29pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/14 "2022-06-29T19:29:18Z")

</div>

You still have to set -auth.

---

<div class="post-metadata">

**Author:** ![xueyun.long](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xueyun.long](https://forums.developer.nvidia.com/u/xueyun.long)\
**Post date:** [July 1, 2022, 8:45am UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/15 "2022-07-01T08:45:15Z")

</div>

Thanks! It works now and really appreciate your patience and time! Have a nice weekend!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [July 20, 2022, 12:17pm UTC](https://forums.developer.nvidia.com/t/opengl-uses-the-mesa-implementation-not-the-nvidia/219073/16 "2022-07-20T12:17:14Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
