RaspberryPi 4 上的 JavaFX 17 Gluon 不会绘制到第二台显示器

如何解决RaspberryPi 4 上的 JavaFX 17 Gluon 不会绘制到第二台显示器

我正在尝试编写一个应用程序,该应用程序使用连接到 JavaFX 中的 RaspberryPi 4 的两个监视器。我已经尝试过来自 Gluon 和其他类似来源的现有演示代码。

我从这里使用 64 位测试版操作系统: https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2021-04-09/

Raspberry Pi4 是新的,连接了两个 1920x1080 显示器。

raspi-config 设置为引导至控制台(无 GUI)。

Java 安装使用:

    sudo apt install default-jdk

我可以在两台显示器上看到提示和启动消息。

我从这里使用 Gluon 的“JavaFX Linux AArch64 SDK + Monocle”v17:https://gluonhq.com/products/javafx/

我的演示代码在这里:https://github.com/maehem/JavaFXDualScreenDemo

根据演示,我应该能够创建两个“舞台”对象,每个对象都渲染到自己的屏幕上。

当我运行这些演示时,我只将两个 Stage 渲染到主监视器。在启动时,我可以看到红色网格渲染半秒,然后被绿色网格覆盖。第二个显示器在启动时变为空白,并且没有任何内容呈现在其上。

我的 /boot/config.txt 设置:

# Enable DRM VC4 V3D drive
max_framebuffers=2
arm_64bit=1
gpu_mem=512
#hdmi_force_hotplug:0=1
#hdmi_force_hotplug:1=1
dtoverlay=vc4-fkms-v3d

我尝试过的事情: 我已经在两台显示器上尝试了“hdmi_force_hotplug”选项,但没有更好的结果。

更新: 我得到了第二个 Pi4 并安装为我的笔记显示在这里。相同的结果,都在同一屏幕上呈现:

Install RaspiOS:
http://downloads.raspberrypi.org/raspios_arm64/images/

/boot/config.txt  (make sure you are using ‘fkms’ )
# Enable DRM VC4 V3D drive
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
arm_64bit=1
gpu_mem=512

sudo apt install default-jdk
 java -version

Download: https://gluonhq.com/download/javafx-17-ea-sdk-linux-aarch64/
Get Monocle edition!
sudo mv javafx-sdk-17.zip /opt
cd /opt
sudo unzip javafx-sdk-17.zip

vi .bashrc 
    ==>   export ENABLE_GLUON_COMMERCIAL_EXTENSIONS=true

这是运行时的日志。我们可以清楚地看到Java找到了两个Screen对象。

./run-hello 
Failed to open initctl fifo: Permission denied
Failed to talk to init daemon.
Prism pipeline init order: es2 sw 
Using Double Precision Marlin 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_monocle
    succeeded.
