Is it possible to upgrade OpenGL to version 4.3 on Google Compute Engine with GPU Grid drivers? - opengl

I tried to set up a Google Compute Engine with Ubuntu 20.4 using GPU Grid drivers ( NVIDIA Tesla P100 Virtual Workstation). Since I need CUDA 10.2 for my project which requires TensorFlow 1.15 I installed this GPU Grid driver as recommended on Google Cloud document site and here is the result.
NVIDIA-SMI 440.87 Driver Version: 440.87 CUDA Version: 10.2
I supposed that NVIDIA Tesla P100 supports Opengl 4.5 as it is mentioned on Tesla release notes. However, after connecting to this VM with a visual remote connection (I used NoMachine), I ran this command [glxinfo | grep "OpenGL"] to double-check, it showed OpenGL version 1.4 only
OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string: 1.4 (2.1 Mesa 13.0.2)
OpenGL extensions:
The problem is that the application I am trying to run on this VM (Carla simulator) requires Opengl 4.3++, I just wonder if there is any way to upgrade Opengl to version 4.3?

According to the last comment, preloading a library for the NVIDIA driver, where the NVIDIA GPU may also be detected as a secondary video card is a good option you can take since you can get your software to use the actual hardware. Were you able to try this suggestion?

I've filed a Feature Request on your behalf for the product team to check if it is possible to evaluate the possibility to implement the functionality that fits your use case, you can follow up on this PIT [1], where you will be able to receive further updates from the team as well
Keep in mind that there is no ETA, nor guarantee that this will be implmented. However, please feel free to ask for updates directly on the PIT.
[1] https://issuetracker.google.com/168843661

Related

New mesa installed but glxinfo show the older one

I am doing some work using Google Cloud Platform,that's to say I use ssh to login. When I run a script(mayavi/test_drawline.py) from others, it tells me:
ERROR: In /work/standalone-x64-build/VTKsource/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 797 vtkXOpenGLRenderWindow (0x3987b00): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2.
So I think I need to up upgrade my mesa. Before that, the glxinfo shows:
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL version string: 1.4 (2.1 Mesa 10.5.4)
I followed the instruction from How to upgrade mesa, but the glxinfo didn't change.
And I tried to compile Mesa from source code. So I followed the instruction from Mesa official website Compiling and Installing. I use
Building with autoconf (Linux/Unix/X11). All things are OK, it seemed that I have installed the newest Mesa.
However, when I run glxinfo| grep version again, it still like this:
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL version string: 1.4 (2.1 Mesa 10.5.4)
I have tried reboot, but it doesn't work.
So, does anyone know how to solve it?
Thank you!
The OpenGL version reported depends on the available Mesa version only be second degree. You're reported GLX-1.4 and OpenGL-1.4 which is an absolute baseline version dating back over 15 years ago. So this is not a Mesa version problem.
What far more likely is, that you're trying to create a OpenGL context in a system configuration which simply can't do more than OpenGL-1.4 without resorting to software rendering. Now one reason for that could be, that you're connecting via SSH using X11 forwarding. In that case all OpenGL commands would be tunneled through the X11 connection (GLX) to your local machine and be executed there. However GLX is very limited in it's OpenGL version profile capabilities. Technically it's supporting up to OpenGL-2.1 (which is the last OpenGL version, that defines GLX transport opcodes for all its functions). But a given configuration might support less.
If the remote machine does have a GPU, you have to use that. A couple of years ago, this would have meant running a Xorg server there. Not anymore. With NVidia GPUs you can use headless EGL. With Intel and AMD GPUs you can also use headless EGL, or use GBM/DRI to create a headless GPU accelerated OpenGL context. Of course this requires a GPU being available on the remote end.
If you don't have a GPU on the remote site, you must use some software implementation. Which with Mesa unfortunately doesn't work with a forwarded X11 session. Your best bet would be running something like Xpra, or Xvnc (i.e. some kind of remote framebuffer), where the X server runs on the remote end, so that the GLX connection terminates there, and not on your local machine.
Or you somehow coax the program you're building to use OSMesa (Off-Screen Mesa), but that requires entirely different OpenGL context setup, entirely different from what's done with GLX, so your VTK application may not work out of the box with that.

How can I check which Version of OpenGL is supported on a linux system with optirun?

