Jump to content

[Development] RK3399 media script


JMCC

Recommended Posts

11 hours ago, JMCC said:

If your question is whether the script will work on a server image, with no Desktop installed, the answer is probably not. You can test, but don't expect to get support for it here. 

The first test I did on the image SERVER (choose a full installation of all components). KODI runs without problems there. I didn't have time to check the rest. If necessary, I can repeat this check of the other components on the SERVER.

Link to comment
Share on other sites

Wanna add about ubuntu-server that was minimized to xfce4 with minimize && apt-get install xfve4 xfce4-goodies,  startx used from sudo su.

Under this conditions i installed all *.deb from libraries + xserver + kodi + did all changes that was inside .sh script (i.e. edit file inside xorg.init.d) with command dpkg --unpack *.deb (yes, in right folders) and apt-get install -f -y.

After this, Chromium and es2gears see Mali driver, but...Chromium (with h264ify) can't play 1080p60fps (which he can with pure software) (Chromium 32bit fails here too) and after I use command kodi-gbm-wrapper and click enter I may not move mouse or click keyboard for a bit and then everything back to normal, but Kodi still doesn't start up. 

gl4es working, i.e. vcmi (heroes 3) is working with it, but performance is the same as for software, maybe a little bit better 

Link to comment
Share on other sites

10 hours ago, Dante4 said:

Wanna add about ubuntu-server that was minimized to xfce4 with minimize && apt-get install xfve4 xfce4-goodies,  startx used from sudo su.

Under this conditions i installed all *.deb from libraries + xserver + kodi + did all changes that was inside .sh script (i.e. edit file inside xorg.init.d) with command dpkg --unpack *.deb (yes, in right folders) and apt-get install -f -y.

After this, Chromium and es2gears see Mali driver, but...Chromium (with h264ify) can't play 1080p60fps (which he can with pure software) (Chromium 32bit fails here too) and after I use command kodi-gbm-wrapper and click enter I may not move mouse or click keyboard for a bit and then everything back to normal, but Kodi still doesn't start up. 

gl4es working, i.e. vcmi (heroes 3) is working with it, but performance is the same as for software, maybe a little bit better 

Good to see that you like experimenting. As I said, if you use as a base anything other than Armbian Bionic Default image, results can be unpredictable. I invite you to use the build script to make a proper image, or wait until it is publicly released, if you want to take advantage of all the possibilities of the script.

Link to comment
Share on other sites

Held on Khadas EDGE (RK3399) advanced tests on 4K TV (resolution of the XFCE desktop environment full 4K). MPV and Gstreamer plays all files all formats (including 4K) without problems in full screen. Separately describe browser. I installed system components, MPV Gstreamer and KODI. The system part is the default armsoc. I use a regular browser (not accelerated versions of 32 bits). Once again,  the desktop Resolution = 4K (XFCE). YouTube through the browser to full screen easily pulls all versions 1080p videos. When you select 4K video, the video is played in "chunks" - 2-3 seconds of smooth playback, then freezes and turns the white circle on the screen, then again 2-3 seconds smoothly and so constantly. I think this is a limitation of my Internet channel (or YouTube itself). Because the video itself (in YouTube 4K mode) shows smoothly and without friezes in the intervals when it works. So if you do "window" display mode,  playable  - "pieces".  Maybe not enough of some buffer settings or anything, I'm not an expert. The conclusion I made for myself. RK3399-perfectly copes with any task of playing full-screen video. For local video (USB SD eMMC) or from a local network with a NAS where there is no bandwidth limit, any video goes without brakes to full screen with 4K scaling. For video from the Internet-no problem running any video for which enough channel. By the way, even the 1080p video on the 4K screen looks very good, I'm impressed.

By the way, the window from the applications, after installing the script are dragged quickly , almost as it was before the installation of the script, there are no protracted movements.

 

I agree with the opinion of @JMCC, for a component to work properly, it is important to have a properly configured system with the right kernel.

 

p.s.

By the way, when the desktop 4K resolution and full - screen video playback in YouTube, there was another problem-it is very difficult to see the mouse cursor, it is very small and have to look for a long time on the screen where it is. :)

But i'm can see much more information (video options or comments) immediately on the screen .... :)

