Demystifying Odroid N2 hardware acceleration

Sav
Posts: 182
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 31 times
Been thanked: 13 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by Sav » Fri Feb 28, 2020 5:10 pm

I can't find informations about Mali g52 support, but I think that bifrost support is experimental.

Inviato dal mio GM1913 utilizzando Tapatalk


odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Tue Mar 03, 2020 8:10 pm

skeetre wrote:
Fri Feb 28, 2020 5:59 am
Panfrost Gallium3D Driver Adds Experimental OpenGL ES 3.0 For Open-Source Arm Mali
https://www.phoronix.com/scan.php?page= ... D-GLES-3.0
Yeah, but Panfrost doesn't support Bifrost / G52 just yet, mostly the Mali T860 and lookalikes.
So, good news indeed, just not specifically for the Mali G52 / Odroid N2.
Sav wrote:
Fri Feb 28, 2020 5:10 pm
I can't find informations about Mali g52 support, but I think that bifrost support is experimental.
Well, if I understand things correctly (and I might have missed an update, but don't think so)...
Portions of the driver are still missing for the Bifrost series. So, experimental in this case likely means more like non-existing.
I've not seen real reports of anything working anywhere. There continues to be progress, however, so work on this continues!

Luckily there is also some work going on around ARM's Wayland driver.
That actually is working in some specific cases, and provides a hardware accelerated desktop for the Odroid N2.

User avatar
meveric
Posts: 10866
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 32 times
Been thanked: 286 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by meveric » Thu Mar 05, 2020 2:47 am

odroidn2user wrote:
Tue Mar 03, 2020 8:10 pm
skeetre wrote:
Fri Feb 28, 2020 5:59 am
Panfrost Gallium3D Driver Adds Experimental OpenGL ES 3.0 For Open-Source Arm Mali
https://www.phoronix.com/scan.php?page= ... D-GLES-3.0
Yeah, but Panfrost doesn't support Bifrost / G52 just yet, mostly the Mali T860 and lookalikes.
So, good news indeed, just not specifically for the Mali G52 / Odroid N2.
But for the ODROID N1, which happens to have the Mali T860 ;)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
mad_ady
Posts: 7576
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 396 times
Been thanked: 302 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by mad_ady » Thu Mar 05, 2020 3:20 am

ODROID N1
Keepin' the love alive! :)

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Thu Mar 05, 2020 5:53 pm

mad_ady wrote:
Thu Mar 05, 2020 3:20 am
ODROID N1
Keepin' the love alive! :)
Well, in hindsight the N1 does indeed seem to have been a good package, even though there were some downsides (memory availability if I remember correctly) at some point in time. The Mali T860 is really doing quite nicely on the Panfrost drivers. And working with it on Manjaro ARM, it really does quite nice indeed. Perhaps Hardkernel should dust off its blueprints and relaunch the N1. :)

It is also good news for the N2 as well, though.This development holds a nice promise for us Odroid N2 users. As at some point the G52 in the N2 will be supported by the Panfrost driver, the infrastructure for OpenGL ES 3.0 then is clearly in place already. So, good news indeed, not for the N2 right now but as Alyssa Rosenzweig at Collabora *is* now working on G52 support..., this holds a nice promise indeed!

Also, it might not be completely open and mainline and require quite a few patches to put together... But the 202001 net installer with Ubuntu 19.04 image, that tobetter put together, does hardware acceleration. Including OpenGL ES 3.2.

With the audio settings now somewhat corrected, the 202001 image works really rather nice! It is Ubuntu 19.04 with Gnome. And with gnome-tweaks and extensions like arc menu, dash-to-panel and user themes, it is also rather good to use. So, as proof-of-concept, the hardware accelerated desktop is most certainly possible now! Totem (Gnome Video) does well with the wayland drivers, no VPU support yet but it plays quite a lot of video smoothly. Audio over HDMI works. Firefox has wayland support, which also does nicely with the wayland drivers. No 1080p60hz or 4K video. So, Odroid N2 with OpenGL hardware acceleration on the desktop: It works. (Could improve, obviously, a lot, but still.)

And remember, the G52 should be about 10% faster than the T860, and the S922X CPU multi-core performance is around 20% faster compared to the RK3399 and the 4GByte DDR4 RAM is 35% faster than the N1. The N2’s DDR4 RAM is running at 1320Mhz while N1’s DDR3 was running at 800Mhz. So we are looking at a bright future with the N2!
These users thanked the author odroidn2user for the post:
sjuut (Thu Mar 05, 2020 6:25 pm)

skeetre
Posts: 70
Joined: Mon Apr 29, 2019 11:27 am
languages_spoken: english
ODROIDs: Odroid-N2
Location: FL, USA
Has thanked: 15 times
Been thanked: 11 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by skeetre » Fri Mar 06, 2020 6:21 am

From phoronix today: https://www.phoronix.com/scan.php?page= ... R-Compiler

Lead Panfrost developer Alyssa Rosenzweig of Collabora has landed the first bits of the new "BIR" work. This is the Bifrost IR modeled for Arm's Bifrost GPU architecture, a.k.a. the Mali G31 through Mali G76.

This merge request adding the Bifrost IR (BIR) that includes gutting out their old Bifrost compiler code was merged this morning. The new compiler/IR work still appears to be quite primitive at this stage but will be interesting to see it mature as the Mesa 20.1 cycle continues on over the next two months.

I had thought this would have been done about 6 months to a year ago, but hopefully in another 6 months or so it's fully fleshed out and included in a stock mesa install.
Friends don't let friends use Spectre/Meltdown/Zombieload mitigations.

feefeechow
Posts: 22
Joined: Sat Feb 15, 2020 12:16 am
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by feefeechow » Sun Mar 08, 2020 7:53 pm

Odroid N2 is an incomplete prototype. Launch such a product to the market is pretty disappointed of HardKernel. I struggled with Ubuntu Mate 18.04 over weeks on hardware GPU/VPU acceleration for 4K playback but in vain. So-called Video driver has not yet been integrated into the X11. Even CoreElec works OK but not my cup of tea. I need a viable linux solution for Python programming. I used Asus Tinkerbroad and sounds a lot more reliable. I made the wrong decision to buy N2 and no true 4K playback...

linaro@tinkerboard:~$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 708mm x 399mm
1920x1080 60.00*+ 50.00 59.94 30.00 25.00 24.00 29.97 23.98
3840x2160 30.00 25.00 24.00 29.97 23.98
1600x1200 60.00
1280x1024 75.02 60.02
1440x900 59.89
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00
720x400 70.08

Vasant
Posts: 134
Joined: Mon Jan 19, 2015 3:44 pm
languages_spoken: english
ODROIDs: Odroid-c1
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by Vasant » Mon Mar 09, 2020 6:20 am

feefeechow wrote:
Sun Mar 08, 2020 7:53 pm
Odroid N2 is an incomplete prototype. Launch such a product to the market is pretty disappointed of HardKernel. I struggled with Ubuntu Mate 18.04 over weeks on hardware GPU/VPU acceleration for 4K playback but in vain. So-called Video driver has not yet been integrated into the X11.
You are expecting way too much from a SBC vendor. Actually HK does a pretty good of supporting their SBC. GPU/VPU and 4K playback works very well on Android. I am not sure if there is any ARM SBC running GNU/Linux desktop that can handle 4K playback in browser. If you want to use GNU/Linux desktop stick to high end x86, even there I don't think Firefox is hardware accelerated by default and I not sure it will support 4k playback.

Vasant

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Mon Mar 09, 2020 6:42 pm

Yeah, these ARM SBC's really are for developers and die-hard experimenters only, at this point. These devices are already good for a lot of cool things, but fully accelerated desktop work: no. You (like me) seem have a use case in mind that is not well suited to these ARM SBC's. But then ... there is indeed some GPU hardware acceleration and VPU support, even 4K, with the N2: with Android and CoreElec. And there is some VPU and GPU with kodi on the framebuffer, and some GPU supported retro gaming as well. But for desktop, not so much.

N2/G52 GPU hardware acceleration is coming to the desktop, but very, very slowly. There is a first GPU accelerated proof-of-concept image available made by tobetter, based on ARM's wayland drivers. But most devs seem to be waiting on Panfrost (for X11) and the mainline kernel to mature enough for GPU and VPU support with G52/Bifrost. Assuming things go as planned by Panfrost project lead Alyssa Rosenzweig, GPU support with Panfrost is a couple of months away at least, perhaps half a year or more for things to fully mature. But even then: until full G52 VPU support comes to the mainline kernel, you can basically forget about 4K video playback in a desktop setting. Or h265/HEVC 1080p support, for that matter. The current generation of ARM SBC's just aren't powerful enough.

Not sure what's the actual state with the G52 VPU at this point. V4L2 is still work-in-progress. V4L2 is a work-in-progress for Linux on x86 as well, but there you can power through quite some missing stuff, which low-powered ARM clearly can't. So... yeah... And then we need video viewer software to adapt to the new standards.... And indeed, browsers aren't known for their excellent hardware support, with (as far as I know) only Chrome OS being an exception as they do have hardware support in the browser there. But 4K in a browser on Linux... that's probably not happening on this generation ARM boards. At least not any time soon.

So for desktop and video processing use cases, X86 is your best bet indeed because of all the available power. Or have a lot of patience with ARM SBCs, standardized V4L2 decoders are coming to ARM SBC's, but we have to wait for this stuff to actually happen. It is technically not easy, and it's just not completely done yet. It is work-in-progress, wonderful stuff is ahead and coming.

That all said, depending a little on what exactly you are building with python, you can do python quite nicely on these boards... In fact, quite a few people do.

o_lampe
Posts: 174
Joined: Wed Jan 01, 2020 12:35 am
languages_spoken: english german
ODROIDs: MC1 solo
Has thanked: 11 times
Been thanked: 16 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by o_lampe » Tue Mar 10, 2020 2:44 am

I don't know if it fits here,but I've been converting mpeg2 videos to mp4 for the last three days. It always was a 100% load for the CPUs and a 50-minute show took 15-20min to convert.
But suddenly it converts much faster, like in 6 minutes and the CPU load is 70-80% only.
I can only assume, VLC player had a breaktrough in N2's GPU acceleration!? [Ubuntu 18.04]

Is there any GPU benchmark, I can test?

Sav
Posts: 182
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 31 times
Been thanked: 13 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by Sav » Tue Mar 10, 2020 2:53 am

o_lampe wrote:
Tue Mar 10, 2020 2:44 am
I don't know if it fits here,but I've been converting mpeg2 videos to mp4 for the last three days. It always was a 100% load for the CPUs and a 50-minute show took 15-20min to convert.
But suddenly it converts much faster, like in 6 minutes and the CPU load is 70-80% only.
I can only assume, VLC player had a breaktrough in N2's GPU acceleration!?

Is there any GPU benchmark, I can test?
Can you give us more details (OS, kernel version, vlc version)?

For benchmarking the GPU (rendering capabilities), you can use glmark2, glmark2-es2-wayland, provided the right hardware drivers are installed.
I don't know other benchmarking tools gpu-oriented.

o_lampe
Posts: 174
Joined: Wed Jan 01, 2020 12:35 am
languages_spoken: english german
ODROIDs: MC1 solo
Has thanked: 11 times
Been thanked: 16 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by o_lampe » Tue Mar 10, 2020 5:28 am

Ubuntu 18.04
VLC is 3.0.8 Vetinari.

Code: Select all