I have had a lot of problems / confusion setting up my laptop to work for OpenGL programming / the running of OpenGL programs.
My laptop has one of these very clever (too clever for me) designs where the Intel CPU has a graphics processor on chip, and there is also a dedicated graphics card. Specifically, the CPU is a 3630QM, with "HD Graphics 4000" (a very exciting name, I am sure), and the "proper" Graphics Processor is a Nvidia GTX 670MX.
Theoretically, according to Wikipedia, the HD Graphics Chip (Intel), under Linux, supports OpenGL 3.1, if the correct drivers are installed. (They probably aren't.)
According to NVIDIA, the 670MX can support OpenGL 4.1, so ideally I would like to develop and execute on this GPU.
Do I have drivers installed to enable me to execute OpenGL 4.1 code on the NVIDIA GPU? Answer: Probably no, currently I use this "optirun" thing to execute OpenGL programs on the dedicated GPU. See this link to see the process I followed to setup my computer.
My question is, I know how to run a compiled program on the 670MX; that would be 'optirun ./programname', but how can I find out what OpenGL version the installed graphics drivers on my system will support? Running 'glxinfo | grep -i opengl' in a terminal tells me that the Intel Chip supports OpenGl version 3.0. See the below information:
ed#kubuntu1304-P151EMx:~$ glxinfo | grep -i opengl
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
OpenGL version string: 3.0 Mesa 9.1.3
OpenGL shading language version string: 1.30
OpenGL extensions:
How do I do the same or similar thing to find out what support is available under 'optirun', and what version of OpenGL is supported?
Update
Someone suggested I use glGetString() to find this information: I am now completely confused!
Without optirun, the supported OpenGL version is '3.0 MESA 9.1.3', so version 3, which is what I expected. However, under optirun, the supported OpenGL version is '4.3.0 NVIDIA 313.30', so version 4.3?! How can it be Version 4.3 if the hardware specification from NVIDIA states only Version 4.1 is supported?
You can just run glxinfo under optirun:
optirun glxinfo | grep -i opengl
Both cards have different features, so its normal to get different OpenGL versions.

JOGL throws errors in atio6axx.dll

In attempting to do some OpenGL development using JOGL, I persistently get the following error:
# Problematic frame:
# C [atio6axx.dll+0x73a32]
Hunting around the web pointed this squarely at AMD video drivers, and strongly suggests that updating my drivers was in order.
Problem:
I have an HP Pavilion dv6-3206ax, which has actually TWO GPUs on board, one high-power and fast, the low power and assumably slower.
The standard AMD Catalyst installation doesn't like this configuration, so I can only use the drivers from the HP support site.
The video card(s) are:
ATI Mobility Radeon HD 6550 and
AMD M880G with ATI Mobility Radeon HD 4250
NB: I can force the latest drivers for the 6550 to install by navigating to the AMD Radeon display driver directory, and that does allow JOGL to run. But it also causes my laptop to overheat.
They haven't been updated in two years, and I already have the latest. Help?
I had to downgrade my AMD graphics driver to 20.4.2
I have found a solution of sorts.
If I use the ATI PowerXpress to manually select the "Power Saving GPU", OpenGL works.
This is good enough for my purposes at the moment.
I had to download and install the latest AMD High-Definition Graphics Driver from the HP Support site to get ATI PowerXPress to work at all.
Try what this chap did, from the section of 'manually uninstall drivers'.
What a legend!
http://us.battle.net/wow/en/forum/topic/6794729581

Can I programming OpenGL4+ in a card that support 2.1 only?

This is the OpenGL version I have:
Video Card Vendor: Intel
Renderer: Intel(R) HD Graphics
OpenGL Version: 2.1.0 - Build 8.15.10.2622
GLU Version: 1.2.2.0 Microsoft Corporation
I'd like to learn the latest OpenGL API. But my card supports only 2.1 (and I cant update). Is it possible to program in latest API even with no card support?
AshleysBrain's answer is not quite correct. You can use a software implementation of OpenGL such as Mesa3D which can execute newer code using your CPU instead of your GPU. It will be slower but will allow you to compile and run your 4+ code against it OpenGL 3.1 code against it.
Edit: just checked, it seems Mesa only supports up to OpenGL 3.1. Still; that's pretty good for free.
It's more to do with what version the driver supports. Try updating your driver and see if it supports a newer version. Otherwise I'm afraid you're stuck with that version, there's nothing else you can do!
Send money/time Mesa's way in the hope they'll support GL4 in their software rasterizer sometime soon.
Or pester Khronos for a reference implementation.
As of Mesa 20.2 llvmpipe supports OpenGL 4.5.
Intel(R) HD Graphics are usually onboard.So NO you can't use GPU accelerated OpenGL 4.2 with this.You need dedicated card like those of Nvidia.The highest version of OpenGL I have seen on the dedicated cards is 3.1 which still delivers fixed pipeline API with Shaders support.But OpenGL 4.2 has completely removed all this and uses programmable way of doing things which requires programmable hardware too.

OpenCL doesn't find ATI card

I have a notebook with ATI Mobility Radeon HD 5650, and want to use the card for computing =) After installing AMD APP SDK v.2 (installation was OK) I tried to run code samples, provided with AMD. But there is a problem: when I run a sample, it doesn't find my ATI card - in the list of available OpenCL devices there is only CPU (Intel Core i5), but not GPU.
How to solve this problem and run some code on GPU?
Your video card drivers must support OpenCL. I suggest you try downloading the newest drivers from your vendor. Unfortunately most mobile graphic cards are supported by the distributor of the PC and not of the graphics card vendor, so I am not sure if you can find any according drivers.
Not all ATI's GPU support OpenCL, looking into the list of supported devices you can see that this card is not there, neither with beta support. So basically you can only buy different card (what can be rather problematic with a laptop).
I have the same problem in my Acer 3820TG. However, the OpenCL programming is needed the driver version over 8.753.1. It seems that Acer doesn't support in currently.
One way to overcome this problem is to force install the newer mobility drivers from AMD.
You can follow the the steps from:
http://www.sevenforums.com/drivers/177042-force-install-drivers.html
and then try the related-stable driver to install.
(It means it also supports the HD5650-M , but it is different SUBSYS num.)
In my testing, don't install the newest driver(Or you would have the OSDC problem). I install the driver version at about 8.79-8.80(10-11_vista64_win7_64_dd_ccc or
10-12_vista64_win7_64_dd_ccc) and then it seems that it can work.