GLFactory using com.sun.prism.es2.MonocleGLFactory
[GluonDRM] use GPU at /dev/dri/card1 and display id -1
S0 NOT defined: 
Master set for 9: 0
[GluonDRM] We have 2 connectors
[GluonDRM] mode[0]: 1920x1080
[GluonDRM] mode[1]: 1920x1080
[GluonDRM] mode[2]: 1920x1080i
[GluonDRM] mode[3]: 1920x1080i
[GluonDRM] mode[4]: 1920x1080
[GluonDRM] mode[5]: 1920x1080
[GluonDRM] mode[6]: 1280x720
[GluonDRM] mode[7]: 1280x720
[GluonDRM] mode[8]: 1024x768
[GluonDRM] mode[9]: 1440x480i
[GluonDRM] mode[10]: 800x600
[GluonDRM] mode[11]: 800x600
[GluonDRM] mode[12]: 720x480
[GluonDRM] mode[13]: 720x480
[GluonDRM] mode[14]: 720x480i
[GluonDRM] mode[15]: 720x480i
[GluonDRM] mode[16]: 640x480
[GluonDRM] mode[17]: 640x480
[GluonDRM] ID for connector[0] = 89,width = 1920 and height = 1080
[GluonDRM] Height was 0 and is now 1080
[GluonDRM] mode[0]: 1920x1080
[GluonDRM] mode[1]: 1920x1080
[GluonDRM] mode[2]: 1920x1080i
[GluonDRM] mode[3]: 1920x1080i
[GluonDRM] mode[4]: 1920x1080
[GluonDRM] mode[5]: 1920x1080i
[GluonDRM] mode[6]: 1600x1200
[GluonDRM] mode[7]: 1680x1050
[GluonDRM] mode[8]: 1400x1050
[GluonDRM] mode[9]: 1600x900
[GluonDRM] mode[10]: 1280x1024
[GluonDRM] mode[11]: 1280x1024
[GluonDRM] mode[12]: 1440x900
[GluonDRM] mode[13]: 1280x960
[GluonDRM] mode[14]: 1280x800
[GluonDRM] mode[15]: 1152x864
[GluonDRM] mode[16]: 1280x720
[GluonDRM] mode[17]: 1280x720
[GluonDRM] mode[18]: 1280x720
[GluonDRM] mode[19]: 1440x576
[GluonDRM] mode[20]: 1024x768
[GluonDRM] mode[21]: 1024x768
[GluonDRM] mode[22]: 1024x768
[GluonDRM] mode[23]: 1440x480
[GluonDRM] mode[24]: 1440x480
[GluonDRM] mode[25]: 832x624
[GluonDRM] mode[26]: 800x600
[GluonDRM] mode[27]: 800x600
[GluonDRM] mode[28]: 800x600
[GluonDRM] mode[29]: 800x600
[GluonDRM] mode[30]: 720x576
[GluonDRM] mode[31]: 720x576i
[GluonDRM] mode[32]: 720x480
[GluonDRM] mode[33]: 720x480
[GluonDRM] mode[34]: 720x480i
[GluonDRM] mode[35]: 720x480i
[GluonDRM] mode[36]: 640x480
[GluonDRM] mode[37]: 640x480
[GluonDRM] mode[38]: 640x480
[GluonDRM] mode[39]: 640x480
[GluonDRM] mode[40]: 640x480
[GluonDRM] mode[41]: 720x400
[GluonDRM] mode[42]: 720x240
[GluonDRM] mode[43]: 720x240
[GluonDRM] ID for connector[1] = 153,width = 1920 and height = 1080
Master dropped: 0
eglinit ok 
eglbind ok 
eglCreateWindowSurface called
(X) Got class = class com.sun.prism.es2.ES2Pipeline
Initialized prism pipeline: com.sun.prism.es2.ES2Pipeline
requested number of screens,return 2
[GluonDRM] getWidth asked,return 1920
[GluonDRM] doGetHeight asked,vs = 0,fbw = 3840,fbh = 1080
[GluonDRM] getWidth asked,fbh = 1080
Maximum supported texture size: 4096
Non power of two texture support = true
Maximum number of vertex attributes = 16
Maximum number of uniform vertex components = 16384
Maximum number of uniform fragment components = 16384
Maximum number of varying components = 64
Maximum number of texture units usable in a vertex shader = 16
Maximum number of texture units usable in a fragment shader = 16
Graphics Vendor: Broadcom
       Renderer: V3D 4.2
        Version: OpenGL ES 3.1 Mesa 19.3.2
 vsync: true vpipe: true
Screen bounds: Rectangle2D [minX = 0.0,minY=0.0,maxX=1920.0,maxY=1080.0,width=1920.0,height=1080.0]
Number of screens found: 2
Parsing screen: javafx.stage.Screen@a1603782 bounds:Rectangle2D [minX = 0.0,height=1080.0] visualBounds:Rectangle2D [minX = 0.0,height=1080.0] dpi:96.0 outputScale:(1.0,1.0)
Parsing screen: javafx.stage.Screen@ec83c09b bounds:Rectangle2D [minX = 1920.0,maxX=3840.0,height=1080.0] visualBounds:Rectangle2D [minX = 1920.0,1.0)
ES2ResourceFactory: Prism - createStockShader: Solid_Color.frag
ES2ResourceFactory: Prism - createStockShader: DrawPgram_Color.frag
ES2ResourceFactory: Prism - createStockShader: Solid_TextureFirstPassLCD.frag
ES2ResourceFactory: Prism - createStockShader: Solid_TextureSecondPassLCD.frag
ES2ResourceFactory: Prism - createStockShader: Solid_TextureRGB.frag
[GluonDRM] realswapbuffer called
Gluon Commercial Features unlocked
[GluonDRM] eglSwapBuffers ok
[GluonDRM] realswapbuffer called
[GluonDRM] eglSwapBuffers ok
^C[GluonDRM] realswapbuffer called
QuantumRenderer: shutdown
[GluonDRM] eglSwapBuffers ok

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 <select id="xxx"> SELECT di.id, di.name, di.work_type, di.updated... <where> <if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 <property name="dynamic.classpath" value="tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -> systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping("/hires") public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate<String
使用vite构建项目报错 C:\Users\ychen\work>npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-