Link to comment
Share on other sites

2 hours ago, Lev Lybin said:

ls -l /dev/mali*
ls: cannot access '/dev/mali*': No such file or directory

Thanks for testing. That just confirms my guess, that Rockpro64's kernel is missing the necessary modules for HW accel.

 

2 hours ago, Igor said:

Nightly

My fault, I told users in this post specifically to switch to nightly if it didn't work on stable, to test the changes we were pushing :)

Link to comment
Share on other sites

27 minutes ago, JMCC said:

My fault, I told users in this post specifically to switch to nightly if it didn't work on stable, to test the changes we were pushing


Ahaa. Sorry, my mistake as well :) 

Link to comment
Share on other sites

16 hours ago, Dante4 said:

Please, can someone run glmark2-es2 and glmark2-es2 --off-screen and post logs? Because I'm somewhat feel insanity right now. I have glamor initialized, i have GPU detected, but results just too low

Glamor does vsync by default, meaning that it adjusts the maximum frame rate to the screen refresh rate. That's the reason why you are getting scores of approximately 60fps.

 

You can disable vsync just for testing, by editing /etc/X11/xorg.conf.d/01-armbian-defaults.conf (there may be a typo, I am on the go now)

Link to comment
Share on other sites

12 minutes ago, JMCC said:

Glamor does vsync by default, meaning that it adjusts the maximum frame rate to the screen refresh rate. That's the reason why you are getting scores of approximately 60fps.

 

You can disable vsync just for testing, by editing /etc/X11/xorg.conf.d/01-armbian-defaults.conf (there may be a typo, I am on the go now)

The problem is - i don't get 60fps (or 30, or anything that could possible be my screen update rate). Logs says that everything is on, but benchmark shows otherwise. I get around 40 fps for most tests.

And for off-screen it shouldn't even matter, but NanoPi T4 gets ~500 score (at least that what i was told) and 59-60 fps in normal test (from screenshot on Friendlyelec wiki). So, i'm getting lost and starting to think that maybe i did something wrong. That's why i need to see results of other rk3399 boards

Edited by Dante4
Small addition
Link to comment
Share on other sites

On 1/24/2019 at 3:36 AM, JMCC said:

Thanks for testing. That just confirms my guess, that Rockpro64's kernel is missing the necessary modules for HW accel.

 

I'm running into this same problem on the rockpro64. Script was successful but no /dev/mali*. How can I get the necessary modules for HW accel?

 

From dmesg, I see the following:
 

[    3.831551] I : [File] : drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c; [Line] : 417; [Func] : mali_module_init(); svn_rev_string_from_arm of this mali_ko is '', rk_ko_ver is '5', built at '08:13:34', on 'Jan 10 2019'.
[    3.831839] Mali: Mali device driver loaded

 

Thanks!

Edited by xkaiser
Adding information about driver message in dmesg.
Link to comment
Share on other sites

7 hours ago, xkaiser said:

I'm running into this same problem on the rockpro64. Script was successful but no /dev/mali*. How can I get the necessary modules for HW accel?

It's a problem with Kernel config. I cannot deal with it now, since I am traveling for some days. When I come back, I plan to open a discussion about the subject, because it will probably require that the RockPro64 is moved to a different kernel if we want it to have 3D HW acceleration.

Link to comment
Share on other sites

Hi,

I know that my SBC does not have any armbian support (VAMRS ROCK960) BUT since it uses the RK3399 AND since i am running bionic on it, i am kindly asking for support from here : i am trying to build KODI v18.1 with these three FFmpeg compile options added to its CMakeLists.txt : --enable-version3 --enable-libdrm --enable-rkmpp AND it does not build by throwing me this error : ERROR: rockchip_mpp not found using pkg-config BUT if i launch manually the FFmpeg configure command from inside its directory, it configures without any complaint...

How to make pkg-config to find rockchip_mpp from inside KODI build process ? I have tried to set PKG_CONFIG_PATH into FFmpeg CMakeLists.txt BUT it does not help...

Thanks for any help !

Link to comment
Share on other sites

6 hours ago, ne0zone75 said:

Hi,

I know that my SBC does not have any armbian support (VAMRS ROCK960) BUT since it uses the RK3399 AND since i am running bionic on it, i am kindly asking for support from here : i am trying to build KODI v18.1 with these three FFmpeg compile options added to its CMakeLists.txt : --enable-version3 --enable-libdrm --enable-rkmpp AND it does not build by throwing me this error : ERROR: rockchip_mpp not found using pkg-config BUT if i launch manually the FFmpeg configure command from inside its directory, it configures without any complaint...

How to make pkg-config to find rockchip_mpp from inside KODI build process ? I have tried to set PKG_CONFIG_PATH into FFmpeg CMakeLists.txt BUT it does not help...

Thanks for any help !

Well, all I can say is that using the librockchip-mpp-dev package from my script, I have no problem compiling kodi. Have you tried it?

Link to comment
Share on other sites

1 hour ago, JMCC said:

Well, all I can say is that using the librockchip-mpp-dev package from my script, I have no problem compiling kodi. Have you tried it?

 

Yes, i installed it a few hours ago AND KODI GBM is compiling right now !

 

I also ran your script and it went fine :thumbup: BUT your KODI GBM does not start sadly and i do not know how to troubleshoot it because i do not know where to look at... if i understood correctly, KODI GBM must be launched from a terminal session without any X server running right ? When i do this, my SBC is freezed and i must AC unplug / replug it. I also tried to launch it though a systemd service and it does not happen anything BUT my SBC does not freeze in that case... you will find it below...

 

[Unit]
Description=kodi-standalone using GBM
Requires=dbus.service
After=systemd-user-sessions.service network.target sound.target network-online.target

[Service]
User=kodi
Group=kodi
Type=simple
SupplementaryGroups=audio input video
PAMName=login
ExecStart=/usr/bin/dbus-launch --exit-with-session /usr/bin/kodi -- --windowing gbm --standalone
StandardInput=tty-force
TTYPath=/dev/tty3
Restart=on-abort

[Install]
WantedBy=multi-user.target

 

Anyway, thanks for your assistance and congratulations for your work, you did very well ! :thumbup:

Link to comment
Share on other sites

8 hours ago, ne0zone75 said:

When i do this, my SBC is freezed

Yes, that means Kodi is working :) As a matter of fact, that is caused by a DRM bug in the kernel. Our RK3399 kernel has a patch to work around it. I assume you are not using Armbian, right?

Link to comment
Share on other sites

1 hour ago, JMCC said:

Yes, that means Kodi is working :) As a matter of fact, that is caused by a DRM bug in the kernel. Our RK3399 kernel has a patch to work around it. I assume you are not using Armbian, right?

 

No, i am using bionic ARM64 for my SBC. Do you think that i can recompile my kernel with that patch applied on it ?

 

Thanks

Link to comment
Share on other sites

2 minutes ago, JMCC said:

 

OK thank you ! I tried it a few hours ago AND KODI GBM is now working on my ROCK960 ! :D

 

Do you have any idea about how enabling CEC and audio passthrough please ?

 

My best regards

Link to comment
Share on other sites

1 minute ago, dragonlost said:

After install and reboot in my nanopi-m4 board ( kernel 4.4 Ubuntu Bionic), no have icon on my desktop (ubuntu mate) but when i click in desktop, application run.

As if the icons was there but we can not see them anymore.

is very strange.

 

Is it possible that you have compositing enabled?

Link to comment
Share on other sites

10 hours ago, dragonlost said:

how can i know if it is activated?

XFCE Start Menu -> Settings -> Window manager tweaks -> Compositing tab

 

(I am writing by memory, maybe the names are a bit different)

Link to comment
Share on other sites

@JMCC - testing on rockpro64 with ayufan's bionic here, almost got it .. working on getting the drm_getunqiue patch applied to ayufan's 4.4.167 rock64/rockpro64 kernel now and all should work.  This should get kodi-gbm working with rock64 also.

 

sidenote - was also able to install/boot ayufan's kernel on Armbian rockpro64 bionic.  It has /dev/mali, etc, and should work there also once this patch is applied.


EDIT: new kernel is up with patch applied -- this kernel should work with armbian bionic rockpro64 rk3399 media-script.

https://github.com/ayufan-rock64/linux-kernel/releases

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines