In Fedora 40 in order to launch MC with dGPU I need to start java process with the following environmental variables:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia
When I Add these to Settings->Environmental variables it should launch MC on nvidia gpu which can be observed using e.g. nvidia-smi tool. The problem is this works on AppImage version but doesn't on Flatpak which looks like containerization/permission issue.
Steps to reproduce
Add __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia into Settings->Environmental variables
Launch MC on a laptop with two GPUs and see if dGPU is in use
System information
OS: Fedora 40
Kernel: Linux 6.9.7-200.fc40.x86_64
DE: Gnome 46
WM: Mutter (Wayland)
CPU: Intel i9-12900H
GPU: NVidia RTX 3070 Ti (drivers 555.58.02)
RAM: 32GB
Additional Info
I've tried writing a java wrapper script that starts java with the above env variables set so that from Modrinth perspective there are no additional env vars but it doesn't help. It definitely looks like flatpak doesn't allow starting any process with env variable override in a way that nvidia gpu is used.
Describe the bug
In Fedora 40 in order to launch MC with dGPU I need to start java process with the following environmental variables: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia When I Add these to Settings->Environmental variables it should launch MC on nvidia gpu which can be observed using e.g. nvidia-smi tool. The problem is this works on AppImage version but doesn't on Flatpak which looks like containerization/permission issue.
Steps to reproduce
System information
OS: Fedora 40 Kernel: Linux 6.9.7-200.fc40.x86_64 DE: Gnome 46 WM: Mutter (Wayland) CPU: Intel i9-12900H GPU: NVidia RTX 3070 Ti (drivers 555.58.02) RAM: 32GB
Additional Info
I've tried writing a java wrapper script that starts java with the above env variables set so that from Modrinth perspective there are no additional env vars but it doesn't help. It definitely looks like flatpak doesn't allow starting any process with env variable override in a way that nvidia gpu is used.