JavaFX 8 on BeagleBone Black (SGX driver problem?)

Hello,

I am trying to run the newest JavaFX 8 snapshot release on the beaglebone black. So far I haven’t got it running, the debug output shows the following:

Multi-Threading Enabled
Prism pipeline init order: es2
Using platform text rasterizer
Using java-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library … prism_es2_eglfb
Loaded /opt/jdk1.8.0/jre/lib/ext/…/arm/libprism_es2_eglfb.so from relative path
succeeded.
GLFactory using com.sun.prism.es2.EGLFBGLFactory
eglGetConfigAttrib failed!(X) Got class = class com.sun.prism.es2.ES2Pipeline
GraphicsPipeline.createPipeline: error initializing pipeline com.sun.prism.es2.ES2Pipeline
Graphics Device initialization failed for : es2
Error initializing QuantumRenderer: no suitable pipeline found

What I’ve done:

I’ve found the error string in the OpenJFX sources, but to get more information, I’d need to create a debug build of the prism-es2 module (or maybe from the whole OpenJDK), which at this point I don’t know how to do. Maybe somebody knows what the problem might be.

From /rt/modules/graphics/src/main/native-prism-es2/eglfb/EGLFBGLFactory.c:


if (!eglChooseConfig(egldisplay, eglAttrs, &config, 1, &numconfigs)) {
fprintf(stderr, “Failed to get a FBconfig with requested attrs\n”);
//cleanup
return 0;
}

#ifdef DEBUG
printf(“eglChooseConfig return %d configs\n”, numconfigs);
#endif

if (!eglGetConfigAttrib(egldisplay, config, EGL_CONFIG_ID, &configId)) {
fprintf(stderr, “eglGetConfigAttrib failed!”);
return 0;
}

#ifdef DEBUG
printf(“EGL: Using config #%d\n”, configId);
printConfig(egldisplay, config);
#endif

Regards,
Michael

Sorry I can’t help you but maybe you can help me.

I’m using your exact configuration…

But I still read

root@arm:/opt/Graphics_SDK_setuplinux_5_00_00_01/gfxsdkdemos/ogles2# ./OGLES2ChameleonMan
PVRShell: EGL 1.4 initialized
Exit message has been set to: "PVRShell: Unable to create surface
".
InitAPI failed!
PVRShell: Unable to create surface

I’ve loaded the modules, I’ve installe the libraries in
gfx_rel_es8.x

Please tell me what did you load from the Graphics SDK?

Sorry I can’t help you but maybe you can help me.

I’m using your exact configuration…

But I still read

root@arm:/opt/Graphics_SDK_setuplinux_5_00_00_01/gfxsdkdemos/ogles2# ./OGLES2ChameleonMan
PVRShell: EGL 1.4 initialized
Exit message has been set to: "PVRShell: Unable to create surface
".
InitAPI failed!
PVRShell: Unable to create surface

I’ve loaded the modules, I’ve installe the libraries in
gfx_rel_es8.x

Please tell me what did you load from the Graphics SDK?

Hi Giuseppe,

Here is what I did to make this work:

Download the Graphics SDK from here:

http://software-dl.ti.com/dsps/dsps_public_sw/gfxsdk/5_01_00_01/index_FDS.html

Use the hardfp version if you are using Debian.

Make the file executable and install. Update the Rules.make file to reflect your environment. Here is an example:

Do you need the JavaFX 8 graphics capabilities? If not, can you run it with graphics disabled?

On the chance that there might be useful information in them, here are two links for java I have from my days of noodling around with the raspi:

http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html

http://www.savagehomeautomation.com/raspi-jdk8

And it worked!!!

Thank you very much John and Robert!

Now I’m heading to QT5 realm!

Do you need the JavaFX 8 graphics capabilities? If not, can you run it with graphics disabled?

I do need the graphics capabilities (otherwise I wouldn’t use FX :wink: so I cannot disable the graphics.

On the chance that there might be useful information in them, here are two links for java I have from my days of noodling around with the raspi: …

Thanks for the links but unfortunately they don’t help. I have a Raspi and I can also run my JavaFX applications on it without problems. But they are rather slow on the Raspi so I wanted to do some performance tests with the BBB hardware.

Hi littlf…
Did you find how to get jdk8 and javafx running on BBB?
I’m trying to do the same (RasPi was to slow, so I want to see if BBB does better).
Also, how do you use sound in JavaFx+ RPi ??? (AudioClip and all media doesnt work on RPi)
Thanks
(It’s been 2 days fighting with BBB, any herlp will be appreciated)
@rodrinauta

Can any one post some updated info on getting JavaFX running on BBB with the latest Debian. I’m new building kernels in Linux. I’m trying to get JavaFX running on a BBB through the HDMI port and if possible a touchscreen like the BB-VIEW or 4D. Any help would be greatly appreciated, even if its just a link to an article I may have missed in my searh.

Thanks,
Greg

Managed to get OpenJFX (open source version of JavaFX) working on the BBB, however it is running on Ubuntu. Got a sample JavaFX program (Ensemble) working by accident on X11 by specifying a renderer that isn’t supported by OpenJFX. Key part here is that you must specify the unsupported renderer otherwise no JavaFX program will start, and some errors will appear in the terminal. Automatic renderer detection with OpenJFX is currently broken.

Big mystery as to what renderer is being used since it isn’t listed in the Monocle wiki page on the OpenJDK website. X11 render doesn’t work just in case anyone was wondering. Note that there are no existing builds of OpenJFX available to use on the BBB. A custom build must be created which is only compatible with Java SE 8 Embedded and Java SE 8.

You’re not going to like this suggestion. Far better option to get JavaFX and OpenJFX working and performing well is to run JavaFX programs on a Wandboard (eg the Dual version) since all the Vivante GPUs are supported, even graphics acceleration via both GPUs. Sadly the GPU on the BBB will NEVER be fully supported as long as Imagitech refuse to completely release the specifications for all of its GPUs.

Plenty of people are in the same situation with trying to get the SGX GPU working on the BBB but to no avail. So much time spent trying to get the GPU supported. To make matters worse the Beaglebone Foundation’s upcoming Beagleboard X15 also contains a SGX GPU. Extremely FRUSTRATING!

Much better off spending the money on a Wandboard to get JavaFX programs running easily. Ubuntu/Debian have a package containing the open source Vivante GPU driver which covers most of the Vivante GPUs (2D and 3D ones). Easy as pie to install the GPU driver via apt-get (single step). Wish it was the same with the BBB.

Why does the Beaglebone Foundation always insist on using a SGX GPU in every board that gets released?

Hey Nick,

I'd love to see your setup that got it working on ubuntu. I can setup
a *.deb package on: http://repos.rcn-ee.net/

Regards,

For reference, which package is that? The x15's got a 2D engine from
Vivante.. Does it still rely on a blob from vivante to build the
final package?

Regards,

Found a closed source Vivante GPU driver package (gpu-viv-bin-mx6q) however it is heavily tied into a Freescale ARM CPU. Will see if I can the name of the open source one. Saw it somewhere on the Phoenix (Linux gamer/performance website).

Open source GPU driver is called etna_viv. Phoronix have an article covering etna_viv. No package for the open source driver yet. Momentarily got confused with the gpu-viv-acc-fb package which only contains the closed source Vivante GPU driver, not the open source one that I thought the package had.

Darn! Thanks for the update, I've been loosely following etna_viv, was
hoping they got passed the freescale *.bin requirement..

Regards,

@Robert - Are you referring to OpenJFX for a Deb package. See that there is still no OpenJDK 8 package for Ubuntu/Debian, how annoying. OpenJFX (ARM) is reported to work on OpenJDK 8 (ARM).

Building OpenJDK is not for the faint of heart. Attempting to do so would likely result in a brain dump. Also a super computer would be required to do the build in quick time, which I don’t have.

Luckily doing a build of OpenJFX in desktop Linux is straightforward and can be done in around 30 min on a Intel Core 2 Duo laptop for example.

Yeap... deb package for arm for ubuntu/debian.. :wink:

Up until the last few release's i've been building chromium on my
imx6/2gb & omap5/2gb hardware, but even that's oom'ing now (even with
lpae enabled on the omap5..)... I'm hoping an a80/4gb that's coming
will fix that.

Regards,

Sounds as crazy like building DirectFB 1.6 on the BBB running Debian. Amazing considering the BBB only has 512 MB of RAM and swap isn’t enabled.

Below are some handy links for creating custom builds of OpenJDK and OpenJFX.

Hmmmm… Looks as though Debian officially has some packaging for OpenJFX, however they would need to also have packaging for OpenJDK 8 too in order for OpenJFX to work. Wonder if the packaging targets x86 only or if it extends to ARM as well. Robert - If you have time can you please look into this one.

Wonder if the OpenJFX package (package name?) has been uploaded to the Debian Unstable repository yet.