Reputation: 1
I've been trying to get the libgluon_drm.so driver from GluonFX to display JavaFX apps direct to DRM on a Mekotronics R58x, a SBC which has a rk3588 chip. My R58x is running Armbian 23.08.0-trunk on Linux kernel 5.10.16. The GluonFX Documentation claims that embedded functionality is supported on Aarch64 systems, but does not work on my system from my testing.
To test out Gluon Embedded i started by downloading libgluon_drm-1.1.7.so driver from Gluon's documentation, then built and ran HelloFx from openjfx samples with Gradle 8.5 using openjdk 17.0.11. Below is the build.gradle used to build and run HelloFx:
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'org.beryx.jlink' version '2.26.0'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.openjfx:javafx-controls:17'
implementation 'org.openjfx:javafx-fxml:17'
implementation 'org.openjfx:javafx-graphics:17.0.1:linux-aarch64-monocle'
}
javafx {
version = "17"
modules = [ 'javafx.controls', 'javafx.graphics']
}
application {
mainClass = "hellofx.HelloFX"
mainModule = "hellofx"
applicationDefaultJvmArgs = [
'-Dmonocle.platform=EGL',
'-Dembedded=monocle',
'-Dglass.platform=Monocle',
'-Duse.egl=true',
'-Degl.displayid=/dev/dri/card0',
'-Dmonocle.egl.lib=/usr/lib/aarch64-linux-gnu/jni/libgluon_drm-1.1.7.so',
'-Dmonocle.cursor.enabled=false'
]
}
jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'hellofx'
jvmArgs = [
'-Dmonocle.platform=EGL',
'-Dembedded=monocle',
'-Dglass.platform=Monocle',
'-Duse.egl=true',
'-Degl.displayid=/dev/dri/card0',
'-Dmonocle.egl.lib=/usr/lib/aarch64-linux-gnu/jni/libgluon_drm-1.1.7.so',
'-Dmonocle.cursor.enabled=false'
]
}
}
The application builds without error then begins to run, the hellofx window appearing for a fraction of a second, then the entire screen turns black. The application doesn't crash but keeps running with the black screen. Using --debug or --stacktrace on gradlew does not reveal any missing files or exceptions. journalctl and dmesg reveal no relevant messages as to why egl or drm could be failing.
This is the output of the cli of running HelloFx with sudo -E ./gradlew run:
[GluonDRM] use GPU at /dev/dri/card0 and display id -1
S0 NOT defined:
[GluonDRM] We have 2 connectors
[GluonDRM] ID for connector[0] = 205, width = 1920 and height = 1080
[GluonDRM] Height was 0 and is now 1080
[GluonDRM] ID for connector[1] = 205, width = 1920 and height = 1080
eglinit ok
eglbind ok
eglCreateWindowSurface called
requested number of screens, return 2
[GluonDRM] getWidth asked, return 1920
[GluonDRM] doGetHeight asked, vs = 0, fbw = 3840, fbh = 1080
[GluonDRM] getWidth asked, return 1920
[GluonDRM] doGetHeight asked, vs = 0, fbw = 3840, fbh = 1080
Gluon Commercial Features unlocked
The gluon documentation's fix for this issue is to go into /boot/config.txt
and add dtoverlay=vc4-fkms-v3d
, however this device tree overlay is Raspberry Pi exclusive, so it leads me to believe that Gluon Embedded functionality only works with Raspberry Pi 4.
Can anyone identify the issue that's causing egl to draw a black screen?
Upvotes: 0
Views: 73