odroid@odroid:~$ uname -a
Linux odroid 4.9.213-67 #1 SMP PREEMPT Thu Feb 13 14:59:00 -03 2020 aarch64 aarch64 aarch64 GNU/Linux
I converted two more 50min. shows (DVD-quality) and timed it ~7min. each.
Maybe I changed something in the preferences, when I searched forced subtitle-settings. The last mp4 files are a bit bigger. (lower compression= less workload)
I will reset VLC to default and time it again.

MajesticMagistrate
Posts: 16
Joined: Fri Feb 21, 2020 8:22 am
languages_spoken: english, hungarian
ODROIDs: ODROID N2
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by MajesticMagistrate » Tue Mar 10, 2020 7:10 am

feefeechow wrote:
Sun Mar 08, 2020 7:53 pm
Odroid N2 is an incomplete prototype. Launch such a product to the market is pretty disappointed of HardKernel. I struggled with Ubuntu Mate 18.04 over weeks on hardware GPU/VPU acceleration for 4K playback but in vain. So-called Video driver has not yet been integrated into the X11.
I think ARM's decision to not provide an X11 driver for their newer GPUs created something similar to the "chicken or the egg" problem - the drivers for X11 would need to be developed by the users, but developers need a board with Bifrost GPU to work on, and to do that, some manufacturers need to release a board on the new architecture. Honestly, I can't imagine the people at ARM seeing the state of Wayland (which is difficult to get working with their provided driver, but at least there's a working gnome thanks to tobetter) decide that no X11 support is needed for their GPU.
(I've always disliked how hardware support was handled on Android (and the possibility of an OS upgrade), and ARM seems to use the same ideology with their linux drivers also. There's a lot of potential in ARM single board computers, just maybe ARM isn't seeing it...)

Maybe we'll see something different regarding the GPU support policies, when the new Exynos SoCs arrive with AMD's graphics - and perhaps they'll release an open source driver, like they did it on their desktop GPUs - but that's just a supposition...

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Tue Mar 10, 2020 4:15 pm

o_lampe wrote:
Tue Mar 10, 2020 5:28 am
Ubuntu 18.04
VLC is 3.0.8 Vetinari.

Code: Select all

odroid@odroid:~$ uname -a
Linux odroid 4.9.213-67 #1 SMP PREEMPT Thu Feb 13 14:59:00 -03 2020 aarch64 aarch64 aarch64 GNU/Linux
I converted two more 50min. shows (DVD-quality) and timed it ~7min. each.
Maybe I changed something in the preferences, when I searched forced subtitle-settings. The last mp4 files are a bit bigger. (lower compression= less workload)
I will reset VLC to default and time it again.
Adding in subtitles is probably quite an 'expensive' action, that costs time, individual frames have to be changed and recoded, where without the images might just be pass-through'ed to the output?
That said, perhaps something changed in the recording?

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Tue Mar 10, 2020 4:20 pm

MajesticMagistrate wrote:
Tue Mar 10, 2020 7:10 am
I think ARM's decision to not provide an X11 driver for their newer GPUs created something similar to the "chicken or the egg" problem - the drivers for X11 would need to be developed by the users, but developers need a board with Bifrost GPU to work on, and to do that, some manufacturers need to release a board on the new architecture. Honestly, I can't imagine the people at ARM seeing the state of Wayland (which is difficult to get working with their provided driver, but at least there's a working gnome thanks to tobetter) decide that no X11 support is needed for their GPU.
(I've always disliked how hardware support was handled on Android (and the possibility of an OS upgrade), and ARM seems to use the same ideology with their linux drivers also.
If they want X11 drivers to help sell their boards, they write X11 drivers to help sell their boards. ARM is making good money, so that's reaaaally not a problem...
The commonly accepted reason is that the big money is in Android, not in Linux. So, why bother with X11 drivers when Wayland is the Next Big Thing?

But being the well read paranoid that I am, I'm thinking you are closer here:
MajesticMagistrate wrote:
Tue Mar 10, 2020 7:10 am
There's a lot of potential in ARM single board computers, just maybe ARM isn't seeing it...)
The thing is, I'm convinced at this point that ARM doesn't *want* to be in the desktop market, like: not at all. There is a multi-billion dollar (probably multi-trillion dollar) industry with a LOT of vested interest (big corporation, big banks, big intelligence agencies, big billionaire) in X86 (Intel/AMD), Windows, Apple and Google. And ARM is now a part of those vested interests. And all those involved parties really don't want viable alternatives, they don't want a way for people to opt out. It seems to me ARM is being well paid to not see it. (It is not a good idea to become a direct competitor to your largest customers.)
/rant.
Last edited by odroidn2user on Tue Mar 10, 2020 5:41 pm, edited 4 times in total.
These users thanked the author odroidn2user for the post:
istanbulls (Tue Mar 10, 2020 7:28 pm)

o_lampe
Posts: 174
Joined: Wed Jan 01, 2020 12:35 am
languages_spoken: english german
ODROIDs: MC1 solo
Has thanked: 11 times
Been thanked: 16 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by o_lampe » Tue Mar 10, 2020 4:41 pm

odroidn2user wrote:
Tue Mar 10, 2020 4:15 pm
Adding in subtitles is probably quite an 'expensive' action, that costs time, individual frames have to be changed and recoded, where without the images might just be pass-through'ed to the output?
That said, perhaps something changed in the recording?
You might be right, but I couldn't find the settings for "forced subtitles". I clicked here and there, but AFAIR didn't change a setting.

Just for the records: my WinPC takes 4min. to convert the same job. ( NVidia GTX1050 )
7min. on a 80€ SBC is not bad, I'd say. :D

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Tue Mar 10, 2020 5:16 pm

o_lampe wrote:
Tue Mar 10, 2020 4:41 pm
odroidn2user wrote:
Tue Mar 10, 2020 4:15 pm
Adding in subtitles is probably quite an 'expensive' action, that costs time, individual frames have to be changed and recoded, where without the images might just be pass-through'ed to the output?
That said, perhaps something changed in the recording?
You might be right, but I couldn't find the settings for "forced subtitles". I clicked here and there, but AFAIR didn't change a setting.

Just for the records: my WinPC takes 4min. to convert the same job. ( NVidia GTX1050 )
7min. on a 80€ SBC is not bad, I'd say. :D
That's not bad indeed!

I've tried some video reencoding on a hardware encoding enabled Raspberry a long time ago. It took quite some effort. And, though it then went pretty quickly (about 1:1 real time, which was amazing), the picture quality results weren't spectacular. Given the 4.x kernel and ubuntu 18.04... I'm having a hard time believing you accidentally enabled hardware encoding. V4L2 is getting to a point where it certainly is possible, but that's on brand new kernels as far as I know. So, I'm thinking something changed that now allows 'pass through' processing instead of full video reencoding, or something thereabouts. Perhaps audio settings changed? Audio reencoding is about right for that 7min duration? Audio reencoding with video pass through would be my best bet. If not: please tell all of us how! :)

Sav
Posts: 182
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 31 times
Been thanked: 13 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by Sav » Tue Mar 10, 2020 5:41 pm

odroidn2user wrote:
Tue Mar 10, 2020 5:16 pm
o_lampe wrote:
Tue Mar 10, 2020 4:41 pm
odroidn2user wrote:
Tue Mar 10, 2020 4:15 pm
Adding in subtitles is probably quite an 'expensive' action, that costs time, individual frames have to be changed and recoded, where without the images might just be pass-through'ed to the output?
That said, perhaps something changed in the recording?
You might be right, but I couldn't find the settings for "forced subtitles". I clicked here and there, but AFAIR didn't change a setting.

Just for the records: my WinPC takes 4min. to convert the same job. ( NVidia GTX1050 )
7min. on a 80€ SBC is not bad, I'd say. :D
That's not bad indeed!

I've tried some video reencoding on a hardware encoding enabled Raspberry a long time ago. It took quite some effort. And, though it then went pretty quickly (about 1:1 real time, which was amazing), the picture quality results weren't spectacular. Given the 4.x kernel and ubuntu 18.04... I'm having a hard time believing you accidentally enabled hardware encoding. V4L2 is getting to a point where it certainly is possible, but that's on brand new kernels as far as I know. So, I'm thinking something changed that now allows 'pass through' processing instead of full video reencoding, or something thereabouts. Perhaps audio settings changed? Audio reencoding is about right for that 7min duration? Audio reencoding with video pass through would be my best bet. If not: please tell all of us how! :)
As far as I know there is a little gpu support in the hardkernel kernel. Infact you can run kodi (without X11). I don't know how vlc is taking advantage of that software enviroment.

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Tue Mar 10, 2020 6:06 pm

Sav wrote:
Tue Mar 10, 2020 5:41 pm
As far as I know there is a little gpu support in the hardkernel kernel. Infact you can run kodi (without X11). I don't know how vlc is taking advantage of that software enviroment.
There is indeed! And there is a working VPU on Hardkernel's 4.x there, at least in some form, for kodi and CoreElect and such to use. So, technically possible indeed.
But hardware enabled video encoding is quite something else. That is quite a thing. Accidentally getting that, it just seems very unlikely to me.
'Happy little accidents' occur of course. So, possible.

If VLC actually does VPU video hardware acceleration on Hardkernel's 4.x kernel, I'd love to know. Perhaps I'd have to look again at that specific kernel!
These users thanked the author odroidn2user for the post:
m8kbv (Tue Mar 10, 2020 7:28 pm)

User avatar
mad_ady
Posts: 7576
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 396 times
Been thanked: 302 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by mad_ady » Tue Mar 10, 2020 7:23 pm

The GPU shouldn't be doing video encoding. There is a VPU for that. The VPU could do video encoding, but vlc should know how to take advance of it. The most standard way of doing this (there are two standards, as with everything) is either through ffmpeg and one of its libs, or through gstreamer. But I think both ways depend on a standard kernel architecture that communicates to the VPU via V4L infrastructure. It's possible that the speedup in encoding time is due to resolution change or bitrate. Or even using single pass over double pass. I know ffmpeg had some presets that would drastically change both quality and encoding time.
Anyway - using the onboard VPU for decoding should be a goal. Using it for encoding is not so great, because all SoCs have real-time encoders designed to work with live video (e.g. a camera sensor) and will output a highly un-optimal h264/h265 video stream. My phone outputs 20Mbps h264 which I later transcode to the same perceived quality but a bitrate of no more than 2-3Mbps. So you should use the onboard VPU only when transcoding live content (where time is important, not size), but for long-term video storage you should use a software encoder instead.

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Tue Mar 10, 2020 7:45 pm

mad_ady wrote:
Tue Mar 10, 2020 7:23 pm
The GPU shouldn't be doing video encoding. There is a VPU for that.
...8<...
So you should use the onboard VPU only when transcoding live content (where time is important, not size), but for long-term video storage you should use a software encoder instead.
Yeah, so, for video encoding: there is a CPU for that, is probably the right answer.
For the best end results you usually end up using software encoding.

o_lampe
Posts: 174
Joined: Wed Jan 01, 2020 12:35 am
languages_spoken: english german
ODROIDs: MC1 solo
Has thanked: 11 times
Been thanked: 16 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by o_lampe » Tue Mar 10, 2020 11:47 pm

I'm glad, I didn't reset VLC to default. Now I can show you screenshots of the relevant preference pages.
I don't think it's doing video passthrough and audio decoding: the mp4 file is 4 times smaller than the mpeg file.
Also, I don't believe, I changed something and got lucky. VLC is enabled to check for updates (as is Ubuntu). I think there was an upgrade and everyone could get it.

What would you need to see, screenshot-wise? As a VLC noob, everything looks cryptic to me (pun intended) ;)

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Wed Mar 25, 2020 4:24 am

OK, a quick update on the status of N2 hardware acceleration as far as I can tell.

Due to probably obvious reasons, momentum on N2 hardware acceleration is somewhat slow.

Tobetter is still working on the official ARM Wayland drivers and preparing for an Ubuntu 20.04 Gnome release.
And it already sorta works, but apparently Gnome 3 on Ubuntu 20.04 now is without a mouse cursor :)
And very likely the official kernel is still without working onboard audio support, and probably some other smaller stuff not functioning perhaps (looking at Manjaro's kernel) as reboots and such.
So, a tough job, but tobetter appears to be working on it whenever he finds time, which is awesome and much appreciated.
Tobetters ARM Wayland GPU driver supported 19.04 image is all kinds of awesome already.

Everyone else seems to be in a holding position, waiting for the open Panfrost drivers to catch up to supporting Bifrost GPU's.
That doesn't solve the the audio issues and other missing hardware support, on the mainline kernel, but that's probably all coming in due time.
Alyssa Rosenzweig has started on working on the Bifost support, and (luckily) finds a lot of the Midgard support can be reused.
So, making excellent progress. I've seen continued work and progress, I've not seen any recent progress report, but a working driver is probably still months away at best.

We are blessed with two routes and both look promising.
It does take a little patience though. :)

If anyone has other status updates, I'd love to know.

Update: oh, yeah. The VPU support is also a work in progress, under the name V4L2, and is actually quite a tricky thing.
Not just for the N2, but for other SBCs as well. So, it will work, but at this point it is very limited and unsupported for the N2. Even though progress is being made generally, Amlogic seems to be following instead of leading the pack.
But a lot of people are working on general Linux SBC VPU drivers (including quite a few people at Google, LibreElec (if I remember correctly) and many others), so at some point in the future the N2 will probably have (some) VPU support on mainline as well. As far as I can see, mainline kernels don't yet expose V4L2 in a usable way, but that all might soon change. It is coming along indeed, we'll have to be patient.
So, if you are working on VPU support: many, many thanks!
In the mean time, when GPU support comes online, we'll find we can already play quite a few video smoothly based on the raw power of the CPU.
These users thanked the author odroidn2user for the post (total 3):
sjuut (Wed Mar 25, 2020 4:28 am) • m8kbv (Wed Mar 25, 2020 4:28 am) • jgmdev (Wed Mar 25, 2020 11:18 am)

o_lampe
Posts: 174
Joined: Wed Jan 01, 2020 12:35 am
languages_spoken: english german
ODROIDs: MC1 solo
Has thanked: 11 times
Been thanked: 16 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by o_lampe » Wed Mar 25, 2020 6:54 pm

I might have bought an XU4(Q) instead of the N2, if I had known it's immature status regarding Linux/hardware functionality. :(
But they don't tell you while you're in the shop...

Sav
Posts: 182
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 31 times
Been thanked: 13 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by Sav » Thu Mar 26, 2020 12:10 am

o_lampe wrote:
Wed Mar 25, 2020 6:54 pm
I might have bought an XU4(Q) instead of the N2, if I had known it's immature status regarding Linux/hardware functionality. :(
But they don't tell you while you're in the shop...
I don't know what you have in mind to do with the N2, but I can assure that with a bit of flexibility you can achieve almost anything.
In my case I have 2 systems:
1) Android ATV installed on the emmc, which I use for retrogaming, casual gaming, streaming games from my pc, music, youtube, browsing, mail, etc....
2) CoreElec on micro SD, which I use for everything regarding my multimedia library.

