After I upgraded my Embedded Qt 5.9.8 Application to Qt version 5.12.8 I got the warning "Setting framebuffer size is only available with DRM atomic API".
The application run on a i.MX6 Solo System On Module (OS Yocto Warrior Linux, Kernel 4.19).
I fixed this warning by setting the environment variable QT_QPA_EGLFS_KMS_ATOMIC.
Then I got "Framebuffer size format is invalid".
How can I set the Framebuffer size format?
I tried to solve it with QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT.
But I still get the warning.
Related
I am running qt video player I made but every time I load a mp4 file or mp3 it gives me this error.
MP4:
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)2.1, profile=(string)constrained-baseline, codec_data=(buffer)0142c015ffe100176742c015da06025b011000000300100000030320f162ea01000468ce3c80, width=(int)384, height=(int)288, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true'."
Error: "Your GStreamer installation is missing a plug-in."
MP3:
Warning: "No decoder available for type 'audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2, parsed=(boolean)true'."
Error: "Your GStreamer installation is missing a plug-in."
By the way I am on Centos 7.9.2009 core if that has to do with anything
The answer to this is that media programs should be compiled on windows. Or if your really dedicated to it, include every .h file for gstreamer in your program and carry around those files everywhere the program goes
I have been created a build with Buildroot. Also did it everthing on this comment -> https://www.raspberrypi.org/forums/viewtopic.php?t=263418#p1614833
Did my research, and dozens of trials, and I get nothing.
My config is:
Rpi4-64, QT5-Qml, Mesa v3d-vc4, opengl es 2.0
When I try to run my qt qml application on this build, I'm getting this error:
QStandardPaths: wrong permission on runtime directory /usr/bin/, 7755 instead of 7700
drmModeGetResources failed (Operation not supported)
no screens available, assuming 24 -bit color
Cannot create window: no screens available.
Summary : I need to run my qt5 qml application on Rpi 4 with hw accelerated.
I found the solution.
I think the Rpi4 with eglfs using default card for card0, and this is not work. Need to force using card1 for eglfs.
Create a file "eglfs.json" with the following content:
{ "device": "/dev/dri/card1" }
export QT_QPA_EGLFS_KMS_CONFIG=/wherever/is/the/file/eglfs.json
and run your qt app!
Also my qt5 qml program is not showing fonts or text on rpi4 buildroot system. Coping /usr/share/fonts/your_program_fonts worked for me.
I am able to run a number of GUI applications successfully on windows subsystem for linux (WSL), Ubuntu 14.04.4 LTS, using X-forwarding (via MobaXterm).
I recently tried to run an application that uses OpenGL. Although the GUI opens, there are a number of errors and some aspects of the GUI don't work properly. The errors are:
QT error: 1
QT error: <PyQt5.QtCore.QMessageLogContext object at 0x7f88e21d9ba8>
QT error: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
libGL error: failed to load driver: swrast
I can get rid of the swrast error by setting export LIBGL_ALWAYS_INDIRECT=1 but the other errors remain:
QT error: 1
QT error: <PyQt5.QtCore.QMessageLogContext object at 0x7fed3689e828>
QT error: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
A typical error when attempting to use part of the GUI is:
WARNING: QT error: 1 (Gui.qtMessageHandler:51)
WARNING: QT error: <PyQt5.QtCore.QMessageLogContext object at 0x7f9b35e7b6d8> (Gui.qtMessageHandler:51)
WARNING: QT error: QOpenGLWidget: Failed to make context current (Gui.qtMessageHandler:51)
I can run glxgears, but I realise this only checks a fraction of OpenGLs functions. If I run glmark2 I get the following:
glmark2
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
Error: Glmark2 needs OpenGL(ES) version >= 2.0 to run (but version string is: '1.4 (4.0.0 - Build 10.18.10.4358)')!
Error: main: Could not initialize canvas
If I run find /usr -iname "*libGL.so*" -exec ls -l -- {} + suggested on this link https://askubuntu.com/questions/541343/problems-with-libgl-fbconfigs-swrast-through-each-update I get the following output but I'm not sure if this indicates an error or not?
lrwxrwxrwx 1 root root 14 Jan 12 2016 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 -> libGL.so.1.2.0
-rw-r--r-- 1 root root 413968 Jan 12 2016 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
Running glxinfo seems to indicate the on-chip graphics card is used (there is a separate AMD graphics card but I don't think it's necessary to use that).
glxinfo | grep render
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
OpenGL renderer string: Intel(R) HD Graphics 4000
How can I successfully run OpenGL applications via WSL?
No matter what I've tried, I cannot get a proper 3.2 context in pyside using qt 4.8. I have triple checked via the gl extensions manager, and my computer is certainly capable (100% of 4.1 core features).
"simple" version doesn't work...
f = QGLFormat()
f.setProfile(QGLFormat.CoreProfile)
f.setVersion(3,2)
QGLFormat.setDefaultFormat(f)
In fact, I cannot even successfully create a glcontext...
class GLView(QGLWidget):
def __init__(self,name,parent=None):
QGLWidget.__init__(self,parent)
c = QGLContext(QGLFormat())
logger.critical(c.create()) #returns False
This is after a QApplication exists and a MainWindow class is created and shown...
If I try to set the format on the built-in QGLWidget context, it fails as well --
self.context().setFormat(f)
self.context().makeCurrent()
"Cannot make invalid context current". Similarly does not work even if coreprofile is not specified, and version is set at 2.1.
Moving any of these to the initializeGL callback makes no difference.
I've looked at the following questions, which have not resolved my issue
PyQt4 OpenGL: Enabling OpenGL Core Profile - solution was to move to qt5 (no official pyside release for this yet)
PyOpenGL cannot compile shader - on debian, does not have same problem as os x
Getting OpenGL context newer than 2.1 with Qt 4 and Mavericks - unresolved
Qt & OpenGL OS X: GLSL shader version only 120 on Mountain Lion - c++, same code does not work in pyside, as seen above
Any help on this would be greatly appreciated.
Thanks,
K
I am trying to run some OpenCL programs.
I have a NVidia graphics card (GeForce 6600).
But , when I execute my program and I get a error :
Unable to get platforms -1001
My OS is ArchLinux and I already install the following packages (
from pacman ):
1. libcl
2. opencl-headers
3. opencl-nvidia-304xx
4. lib32-opencl-nvidia-304xx
How to fix this problem in my environment?
or what necessary packages need to install?
thanks.
OpenCL-error -1001 "CL_PLATFORM_NOT_FOUND_KHR" doesn't necessarily mean you don't have any OpenCL-capable device. This means, that cl_khr_icd-extention have a trouble to load the proper vendor driver.
Try to run your OpenCL-program(s) as root. Or try to use clIcdGetPlatformIDsKHR.
If you not running X11, you need to create device files manually or by script