Jump to content

JMCC

Members
  • Posts

    941
  • Joined

  • Last visited

Everything posted by JMCC

  1. [UPDATE 2018/05/21: I have created a script to configure everything described in this tutorial, plus some more things. There will be no updates to the tutorial from now on. Please refer all the questions and bug reports to the script. It can be found here:] [UPDATE 2018/03/16: Fixed mpv package] [UPDATE 2018/03/01: Added OpenCL testing through GPU cryptocurrency mining] With the new default kernel based on rockchip-linux, boards with RK3288 SoC have now full kernel support for interacting with the GPU and hardware video decoder. Rockchip-linux also provides userspace libraries and other software to make everything work. In this tutorial, you'll learn to set everything up in a current Armbian Xenial default image. (Note: rockchip-linux uses Debian Stretch as their base distro for all their packages. So we would be better off using the Stretch Armbian image, but it is still not stable enough for production. Therefore, we are going to install a few backports over the Xenial image, to make everything work) Start by downloading and extracting this compressed file: https://mega.nz/#!hrxy0bra!pOD0L_vIaq3wn0DWwRGYGsT2PSUIJG-HZbcyrJ4m6As It contains all the packages I am going to refer to in the tutorial 1. Install backported X server from the ubuntu repos $ sudo apt install xserver-xorg-hwe-16.04 xserver-xorg-video-fbdev-hwe-16.04 2. Install libraries Install all the packages under the "libs" directory, in the file you downloaded and extracted. 3. Install and configure tweaked X server In order to make graphic acceleration work under X, rockchip-linux developers have created a tweaked X server. To enable it: You need to disable compositing. In the Xfce menu, navigate to "Settings > Window Manager Tweaks", choose the rightmost tab (Compositor), and uncheck "Enable display compositing". Install the packages under the "xserver" directory of our downloaded compressed file Make a backup of the file "/etc/X11/xorg.conf.d/01-armbian-defaults.conf", and replace its content with the following: Section "Device" Identifier "Rockchip Graphics" Driver "modesetting" Option "AccelMethod" "glamor" ### "glamor" to enable 3D acceleration, "none" to disable Option "DRI" "2" # You can disable Vsync for better 3D benchmark score, at the cost of worst video playing. Not recommended. # Option "Dri2Vsync" "false" EndSection Section "Screen" Identifier "Default Screen" SubSection "Display" Depth 24 Modes "1920x1080" "1280x1024" "1024x768" "800x600" EndSubSection EndSection 3. Restart X 4. Test 3D acceleration $ sudo apt install glmark2-es2 $ glmark2-es2 If everything is working, you shoud see a window with rotating 3D objects, and console output shoud start like this: ======================================================= glmark2 2014.03+git20150611.fa71af2d ======================================================= OpenGL Information GL_VENDOR: ARM GL_RENDERER: Mali-T760 GL_VERSION: OpenGL ES 3.2 v1.r14p0-01rel0-git(966ed26).eedaf0c5244add8e249cecdd3c721329 ======================================================= 5. Test video acceleration with MPV Install the package under the directory "mpv". When you play a video with this version, it will use GPU EGL accelerated video display, but decoding will still be via software. That means you can play up to 1080p@30fps HVEC quite smoothly, with around 80-90% CPU use. Anything above that resolution/fps will be jerky. In order to use full acceleration with MPV, you need to be under Wayland. I intend to do some other post on that, God willing. 6. Test video acceleration with Gstreamer The "official" way of using full HW video acceleration under X is via a special Gstreamer plugin created by the rockchip-linux developers. But we need to install a backported version of Gstreamer, in order for the plugin to work. Install all the packages in the "gstreamer-backport" directory Install all the packages in the "gstreamer" folder (these are for the rockchip plugin) Do "sudo apt -f install" for the unmet dependencies You can now play a video from command line with either of these commands: $ gst-launch-1.0 filesrc location=<videofile> ! decodebin ! videoconvert ! rkximagesink $ gst-play-1.0 --videosink=rkximagesink <videofile> This plugin uses GPU acceleration for display, through a KMS overlay, and also hardware decoding via the rockchip mpp interface. You can play 4k@30fps HEVC with perfect smoothness, while the CPU stays under 15% use. If you don't have any 4k video, you can try with this one: http://www.libde265.org/hevc-bitstreams/sintel-4096x1744-cfg02.mkv (Notice that if you try to display any subtitle, it will make the plugin crash). 7. Install a Gstreamer demo player Instead of launching videos through the command line, you can also install a simple video player that will use the rockchip plugin. Install the following packages: $ sudo apt-get install libqt5opengl5 libqt5qml5 libqt5quick5 libqt5widgets5 libqt5gui5 libqt5core5a qml-module-qtquick2 libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediaquick-p5 qtmultimedia5-examples qtmultimedia5-doc-html 2. Create the file "/usr/share/applications/demo-player.desktop" with the following content: #!/usr/bin/env xdg-open [Desktop Entry] Categories=Qt;KDE;AudioVideo;Player;Video; Comment=A gstreamer base player Exec=env QT_GSTREAMER_WIDGET_VIDEOSINK=rkximagesink /usr/lib/arm-linux-gnueabihf/qt5/examples/multimediawidgets/player/player --geometry 960x640+0+0 GenericName=Media Player Icon=/usr/share/icons/gnome/48x48/categories/applications-multimedia.png Name=Media Player Type=Application X-KDE-StartupNotify=false Keywords=movie;player;media;kde;qt; X-Ayatana-Desktop-Shortcuts=Screen;Window Now you will see an entry "Media Player" in the Xfce menu, and you can also choose to play video files with this player by right-clicking on them and choosing "Open with..." 8. Enable acceleration for Chromium For last, we are going to enable acceleration for Chromium Web Browser Backup the file "/etc/chromium-browser/default", and modify it to look like this: # Default settings for chromium-browser. This file is sourced by /bin/sh from # /usr/bin/chromium-browser # Options to pass to chromium-browser # A set of command line flags that we want to set by default. # Do not hide any extensions in the about:extensions dialog export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --show-component-extension-options" # Don't use the GPU blacklist (bug #802933) export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --ignore-gpu-blacklist" # Use EGL acceleration export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --use-gl=egl" Launch Chrome, and enter in the address bar "chrome://gpu". If everything is OK, you should see something like this: Now, go to the Chrome Web Store and install the extension "h264ify". It will force youtube to use H264 instead of VP9, which has no acceleration with RK3288. Enter Youtube and play any 1080p video. It should play fairly well, dropping frames only when some kind of overlay pops up (like an ad on top of the video, or the controls overlay). Test WebGL, for example with this page: http://webglsamples.org/aquarium/aquarium.html 9. NEW: Testing OpenCL with a GPU cryptocurrency miner Download either of these compiled GPU miners (each of them features diferent algorithms): https://goo.gl/gHrPGg / https://goo.gl/MTSgBG Untar them, cd into the directory and run them (in case you get an error, try doing "sudo make install"). E.g.: ./sgminer -k lyra2rev2 -o stratum+tcp://<url of pool>:<port> -u <your username> -p d=0.050 -I 14 -w 64 If you want to learn more, you can follow this tutorial: https://www.novaspirit.com/2017/12/21/gpu-mining-on-tinkerboard/ Mining with the skein algorithm: Please report your experiences and suggestions. Wayland testing stays in the to-do list. Thanks,.
  2. I'll try to post something about X video acceleration in these days, and maybe it can also make it into the image. It would be cool if users had 3D, accelerated video and Chrome webgl working out of the box when they downloaded the new images
  3. I think it would be good to include in the released image the files I am attaching. It's some udev rules to set the proper permissions on the video acceleration nodes. There is also another rule that triggers a script every time HDMI is plugged/unplugged, to allow hotplug. Right now, if you unplug the HDMI or the monitor goes to sleep mode, you are not able to bring the display back without a reboot. fixes.7z
  4. Yes, the drive is USB powered, but it doesn't take more than 900 mA (Toshiba Canvio Basics). Never had any problem in the multiple reboots I've done, neither before the failed kernel downgrade nor after restoring my backup.
  5. I got the board a few days ago, and installed "Armbian_5.38_Orangepiplus2e_Ubuntu_xenial_default_3.4.113_desktop.img". I've been using it quita a bit since then, and configured lots of stuff, but never did a kernel upgrade as far as I remember (well, you'll know better than me if there has been any kernel upgrade since the 5.38 image was uploaded). Here are the "armbianmonitor -u" logs: http://ix.io/FEj
  6. Hello. I just wanted to let you know about a possible bug I have found in the kernel installation script. I was using my OPi+2e with the default kernel, and today I installed next to test it, using armbian-config. Everything went fine, and seemed very stable overall (I didn'd use it for more than two or three hours, though). But then I wanted to revert to default, so I used armbian-config again. When I rebooted, the board started the u-boot sequence, but it got stuck on "Starting kernel". No other messages after that. I tried several times, with the same results. Since I have no logs, the only info I can give you is that I have an external USB HDD connected all the time, and right after appearing that last message "Starting kernel", the disk led always blinked shortly. Maybe it is related with u-boot trying to find the kernel in that drive. The strange thing is that there was no kernel panic message, nothing happened. (P.S.: I had made a nand backup before upgrading, so I just reflashed it and everythig went back to normal. So I can't give any further info in the bug).
  7. As I said before, I tested thoroughly 3D and video acceleration, and both work. Only that /dev/mali0 has permissions "600" by default, so you need to do a "chmod 666 /dev/mali0" in order to use 3D accel as a regular user. Permissions of /dev/vpu-service and /dev/hevc-service (video accel) are OK. I tested in both Ubuntu and Debian images. I managed to compile the Glamor-enabled X server for ubuntu, as well as some other driver for armsoc chip, which also has 3D acceleration. Performance is very good in 3D, not so good in video. Full video HW acceleration, though, requires a special gstreamer plugin, which I wasn't able to compile for Ubuntu, but I could test it in Debian. If someone has interest, I could upload the debs and post a little howto.
  8. Quick post just to say that I tested 3D and video accel, and it works. I'll post more on it later, when Igor's issue is solved.
  9. JMCC

    RK3399 Orange Pi

    Finally an OS image: http://www.orangepi.org/downloadresources/
  10. First linux image for H6 Orange Pi boards available: http://www.orangepi.org/downloadresources/
  11. +1 for the decision to switch to the Rockchip kernel. It is under very active development (several commits a week), and incorporating all that work into Armbian would be a great asset. However, they are also developing different kind of stuff related to video HW acceleration (GLES libraries, X server, gstreamer, mplayer, kodi, etc.), but they only support Debian Stretch in their releases. I suggest to switch to Stretch for the default image, so we can also take advantage of that too.
  12. Hi. When you install RPi monitor on a board using legacy 3.4 kernel (in my case, Orange Pi Plus2e), you can notice an error message in the "Memory" section of the web interface, as well as a very weird big number of used memory. That is caused because it tries to read some value from /proc/meminfo (named "MemAvailable") that wasn't implemented in that version of the kernel (I think it was implemented in 3.14, if I remember well). So I have made a custom version of the memory module, which gets the value for used and available memory using the same algorythm as HTOP, which has been many years around being very useful. I am attaching the file "memory_legacy.conf". In order to use it: Copy it to /etc/rpimonitor/template/ Edit /etc/rpimonitor/data: Change: include=/etc/rpimonitor/template/memory.conf for: include=/etc/rpimonitor/template/memory_legacy.conf Maybe the devs could include it in the default installation, if they see fit. memory_legacy.conf
  13. Hello. I have an OPi +2e, with Ubuntu 16.04 and legacy kernel 3.4.113-sun8i. I tried to install Nextcloud via a Snap package, but got this error: error: cannot perform the following tasks: - Run configure hook of "nextcloud" snap if present (run hook "configure": cannot open mount namespace of the init process (O_PATH): No such file or directory) I googled for the message, and found out that there are some bits needed in the kernel, for Snap to work (see https://forum.snapcraft.io/t/nextcloud-snap-install/2674/3 ). Has anybody got this to work? Maybe with mainline kernel?
  14. Well, it depends on the specific kernel patches. A solution could be to manually edit the patch that is causing trouble, but that's something that requires high programming skills. Or hit and miss with some other checkouts. Another suggestion would be to switch to another kernel, in case it is possible with your board (I'm not sure whether there are mainline and legacy stable versions for the UDOO Quad).
  15. JMCC

    RK3399 Orange Pi

    There's something I don't get. It's been out for a few days already, and there is no OS image to download, even an Android one. What are you supposed to do with it after you buy it?
  16. So, as I imagined, it is a problem with your kernel's specific patches. So now, you've got to look among the Git commits, until you find one that might be causing the problem. You need to browse the log: https://git.linuxtv.org/media_build.git/log/ In a quick look, it looks like the patch that is failing is related v4.6_i2c_mux.patch, and there is a commit from 2017/08/14 patching that file. Try reverting to the previous commit, instead of the one I told you. If you click on the link of the prevoius commit, it will show you the id: "3a2afb881d1efadba33831f9c56321c4bcbe7178". So you would need to modify step 4, to look like: git checkout 3a2afb881d1efadba33831f9c56321c4bcbe7178 For step 6, you also need to find a file with a matching date in http://linuxtv.org/downloads/drivers/ But, since the commit is from the same date of the source tarball, it may work with the one you already have. If not, use the immediately previous one (that would be "linux-media-2017-07-29-ec0c3ec497ca.tar.bz2", and corresponding ".md5"). If it fails again, then you'll need to try with another commit, etc.
  17. I'm using Debian Stretch, but that should not be relevant for that error. Maybe the kernel version is (your kernel is not identical to mine) Though, your error is the same I got before making the changes I mention above. So please make sure you are doing exactly this: rm -rf media_build git clone git://linuxtv.org/media_build.git cd media_build git checkout b1a305fb27ad5df895356baeff575a1ecb14ebf1 nano build (edit as described above) nano linux/Makefile (edit as described above) ./build sudo make install
  18. Looks weird. We haven't touched the firmware tarball part. Maybe they were updating the repo, and had some corrupted file in the meantime. I just downloaded it, and seems to be fine. Can you delete the media_build folder and start over again?
  19. Hello. I also needed dvb drivers fo the Thinker Board, and compiled them a few days ago. Only that the latest GIT failed to compile with kernel 4.4, so I had to switch to an older commit, more specifically 2017-08-20. So I would try with your suggestion (just remove the "make" after "./build", it is not necessary). In case it fails, try this: git clone git://linuxtv.org/media_build.git cd media_build git checkout b1a305fb27ad5df895356baeff575a1ecb14ebf1 Notice that the build script will try to auto-update the build environment, and also download the latest drivers which won't work. So you need to do some manual edits: "build": Find and remove this part: print "****************************\n"; print "Updating the building system\n"; print "****************************\n"; run("git pull git://linuxtv.org/media_build.git master", "Can't clone tree from linuxtv.org"); "linux/Makefile": Find these lines: LATEST_TAR := http://linuxtv.org/downloads/drivers/linux-media-LATEST.tar.bz2 LATEST_TAR_MD5 := http://linuxtv.org/downloads/drivers/linux-media-LATEST.tar.bz2.md5 and replace with: LATEST_TAR := http://linuxtv.org/downloads/drivers/linux-media-2017-08-08-079c6eaf80d9.tar.bz2 LATEST_TAR_MD5 := http://linuxtv.org/downloads/drivers/linux-media-2017-08-08-079c6eaf80d9.tar.bz2.md5 Then, you are good to go: ./build sudo make install That worked for me.
  20. I just noticed the Debian stretch image for the Tinkerboard, downloaded it and tried it. No HDMI sound. Is there a way to enable it, just like the one you pointed our for the USB audio?
  21. Okay, so I figured out a way to connect my Tinker to wired ethernet, and did the remaining tests. As expected, files play perfectly. I also did some tests regarding graphics, but I will start another thread for that.
  22. Yep. The problem is that the flac binary is not included in the image, and since it has no network it would be very difficult to install it. However, FLAC files are played OK by Chromium, and other WAV files with the same frequency and sample size are played OK by aplay too. So I think the driver is working fine.
  23. I tested it with a linaro-rockchip Git image I built on 2018/01/04. There are two programs capable of audio playing in the linaro-rockchip image, namely, aplay and Chromium Browser (and I cannot install any other, since networking is broken in the image). I tried with an assorted set of files, with different sample sizes and frequencies, from 16b/44khz to 24b/192khz. Some of them were in WAV and others in FLAC format. Results were: Chromium Browser plays all files perfectly. aplay plays WAV files OK, but when you try FLAC files it makes a horrible loud noise. My guess is that it doesn't recognize FLAC format, and reads the files as raw audio data. So it looks like the driver is working OK, and the problem is only with aplay.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines