Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing is displayed with JDK17 and Monocle headless mode for RPi@aarch64 #135

Open
eximius313 opened this issue Feb 1, 2022 · 0 comments

Comments

@eximius313
Copy link

eximius313 commented Feb 1, 2022

  1. I've followed guidelines from the docs
  2. I've used 64 bit version or RaspiOS
  3. I've set "Boot to CLI" using raspi-config:
System Options -> Boot / Auto Login -> B1 Console
  1. I've set 512 MB for GPU Memory using raspi-config:
Performance Options -> GPU Memory -> 512
  1. I've installed JDK 17 using SDKMAN:
sdk install java 17.0.2-tem
pi@raspberrypi:~ $ java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
  1. Because I want to use JavaFX in headless mode, I've downloaded Monocle SDK (and not regular one)
  2. Ive installed required libraries:
"sudo apt install libegl-mesa0 libegl1 libgbm1 libgles2 libpango-1.0-0 libpangoft2-1.0-0"

(you have a typo in documentation by the way - it should be libpango-1.0-0 and not libpango-1.0.0)

  1. I've installed Gluon:
sudo mv ./openjfx-17.0.2_monocle-linux-aarch64_bin-sdk.zip /opt/
cd /opt
unzip openjfx-17.0.2_monocle-linux-aarch64_bin-sdk.zip
  1. I've cloned the sample:
cd ~pi
git clone https://github.com/openjfx/samples.git
cd samples/CommandLine/Modular/CLI/hellofx

compiled it:

javac --module-path /opt/javafx-sdk-17.0.2/lib --add-modules=javafx.controls src/hellofx/HelloFX.java -d dist

and run it:

sudo -E java -Dmonocle.platform=EGL -Dembedded=monocle -Dglass.platform=Monocle -Degl.displayid=/dev/dri/card1 -Dmonocle.egl.lib=/opt/javafx-sdk-17.0.2/lib/libgluon_drm-1.1.6.so --module-path /opt/javafx-sdk-17.0.2/lib/ --add-modules javafx.controls -cp dist/. hellofx.HelloFX

application runs:

[GluonDRM] use GPU at /dev/dri/card1 and display id -1
S0 NOT defined:
[GluonDRM] We have 2 connectors
[GluonDRM] ID for connector[0] = 32, width = 1920 and height = 1080
[GluonDRM] Height was 0 and is now 1080
[GluonDRM] ID for connector[1] = 32, 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
[NODRM] set cursor to 960, 540
SETCURSORIMAGE! with 1024 bytes
Gluon Commercial Features not unlocked.
Set the environment variable ENABLE_GLUON_COMMERCIAL_EXTENSIONS and
check the file <sdk>/legal/javafx.graphics/gluon.md for license information.

but nothing new is shown on screen (the Console still displays login prompt)

When I do:

export ENABLE_GLUON_COMMERCIAL_EXTENSIONS=true

application starts with:

[GluonDRM] use GPU at /dev/dri/card1 and display id -1
S0 NOT defined:
[GluonDRM] We have 2 connectors
[GluonDRM] ID for connector[0] = 32, width = 1920 and height = 1080
[GluonDRM] Height was 0 and is now 1080
[GluonDRM] ID for connector[1] = 32, 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
[NODRM] set cursor to 960, 540
SETCURSORIMAGE! with 1024 bytes
Gluon Commercial Features unlocked

but despite console login prompt going away - screen just flashes briefly and nothing is displayed

Of course, if I download regular SDK:

wget https://download2.gluonhq.com/openjfx/18/openjfx-18-ea+10_linux-aarch64_bin-sdk.zip

instead of Monocle, I get:

java.lang.ClassNotFoundException: com.sun.glass.ui.monocle.MonoclePlatformFactory

What can I do to see the app on the screen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant