OpenGL version issue with Panda3d - python

I am trying to get Panda3d set up and running correctly. I keep getting this error when I try to render a model with the 'pview' method,
:display:gsg:glgsg(warning): Driver possibly misreported GL_VERSION!
Unable to detect correct OpenGL version.
I'm using windows 10 OS, OpenGL 4.5, NIVIDIA Quadro P3200 and Intel graphics card. I've already changed the global settings in the NIVIDIA control panel to use the NIVIDIA GPU by default. Any ideas on how to fix this error and start redering 3d models with panda3d?

Related

Python OpenCV with Cuda not working after successful build

I am on Windows 10, using Python 3.9.6 and my cv2 version is 4.4.0. I built OpenCV with Cuda successfully and after calling cv2.cuda.getCudaEnabledDeviceCount(), it returns 1 as expected. The following lines also work fine.
net = cv2.dnn.readNetFromCaffe(proto_file, weights_file)
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)
# multiple lines
# processing frame
# and setting input blob
net.setInput(in_blob)
However, executing the following line throws an exception.
output = net.forward()
The exception:
cv2.error: OpenCV(4.4.0)
G:\opencv-4.4.0\opencv-4.4.0\modules\dnn\src\dnn.cpp:2353: error:
(-216:No CUDA support) OpenCV was not built to work with the selected
device. Please check CUDA_ARCH_PTX or CUDA_ARCH_BIN in your build
configuration. in function
'cv::dnn::dnn4_v20200609::Net::Impl::initCUDABackend'
The message says that my Cuda was not built to work with the selected device (which I'm guessing is my GPU).
It seems to have encountered a conflict with CUDA_ARCH_BIN and/or CUDA_ARCH_PTX. My GPU model is NVIDIA Geforce MX130 whose CUDA_ARCH_BIN value is what I found to be 6.1 and I set it according on CMake.
How can I resolve these issues? Let me know if I need to provide any more information.
"Sources say" the MX130 has a Maxwell core, not a Pascal core. Maxwell is the predecessor of Pascal.
Hence, you only have CUDA compute capability 5.0.
You should check that with an appropriate tool such as GPU-Z that does its best to query the hardware instead of going by specs.
Sources:
https://en.wikipedia.org/wiki/GeForce_10_series#GeForce_10_(10xx)_series_for_notebooks (notice how the Fab (nm) is different and the code name is GM108, not GPxxx)
https://www.techpowerup.com/gpu-specs/geforce-mx130.c3043

How can I fix this Faceswap screen error?

Trying to run Faceswap on macOS but it cannot find my screen...
user#iMac ~/D/faceswap (master)> python3 faceswap.py gui
Setting Faceswap backend to AMD
03/24/2021 11:09:10 INFO Log level set to: INFO
03/24/2021 11:09:14 INFO macOS users need to install XQuartz. See https://support.apple.com/en-gb/HT201341
03/24/2021 11:09:14 ERROR No display detected. GUI mode has been disabled.
Apparently Faceswap has a lack of drivers with macOS GPU support, but is there any way I could fix this?

vtk crashes with opengl needs update using windows 10 and vulkan

I am using python wrapping to use VTK. I recently upgraded to Windows 10 64 bit, installed my laptop drivers from the relevant manufacturers.I built VTK 7.0 using MSVSC 2010 64 bit with python wrappings. I have switchable graphics card between NVDIA GeForce GT 555M and  Intel HD 3000 Graphics. If I use NVDIA I don't get any vtk object at the renderwin but only the background. If I use Intel Graphics and  run any VTK examples I get the following error:
ERROR: In ......\src\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 545vtkWin32OpenGLRenderWindow (00000000059F3D40): 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
If I understand right, this happens because Intel HD Graphics installed comes with vulkan, the new generation of OpenGL. But I don't know how can I solve this to work with VTK.Could anyone point out a solution?  Thanks.

DEVICE_NOT_FOUND while calling pyopencl.Context

I am struggling with the following Python code:
import pyopencl as cl
ctx = cl.Context(dev_type=cl.device_type.GPU)
It gives the following exception:
RuntimeError: clcreatecontextfromtype failed: DEVICE_NOT_FOUND
My OS is Linux Mint Debian Edition 2, running on a laptop with i7-5600U. It also has a graphic card, but I do not use it. I am using Python 3.4.2.
I have installed the Debian package amd-opencl-icd (I first tried beignet, but then the command clinfo failed).
I have installed pyopencl using pip and opencl using this tutorial. Note that I did not do the fourth step (creating the symbolic link to intel64.icd), since I did not have this file. The test at the end of the tutorial succeed.
Do you have any hint about what is happening? I am surprised that the C++ test of opencl (in the tutorial) and the installation of pyopencl both succeed, but this simple command of pyopencl fails.
EDIT
After installing the Intel driver, I now have a different issue.
The command clinfo gives the following:
terminate called after throwing an instance of 'unsigned long'
And the above Python code gives:
LogicError: clcreatecontextfromtype failed: INVALID_PLATFORM
You've installed the intel opencl SDK, which gives you the compiler and maybe the CPU runtime. You're trying to create a context consisting of GPU devices, which means that you need the runtime for intel HD graphics. Grab the 64-bit driver from the link below.
https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver
The CPU runtime is also available from that link. You need to follow the same procedure as before for the opencl HD graphics driver (converting .rpm to .deb). The CPU driver has a script you can execute.
The INVALID_PLATFORM error you got after installing the runtime appears to be because it expects the platform to be passed as a property, when creating from device type. It expects the properties as a list of key-tuple pairs. This is shown in the snippet below for the first available platform. The keyword is one of the values in context_properties, and the value is the platform object itself.
import pyopencl as cl
platforms = cl.get_platforms()
ctx = cl.Context(dev_type=cl.device_type.GPU, properties=[(cl.context_properties.PLATFORM, platforms[0])])
print(ctx.devices)
On my platform this prints
[<pyopencl.Device 'Intel(R) HD Graphics 4600' on 'Intel(R) OpenCL' at 0x1c04b217140>]
as my first platform is intel.

Mayavi example fails, crashes python on Ubuntu

I'm trying to run a standard Mayavi example. I just installed mayavi2 on Ubuntu (Kubuntu 12.04) and this is my first step with Mayavi. Unfortunately, this step is failing.
The examples I wish to run come from here:
http://docs.enthought.com/mayavi/mayavi/auto/examples.html
For example, this one.
The behavior I am seeing is that the plot canvas area is blank (mostly). The popup window is shown and its controls are present and working.
The only errors I am seeing are:
libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
Where would I add LIBGL_DEBUG=verbose?
I'm on Kubuntu 12.04 with:
Python 2.7.3
IPython 1.1.0
wxPython 2.8
vtk 5.8.0-5
setuptools, numpy, scipy - latest versions (just updated)
I am running the examples in IPython (which seems to be the recommended way). I am using this command to start the shell:
ipython --gui=wx --pylab=wx
I also tried running the examples from within an IPython notebook as so:
%run example.py
In all cases the examples fail to display the animation. The window itself is display as are the controls. But the animation canvas is mostly blank, although a flash of the images will sometimes appear.
At least once previously I saw my attempts crash Python. The message was:
The crashed program seems to use third-party or local libraries:
/usr/local/lib/python2.7/dist-packages/traits/ctraits.so
/usr/local/lib/python2.7/dist-packages/tvtk/array_ext.so
However, I am not seeing that crash now.
I found some important clues here:
https://askubuntu.com/questions/283640/libgl-error-failed-to-load-driver-i965
Like that person, I ended up reinstalling my graphics driver and that solved my problem. (The problem wasn't related to mayavi or python after all.)

Categories