Querz / mcaselector

A tool to select chunks from Minecraft worlds for deletion or export.
MIT License
3.19k stars 177 forks source link

GPU hardware acceleration fails on *buntu 20.04 64 Bit w. AMD GPU, but can be forced by CLI option #316

Open Taranchul opened 2 years ago

Taranchul commented 2 years ago

On both my PC (AMD Radeon RX 5500 XT) and my Laptop (AMD Ryzen 7 4800H with IGPU Radeon RX Vega 7), MCAS 1.17.2 or Java fail to enable hardware acceleration by default, causing MCAS to be extremely slow and laggy.

The PC runs Ubuntu MATE 20.04 64 Bit and the Laptop runs "Tuxedo OS", an OEM variant of Ubuntu 20.04 64 Bit from https://www.tuxedocomputers.com/. I installed MCAS by following the instructions in the Wiki using the Zulu JRE-FX-17.

However, hardware acceleration can be forced by the command line option -Dprism.forceGPU=true, making MCAS run smooth and fast.

Maybe you can include this tip somewhere in the Wiki?

Here's the verbose output using -Dprism.verbose=true:

failed to create directory /usr/share/mate/mcaselector: /usr/share/mate/mcaselector(AccessDeniedException)
failed to create directory /etc/xdg/xdg-mate/mcaselector: /etc/xdg/xdg-mate(AccessDeniedException)
failed to create directory /etc/xdg/xdg-mate/mcaselector: /etc/xdg/xdg-mate(AccessDeniedException)
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

(java:9941): Gdk-WARNING **: 18:05:31.786: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.

And here with forced hardware acceleration by adding -Dprism.forceGPU=true on the PC:

failed to create directory /usr/share/mate/mcaselector: /usr/share/mate/mcaselector(AccessDeniedException)
failed to create directory /etc/xdg/xdg-mate/mcaselector: /etc/xdg/xdg-mate(AccessDeniedException)
failed to create directory /etc/xdg/xdg-mate/mcaselector: /etc/xdg/xdg-mate(AccessDeniedException)
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
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 = 32
Maximum number of texture units usable in a fragment shader = 32
Graphics Vendor: AMD
       Renderer: Radeon RX 5500 XT (NAVI14, DRM 3.35.0, 5.4.0-92-generic, LLVM 12.0.0)
        Version: 4.6 (Compatibility Profile) Mesa 21.0.3
 vsync: true vpipe: true

(java:10555): Gdk-WARNING **: 18:20:29.934: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.

edit: And on the Laptop:

failed to create directory /usr/share/plasma/mcaselector: /usr/share/plasma/mcaselector(AccessDeniedException)
failed to create directory /etc/xdg/xdg-plasma/mcaselector: /etc/xdg/xdg-plasma(AccessDeniedException)
failed to create directory /etc/xdg/xdg-plasma/mcaselector: /etc/xdg/xdg-plasma(AccessDeniedException)
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
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 = 32
Maximum number of texture units usable in a fragment shader = 32
Graphics Vendor: AMD
Renderer: AMD RENOIR (DRM 3.40.0, 5.11.0-43-generic, LLVM 12.0.0)
Version: 4.6 (Compatibility Profile) Mesa 21.0.3
vsync: true vpipe: true

(java:185258): Gdk-WARNING **: 18:49:04.191: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.
Seegras commented 1 month ago

Can confirm, this makes it a lot faster (Debian Sid/7800xt)