Open Jpnyman opened 1 year ago
It may be related to the way multiple GPUs are handled:
@staticmethod
def assume_discrete(vendors: list):
if "nvidia" in vendors and "amd" in vendors:
return {"integrated": "amd", "discrete": "nvidia"}
if "nvidia" in vendors and "intel" in vendors:
return {"integrated": "intel", "discrete": "nvidia"}
if "amd" in vendors and "intel" in vendors:
return {"integrated": "intel", "discrete": "amd"}
return {}
In your case it looks like the Nvidia GPU is being assumed to be the discrete GPU and the AMD is being assumed as integrated (as in the case of PRIME Render Offload) despite the fact that your AMD GPU is your primary discrete GPU. Hopefully someone with more knowledge can chime in.
In the mean time you could try setting the environment variable __VK_LAYER_NV_optimus=non_NVIDIA_only
I appreciate the feedback.
I have overridden the environment variable in flatpak using sudo flatpak override --env=__VK_LAYER_NV_optimus=non_NVIDIA_only com.usebottles.bottles
Yet bottles gives __VK_LAYER_NV_optimus: NVIDIA_only
I even tried setting it globally in bashrc but no luck, printenv __VK_LAYER_NV_optimus
giving non_NVIDIA_only
but bottles still being NVIDIA_ONLY
You're right, I tested a couple out and Bottles is not respecting these environment variables. Most likely a separate bug... I don't know there is an easy fix without that being addressed first.
No worries, I appreciate the feedback. Any other pointers?
No not really. The only other thing you might try if you haven't already is setting environment variables within a specific bottle's settings rather than for Bottles itself. Also, I didn't think of it but if you don't have NVIDIA drivers installed then those NVIDIA env variables won't work either way. Setting DRI_PRIME=0
might work as it instructs Linux to use your integrated graphics, which apparently in this case is your AMD GPU. That's all I got.
My AMD GPU is not CPU integrated graphics. I have two dedicated graphics cards. I set the environment both as a flatpak override and in bashrc but no luck. I appreciate the help though.
My AMD GPU is not CPU integrated graphics. I have two dedicated graphics cards.
Correct, but:
prime:
integrated: *id001
discrete: *id002
Anyway, good luck.
Hi, I am still looking into this. Would you mind running flatpak run --command=sh com.usebottles.bottles
and then ls /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/
and post the output. Also want to confirm you are using Mesa drivers?
I have probably the same Problem on Rocky Linux 9 with a NVIDIA card. If it's not related, please let me know.
here is my output:
flatpak run --command=sh com.usebottles.bottles
[📦 com.usebottles.bottles ~]$ ls /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/
intel_hasvk_icd.x86_64.json intel_icd.x86_64.json lvp_icd.x86_64.json radeon_icd.x86_64.json virtio_icd.x86_64.json
[📦 com.usebottles.bottles ~]$
this is the output of running bottles:
➜ ~ flatpak run com.usebottles.bottles
libEGL warning: DRI3: Screen seems not DRI3 capable
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI3: Screen seems not DRI3 capable
libEGL warning: DRI2: failed to authenticate
13:19:08 (ERROR) Unable to load libGLX_nvidia.so.0
13:19:08 (WARNING) Unable to locate libGLX_nvidia
13:19:08 (INFO) Bottles Started!
13:19:08 (INFO) Performing Bottles checks…
13:19:08 (INFO) Dxvks found:
- dxvk-2.1
- dxvk-2.3
13:19:08 (INFO) Vkd3ds found:
- vkd3d-proton-2.8-1-1e663e6
13:19:08 (INFO) Nvapis found:
- dxvk-nvapi-v0.6-1-0827efb
13:19:08 (INFO) Latencyflexs found:
- latencyflex-v0.1.1
13:19:08 (INFO) Runners found:
- soda-8.0-2
- soda-7.0-9
- soda-7.0-8
- sys-wine-8.0.2
13:19:09 (ERROR) Unable to load libGLX_nvidia.so.0
13:19:09 (WARNING) Unable to locate libGLX_nvidia
13:19:09 (ERROR) Nvidia driver libraries haven't been found. DLSS might not work!
13:19:09 (INFO) Bottles found:
[...]
Thanks for providing that information. Can you please provide the Bottles debug information as well? Are you using a single Nvidia GPU? Which drivers are you using?
I have a Nvidia GPU with the proprietary driver: NVIDIA-SMI 545.23.08
$ flatpak run --command=bottles-cli com.usebottles.bottles info health-check
20:03:27 (ERROR) Unable to load libGLX_nvidia.so.0
20:03:27 (WARNING) Unable to locate libGLX_nvidia
** (process:349686): WARNING **: 20:03:27.536: Error writing credentials to socket: Error sending message: Broken pipe
20:03:27 (ERROR) Unable to load libGLX_nvidia.so.0
20:03:27 (WARNING) Unable to locate libGLX_nvidia
Official Package: true
Version: '51.9'
DE/WM: gnome
Display:
X.org: true
X.org (port): :99.0
Wayland: false
Graphics:
vendors:
nvidia:
vendor: nvidia
envs:
__NV_PRIME_RENDER_OFFLOAD: '1'
__GLX_VENDOR_LIBRARY_NAME: nvidia
__VK_LAYER_NV_optimus: NVIDIA_only
icd: ''
nvngx_path: null
prime:
integrated: null
discrete: null
Kernel:
Type: Linux
Version: 5.14.0-362.8.1.el9_3.x86_64
Disk:
Total: 134871797760
Free: 134871646208
RAM:
MemTotal: 251.2GiB
MemAvailable: 210.7GiB
Bottles_envs: null
After digging a bit deeper it seems Nvidia CUDA team released version 545.23.08, but the official version is 545.23.06 and flatpak uses the official version. After pinning the Nvidia driver to 545.23.06 everything works again. Not sure the original issue is solved though.
Here are the relevant links to read more about it: https://github.com/flathub/org.freedesktop.Platform.GL.nvidia/pull/214 https://forums.developer.nvidia.com/t/545-23-08-is-not-listed-in-the-nvidia-driver-downloads-page/273181/10
Weird. Definitely a different issue than the op; for whatever reason Bottles is/was unable to load your Nvidia library file.
There isn't much to be done on our side as loading this file is handled by a Python Standard Library method.
try:
libglx_nvidia = CDLL("libGLX_nvidia.so.0")
except OSError:
logging.error("Unable to load libGLX_nvidia.so.0")
return None
From the Python documentation
When a dependent DLL of the loaded DLL is not found, a OSError error is raised..
My guess is this is the issue on your end.
TL;DR: Bottles (and some other apps) are missing the 64bit dependency of the Flatpak Nvidia driver.
To fix the issue, just install it: flatpak install flathub org.freedesktop.Platform.GL.nvidia-545-29-06
.
I was suffering from the same issue. I was clueless as to why it doesn't load the library when it is present, so I started digging.
flatpak run --command=bottles-cli com.usebottles.bottles info health-check
returns everything as it should.
18:43:03 (ERROR) Unable to load libGLX_nvidia.so.0
18:43:03 (WARNING) Unable to locate libGLX_nvidia
18:43:03 (ERROR) Unable to load libGLX_nvidia.so.0
18:43:03 (WARNING) Unable to locate libGLX_nvidia
Official Package: true
Version: '51.9'
DE/WM: plasmawayland
Display:
X.org: true
X.org (port): :0
Wayland: true
Graphics:
vendors:
nvidia: &id002
vendor: nvidia
envs:
__NV_PRIME_RENDER_OFFLOAD: '1'
__GLX_VENDOR_LIBRARY_NAME: nvidia
__VK_LAYER_NV_optimus: NVIDIA_only
icd: /usr/lib/i386-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json
nvngx_path: null
intel: &id001
vendor: intel
envs:
DRI_PRIME: '1'
icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/intel_hasvk_icd.x86_64.json:/usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/intel_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/intel_hasvk_icd.i686.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/intel_icd.i686.json
prime:
integrated: *id001
discrete: *id002
Kernel:
Type: Linux
Version: 6.6.7-arch1-1
Disk:
Total: 5968003072
Free: 5967843328
RAM:
MemTotal: 11.1GiB
MemAvailable: 4.7GiB
Bottles_envs: null
Here's the output of some debugging I did. Apparently, the Nvidia lib inside the Flatpak sandbox is not a 64-bit one.
[📦 com.usebottles.bottles ~]$ cat /usr/lib/i386-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json
{
"file_format_version" : "1.0.0",
"ICD": {
"library_path": "libGLX_nvidia.so.0",
"api_version" : "1.3.260"
}
}
[📦 com.usebottles.bottles ~]$ find / -name "libGLX_nvidia*"
/app/lib/i386-linux-gnu/GL/nvidia-545-29-06/extra/libGLX_nvidia.so.545.29.06
/app/lib/i386-linux-gnu/GL/nvidia-545-29-06/extra/libGLX_nvidia.so.0
---
[📦 com.usebottles.bottles ~]$ ldconfig -p | grep libGLX
libGLX_nvidia.so.0 (libc6) => /app/lib/i386-linux-gnu/GL/nvidia-545-29-06/lib/libGLX_nvidia.so.0
libGLX_mesa.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/GL/default/lib/libGLX_mesa.so.0
libGLX_mesa.so.0 (libc6) => /app/lib/i386-linux-gnu/GL/default/lib/libGLX_mesa.so.0
libGLX.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGLX.so.0
libGLX.so.0 (libc6) => /app/lib/i386-linux-gnu/libGLX.so.0
---
[📦 com.usebottles.bottles ~]$ python
Python 3.10.13 (main, Nov 10 2011, 15:00:00) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
>>> libglx_nvidia = CDLL("libGLX_nvidia.so.0")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libGLX_nvidia.so.0: cannot open shared object file: No such file or directory
>>> libglx_nvidia = CDLL("/app/lib/i386-linux-gnu/GL/nvidia-545-29-06/lib/libGLX_nvidia.so.0")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /app/lib/i386-linux-gnu/GL/nvidia-545-29-06/lib/libGLX_nvidia.so.0: wrong ELF class: ELFCLASS32
---
[📦 com.usebottles.bottles ~]$ file /app/lib/i386-linux-gnu/GL/nvidia-545-29-06/lib/libGLX_nvidia.so.545.29.06
/app/lib/i386-linux-gnu/GL/nvidia-545-29-06/lib/libGLX_nvidia.so.545.29.06: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=9a5a5afeda1131caa1a2e953b7f000414431bc01, stripped
Comparison to running this locally where I have the same driver installed via pacman
.
$ file /usr/lib/libGLX_nvidia.so.545.29.06
/usr/lib/libGLX_nvidia.so.545.29.06: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=c8b8a791af8635327f949c0e0d8ebdcc2d1a077b, stripped
---
Python 3.11.6 (main, Nov 14 2023, 09:36:21) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
>>> libglx_nvidia = CDLL("libGLX_nvidia.so.0")
>>> libglx_nvidia
<CDLL 'libGLX_nvidia.so.0', handle 55ba63ba7560 at 0x7f23334b4490>
I decided to check what I have installed in Flatpack and I was surprised that only a 32-bit package was listed as a dependency.
$ flatpak list | grep "nvidia"
nvidia-545-29-06 org.freedesktop.Platform.GL32.nvidia-545-29-06 1.4 system
A quick Google search led me here, which confirmed that there are both 32 and 64-bit packages and I am missing one. github.com/flathub/org.freedesktop.Platform.GL.nvidia
After I installed it, I ran my bottle with flatpak run --command=bottles-cli com.usebottles.bottles run
and the process appeared in nvidia-smi
.
Hi, I have the exact same problem as OP and our setups are identical.
17:52:01 (INFO) Catalog installers loaded
17:52:01 (INFO) Catalog dependencies loaded
17:52:02 (INFO) Catalog components loaded
17:52:03 (INFO) Setting Key sync=fsync for bottle Gaming…
17:52:03 (INFO) There is no running wineserver.
17:52:20 (INFO) Launching an executable…
17:52:20 (ERROR) Unable to load libGLX_nvidia.so.0
17:52:20 (WARNING) Unable to locate libGLX_nvidia
17:52:20 (WARNING) Nouveau driver detected, this may cause issues
17:52:23 (INFO) Using EasyAntiCheat runtime
17:52:23 (INFO) Using BattlEye runtime
I also have a multi GPU system where one card has a vfio-pci driver attached and is only used for virtualized workloads.
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106 [GeForce RTX 3060 Lite Hash Rate] [10de:2504] (rev a1) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. GA106 [GeForce RTX 3060 Lite Hash Rate] [1043:8810]
Flags: fast devsel, IRQ 16, IOMMU group 2
Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
Memory at c0000000 (64-bit, prefetchable) [size=256M]
Memory at d0000000 (64-bit, prefetchable) [size=32M]
I/O ports at e000 [size=128]
Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: vfio-pci
Kernel modules: nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation GA106 High Definition Audio Controller [10de:228e] (rev a1)
Subsystem: ASUSTeK Computer Inc. GA106 High Definition Audio Controller [1043:8810]
Flags: fast devsel, IRQ 17, IOMMU group 2
Memory at f7080000 (32-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
07:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev c7) (prog-if 00 [VGA controller])
Subsystem: XFX Pine Group Inc. Radeon RX 480 [1682:9480]
Flags: bus master, fast devsel, latency 0, IRQ 132, IOMMU group 15
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Memory at f0000000 (64-bit, prefetchable) [size=2M]
I/O ports at c000 [size=256]
Memory at f7100000 (32-bit, non-prefetchable) [size=256K]
Expansion ROM at f7140000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: amdgpu
Kernel modules: amdgpu
07:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]
Subsystem: XFX Pine Group Inc. Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1682:aaf0]
Flags: bus master, fast devsel, latency 0, IRQ 135, IOMMU group 15
Memory at f7160000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
Additional info on this setup is that my motherboard doesn't support choosing a primary display gpu, so it treats the Nvidia card on the top slot as the primary card until the part in the boot process where grub loads the OS, There the nvidia driver will get blacklisted so that the DE (Plasma) is forced to use the second card as the display.
Flathub
Debian 12 Bookworm
I have also tried the environment variables listed earlier to make the bottle use my "integrated" gpu (the second discrete gpu) with no success.
Official Package: true
Version: '51.10'
DE/WM: plasmawayland
Display:
X.org: true
X.org (port): :1
Wayland: true
Graphics:
vendors:
nvidia: &id002
vendor: nvidia
envs:
DRI_PRIME: '1'
icd: ''
nvngx_path: null
amd: &id001
vendor: amd
envs:
DRI_PRIME: '1'
icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json
prime:
integrated: *id001
discrete: *id002
Kernel:
Type: Linux
Version: 6.1.0-16-amd64
Disk:
Total: 33646112768
Free: 33645953024
RAM:
MemTotal: 62.7GiB
MemAvailable: 31.7GiB
Bottles_envs: null
same, after installing nvidia 560 drivers on Ubuntu
I built flatpak from source but didnt solve the problem
any workaround?
Running into the same issue here, not sure if this will fix the issue, but I haven't gotten around to setting vfio-pci for the Nvidia GPU after installing NixOS
0a:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)
Subsystem: ASUSTeK Computer Inc. Device 85e8
Kernel driver in use: nouveau
Kernel modules: nvidiafb, nouveau
--
0d:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] (rev c0)
Subsystem: XFX Limited Speedster MERC 319 AMD Radeon RX 6900 XT Black
Kernel driver in use: amdgpu
Kernel modules: amdgpu
On my Gigabyte Aorus X570 motherboard I have set the second slot, where the AMD card is as the initial display output, I will try seeing if I can manage to blacklist the nvidia card and set it to use the vfio-pci driver.
flathub
NixOS 24.11
I tried installing battle.net
Official Package: true
Version: '51.13'
DE/WM: null
Display:
X.org: true
X.org (port): :0
Wayland: true
Graphics:
vendors:
nvidia: &id002
vendor: nvidia
envs:
__NV_PRIME_RENDER_OFFLOAD: '1'
__GLX_VENDOR_LIBRARY_NAME: nvidia
__VK_LAYER_NV_optimus: NVIDIA_only
icd: ''
nvngx_path: null
amd: &id001
vendor: amd
envs:
DRI_PRIME: '1'
icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json
prime:
integrated: *id001
discrete: *id002
Kernel:
Type: Linux
Version: 6.6.50
Disk:
Total: 16795332608
Free: 16795185152
RAM:
MemTotal: 31.3GiB
MemAvailable: 26.6GiB
Bottles_envs: null
Hi
I was having the same issue a moment ago, running void linux with xfce4 and the flatpak installation of bottles, with a iGPU and an nvidia dGPU (4060 ti 16gb, to be precise, paired with a 4750G cpu). It turned out, as I did system updates and flatpak updates in parallel, I needed to fire flatpak update again to catch up on the correlating GL package vor the updated nvidia drivers. That did the trick, so my assumption is that there is some sort of version conflict.
Maybe that'll help some of you.
Cheers.
I was having the same issue, Drivers from Nvidia site installed. Single GPU GeForce RTX 4080.
Just run flatpak update
it should search for the missing drivers on flatpak side of things.
:: flatpak update
Looking for updates…
Info: runtime org.kde.Platform branch 6.6 is end-of-life, with reason:
We strongly recommend moving to the latest stable version of the Platform and SDK
Info: applications using this runtime:
com.obsproject.Studio
ID Branch Op Remote Download
1. [✓] org.freedesktop.Platform.GL.nvidia-550-127-05 1.4 i flathub 308.0 MB / 308.1 MB
2. [\] org.freedesktop.Platform.GL32.nvidia-550-127-05 1.4 i flathub 173.0 MB / 308.0 MB```
Describe the bug
On a relatively fresh install of Ubuntu 22.04 with bottles installed from flatpak am running into the same error:
I have an unused Nvidia GPU which is bound to vfio and not used by anything except a virtual machine with my AMD GPU being used for everything Linux.
I am unable to use any rendering except for wine3d, with them all erroring out saying I do not have a vulkan capable GPU. For more context see my forum post, follow up and comment on github. Additionally this error gets thrown not only during startup but also seemingly randomly while navigating through the menus of bottles.
To Reproduce
Attempt to launch any program utilizing dxvk while having a Nvidia GPU bound to pci-vfio
Package
Flatpak from Flathub
Distribution
Ubuntu 22.04
Debugging Information
Troubleshooting Logs
No response
Additional context
No response