You can install Kodi on Android, but it has limitations.

If you need a full linux desktop experience, just wait. The next ubuntu release may be a real step forward.

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Thu Mar 26, 2020 4:07 am

Sav wrote:
Thu Mar 26, 2020 12:10 am
If you need a full linux desktop experience, just wait. The next ubuntu release may be a real step forward.
Yeah, and sad to say, I'm going to just that.

The new mainline kernels seem to be causing a lot of video glitching here, with 3 different monitors, 4 different hdmi cables, 2 different N2's.
So, that is most certainly not just me. Major annoyingly.
There are weird flashes on the screen, mostly when playing video of some sort, but also on normal working on the desktop.
And there were some weird micro freezes as well. Mainline support there clearly isn't.

So, until the next Ubuntu release, some decent hardware support and full GPU support comes around...
This device doesn't do desktop and hardware support just isn't anywhere near as well as it could.
It has a lot of potential, is good for a whole lot indeed, but it is not the right device yet for my goals.
I'll be focusing on other hardware from here on in. I'll check again in a couple of months.
Last edited by odroidn2user on Fri Mar 27, 2020 6:11 am, edited 1 time in total.

congo
Posts: 14
Joined: Fri Oct 11, 2019 5:04 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by congo » Fri Mar 27, 2020 6:03 am

