You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.
Running a JavaFX application on Ubuntu 20.04.1 LTS does not scale as expected. The font and other controls are tiny on a 3840 x 2160 screen with a scale factor of 200%. The same application works well on Windows 10 with the same scaling.
Here is an example for Windows 10 that shows a scaling of 2.0.
The example for Ubuntu 20 show that it is not working correctly. You can see that the factor is always 1.0 no matter what is set in the Ubuntu environment. Here you can see the settings.
The debug output shows that the system is "Opting in for HiDPI pixel scaling" (Prism SW Pipeline):
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
succeeded.
GLFactory using com.sun.prism.es2.X11GLFactory
(X) Got class = class com.sun.prism.es2.ES2Pipeline
Failed Graphics Hardware Qualifier check.
System GPU doesn't meet the es2 pipe requirement
GraphicsPipeline.createPipeline: error initializing pipeline com.sun.prism.es2.ES2Pipeline
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
(X) Got class = class com.sun.prism.sw.SWPipeline
Initialized prism pipeline: com.sun.prism.sw.SWPipeline
vsync: true vpipe: false
The same result with GPU usage (using "-Dprism.forceGPU=true"):
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
succeeded.
GLFactory using com.sun.prism.es2.X11GLFactory
(X) Got class = class com.sun.prism.es2.ES2Pipeline
Initialized prism pipeline: com.sun.prism.es2.ES2Pipeline
Maximum supported texture size: 16384
Maximum texture size clamped to 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 = 128
Maximum number of texture units usable in a vertex shader = 16
Maximum number of texture units usable in a fragment shader = 16
Graphics Vendor: VMware, Inc.
Renderer: SVGA3D; build: RELEASE; LLVM;
Version: 3.3 (Compatibility Profile) Mesa 20.0.8
vsync: true vpipe: true
ES2ResourceFactory: Prism - createStockShader: FillPgram_Color.frag
new alphas with length = 4096
ES2ResourceFactory: Prism - createStockShader: Texture_Color.frag
ES2ResourceFactory: Prism - createStockShader: Texture_LinearGradient_PAD.frag
ES2ResourceFactory: Prism - createStockShader: Solid_TextureRGB.frag
ES2ResourceFactory: Prism - createStockShader: Solid_TextureFirstPassLCD.frag
ES2ResourceFactory: Prism - createStockShader: Solid_TextureSecondPassLCD.frag
The problem can easily be reproduced by running the attached HelloFXML.zip example from Gluon.
Java Version
openjdk version "11.0.9" 2020-10-20
OpenJDK Runtime Environment GraalVM CE 20.3.0 (build 11.0.9+10-jvmci-20.3-b06)
OpenJDK 64-Bit Server VM GraalVM CE 20.3.0 (build 11.0.9+10-jvmci-20.3-b06, mixed mode, sharing)
The text was updated successfully, but these errors were encountered:
There is a workaround that is mentioned in the related bug JDK-8248126: Set the environment variable GDK_SCALE to the same value as in your Ubuntu UI settings.
The native executable created with Graal can be started for example as follows: GDK_SCALE=2 target/client/x86_64-linux/HelloFXML
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Running a JavaFX application on Ubuntu 20.04.1 LTS does not scale as expected. The font and other controls are tiny on a 3840 x 2160 screen with a scale factor of 200%. The same application works well on Windows 10 with the same scaling.
Here is an example for Windows 10 that shows a scaling of 2.0.
The example for Ubuntu 20 show that it is not working correctly. You can see that the factor is always 1.0 no matter what is set in the Ubuntu environment. Here you can see the settings.
The debug output shows that the system is "Opting in for HiDPI pixel scaling" (Prism SW Pipeline):
The same result with GPU usage (using "-Dprism.forceGPU=true"):
The problem can easily be reproduced by running the attached HelloFXML.zip example from Gluon.
Java Version
The text was updated successfully, but these errors were encountered: