See if this help:
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled | Qt Forum
Any GPU drivers on RK3568?
Thanks for everyone’s help!!!
I added this very obvious error, but there is no error when executing
make
, it looks like this file is not being compiled. And I only added the 47 line, everything else is the original.
Then I tried @anon59635625 's way: Rockpi4/dev/install-opencv - Radxa Wiki.
Using sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5opengl5-dev
instead of qt5-default
. It seems work, the cv::imshow
takes about 6ms(The time of imshow
on radxa’s Ubuntu20.04 image without openGL was 60ms). But this method takes a long time to compile, and the strange thing is that my program is a neural network inference program. If imshow
is not used, the utilization rate of 2 CPU cores is 100%. After adding imshow, the utilization rate of 4 cores is all 100%.
Then I tried Vulkan instead of OpenGL. CPU usage is lower, imshow
and network inference usage(armbian not supported npu yet), each core is around 70%.
For your reference, here you can see how image conversion takes up CPU usage, even with HW accel rendering:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4745 rock 20 0 1184392 97788 69028 S 258.3 2.8 2:11.63 luvcview (1920x1080 NV12 -> SDL -> KMSDRM/GBM)
4784 rock 20 0 1204416 104916 60156 R 189.0 3.0 0:56.36 luvcview (1920x1080 neon NV12 -> RGB24 -> SDL -> KMSDRM/GBM)
5206 rock 20 0 2254816 170660 94396 D 35.3 4.9 0:23.16 kodi-gbm (1920x1080 jellyfish-20-mbps-hd-hevc-10bit.mkv -> DRM_PRIME??)
ffplay with hw accel takes about 130% CPU usage while rendering 1920x1080 NV12 image.
You are most likely rendering RGB24/GBR24 image format, which takes CPU. See how nice Kodi performs with HW decode and HW accel as an example.
Yep ! Kodi is so nice.
Because the CPU usage of imshow
will affect the inference speed of the network. Right now 30+ms inference time still can be acceptable.
But still a lot optimize code !
@avaf The Million $$$ question is why does Radxa not have any images available with gpu drivers baked in?
@jack there are no Non-Armbian official Raxda (Debian/ Ubuntu) releases with GPU support correct?
@amazingfate I burned your armbian image to SD card…. No boot. Just black screen.
Do your images need a magic spell?
They focus on hardware and let dev/users work on userland things. These things are time-consuming and not cheap.
If you install libmali and my SDL2 with Rockchip HW accel with the right kernel you can have it.
Streaming from camera 1920x1080 and rendering (kmscube for reference only):
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
65064 rock 20 0 725812 69360 50604 S 26.0 2.0 0:02.31 luvcview
64889 rock 20 0 1082896 65716 45012 S 9.6 1.9 0:03.93 ffplay
68697 rock 20 0 925776 114876 95072 S 49.3 3.3 0:23.17 gst-launch-1.0 (gstreamer)
64865 rock 20 0 211456 51184 34480 S 15.6 1.5 0:03.01 kmscube
Maybe i can share deb package for debian as soon as i switch from ubuntu to debian once and for all.
If you don’t want to waste time with these things, use a modern kernel (5.10 and up) with panfrost. Install the latest kernel and check for:
dmesg|grep panfrost
Then you have GPU ready to be used.
I don’t know. You need to find some hints from the serial console.
Radxa sells out of all they’re hardware they have enough time and $$$ to have their engineers build an OS that has GPU support.
If you have an image you could link on GitHub it would be great I’ll make a post and pin it since As 99% Raxda customers have paper weights that just suck 5V and output 0 productivity! Htop and some benchmarks…
No GPU acceleration = 0 use for any webcam, or AI development.
I have no idea why Radxa has not understood the importance of GPU acceleration in their OS.
@avaf I appreciate your work . Your the reason we have used Banana Pi M2 zero clusters for one of our smart city projects.
Unfortunately none of Radxa OS’s were complete enough use on any of our projects.
I will see what i can do.
well your mixing 2 things
downstream has gpu ai(npu) support
mainline has gpu support (some not all ) , in development there is just few months hdmi and gpu and some decoding support
and it is not raxda , pine , firefly ,armbian, slack etc. etc , it is that you use a kernel wich is not full developed yet and think it does the same as a dowmstream vendor sdk .
so i wonder why your boss would spend $$$ on a developer who dont know that diffrence and only can run some htop and pre-configured systems out of the box .
Great! Do you need a job?
RADXA still needs to bring up their kernel to 5.10 at least for Panfrost support in their ubuntu images.
there you go wrong why would raxda need to do that ?!
downstream is 4.19 gpu hw , ai npu
mainline is 5.19 gpu hw
and unsupported downstream is 5.10 with gpu and ai
and you are making a project where you want 5.10 gpu hw and ai npu so go ahead .
i already done it and so a few others it is not that hard the latest i found was the most nice one patches builds nice on top of raxda 5.10 kernel
ps. and that was just by google search and copy/paste
Dear developers,
Thank you very much. I enjoyed reading this dialogue, but I did not understand much. I am new to Linux
I am working on an educational project that uses a GS-streamer and a USB camera on Radax Zero to transmit video via Wi-Fi and encode it in H264 - H265 format, and also send it via GS-streamer serial port to another device.
My questions are
Do current ubuntu versions of Radax Zero support running GS-streamer?
Is it possible to encode the video TO H264 - H265 format and send it over Wi-Fi ?
I hope you can answer and explain in a simple way, and I thank you all
If there is a suitable operating system version, please indicate it. Thank you very much
I can’t tell you much about this board, i don’t have one.
Generally speaking, hw encoding has always been a missing feature in linux, possibly due to some license restrictions.
This has changed recently for the Rockchip platform and Amlogic.
Rockchip platform has support for the encoder in gstreamer.
Maybe you can use gstreamer x264enc to encode h264 and send it over Wifi.
If you don’t want to waste time with these things, use a modern kernel (5.10 and up) with panfrost. Install the latest kernel and check for:
dmesg|grep panfrost
I am currently using the latest debian kde desktop image on my 4C v1.2(2020) RK3399.
Clean install, could you help me with the steps to update the kernel?
As I’ve heard 6.2 has full gpu support for all RK chips.
I don’t follow the orthodox way to update the kernel on my custom images.
I think kernel 6.2 needs u-boot mainline version to boot properly, check in your image the u-boot version, and if it is a rockchip u-boot (old version) i would not try to update.
Maybe this guide here helps: https://wiki.radxa.com/Rockpi4/dev/kernel-mainline
I don’t have any Rock Pi 4 (so i can’t help much) but I think what you are looking for is this guide here: https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/rockpi-4.html
I wouldn’t recommend the image by qxhome.
Basics are missing.