Dear odroidn2user,
This device doesn't do desktop and hardware support just isn't anywhere near as well as it should.
Can you please clarify your statement ? Because i do not see this anywhere on HK description. If you would write "as it could" i would agree.

Congo

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Fri Mar 27, 2020 6:14 am

congo wrote:
Fri Mar 27, 2020 6:03 am
Dear odroidn2user,
This device doesn't do desktop and hardware support just isn't anywhere near as well as it should.
Can you please clarify your statement ? Because i do not see this anywhere on HK description. If you would write "as it could" i would agree.

Congo
No problem, changed it for you. Doesn't make any difference though, not really.
Hardware is very good, mainline kernel pretty bad, graphics drivers virtually non-existent.
The hardware should/could do quite well, but doesn't.
We'll have to wait for quite a few months for mainline kernels to catch up to actually supporting this device well.
We're still a long way from there.

congo
Posts: 14
Joined: Fri Oct 11, 2019 5:04 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by congo » Fri Mar 27, 2020 6:45 am

No problem, changed it for you. Doesn't make any difference though, not really.
I believe it does. This HW "does quite well" just not with the SW you expect right now
I hope that in future with "free" SW we will have full HW support as well.
Congo

User avatar
meveric
Posts: 10866
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 32 times
Been thanked: 286 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by meveric » Sat Mar 28, 2020 6:47 pm

odroidn2user wrote:
Fri Mar 27, 2020 6:14 am
Hardware is very good, mainline kernel pretty bad, graphics drivers virtually non-existent.
Graphics drivers exist!
The ODROID N2, is the only ODROID Board at the moment where the GPU drivers support GameCube and Wii emulation.
Any of the other boards, does not have this capability driver wise.
The fact that you can only run fbdev based applications, doesn't mean you "graphics drivers are virtually non-existent".
And in my opinion the hardware actually sucks, but that's another topic.
Only cause it doesn't fit YOUR usecase, doesn't mean that others are not willing to deal with it.
The gaming images around the N2 retropie and co, all utilize the GPU and GPU drivers, and these guys are HAPPY that the GPU is working the way it does work.

Also the statement "it doesn't do desktop" is completely false.
Image

It does desktop quit nicely, you can even activate transparent effects for the desktop and run transparent window without any lagging on it.
Sure there is no hardware acceleration involved, but guess what.... None of the other ODROIDs offer that either!

You you are limited with application that you can run on the desktop, and if you want Hardware acceleration, you can only run OpenGL application from the Desktop at the moment, not OpenGL ES.

Still that doesn't mean desktop is not working!
These users thanked the author meveric for the post:
odroidn2user (Sat Mar 28, 2020 7:16 pm)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

odroidn2user
Posts: 162
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Demystifying Odroid N2 hardware acceleration

Unread post by odroidn2user » Sat Mar 28, 2020 7:16 pm

Indeed, the 4.9 kernel is pretty ok. Mainline... needs some TLC.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: o_lampe and 5 guests