Bottles
Bottles copied to clipboard
[Bug]: Bottles doesn't use the discrete gpu.
Describe the bug
The discrete gpu option doesn't work, games run with the integrated gpu instead of my amd gpu. Radeontop shows 0% gpu utilization.
To Reproduce
- Open bottles
- Run something
- The game runs with the integrated gpu.
Package
Flatpak from Flathub
Distribution
Nixos 22.11pre403473.b784c5ae63d
Troubleshooting Logs
Version: 2022.8.28-brescia-1
Display:
X.org: true
X.org (port): :99.0
Wayland: true
Graphics:
vendors:
intel:
vendor: intel
envs:
DRI_PRIME: '1'
icd: /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_icd.i686.json
prime:
integrated: null
discrete: null
Kernel:
Type: Linux
Version: 5.15.60-xanmod1
Distro:
Name: GNOME
Version: '"42 (Flatpak runtime)"'
Disk:
Total: 4126724096
Free: 4126580736
RAM:
MemTotal: 7.7GiB
MemAvailable: 4.4GiB
Bottles_envs: null
2
Display Protocol
Wayland
Display Backend used by Bottles
Wayland
Additional context
No response
This is because Bottles found only 1 GPU (Intel). How many gpu do you have?
This is because Bottles found only 1 GPU (Intel). How many gpu do you have?
I have a laptop with intel graphics and an amd gpu. 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) 09:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile]
Does it works setting the DRI_PRIME=1 env var and disabling the discrete gpu option?
Does it works setting the DRI_PRIME=1 env var and disabling the discrete gpu option?
No, it does not.
I think this is not a optimus laptop
I think this is not a optimus laptop
It isn't, but DRI_PRIME=1 works without any problem on my laptop with steam, lutris and basically every application on my system.
I've taken a look at how we manage gpus in bottles and DRI_PRIME is overwritten according to your gpu, so as the amd one is not listed, it forces intel. Did you set DRI_PRIME from the bottle environment variables section?
Yes
Please post the output of lspci | grep 'VGA'
Please post the output of
lspci | grep 'VGA'
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
So the problem is not with Bottles, it doesn't recive your AMD card at all. I think this is more a Flatpak problem then Bottles.
So the problem is not with Bottles, it doesn't recive your AMD card at all. I think this is more a Flatpak problem then Bottles.
Well, GPUViewer from flatpak, sees the amd gpu without any issue.
Simply running flatpak run io.github.arunsivaramanneo.GPUViewer
So the problem is not with Bottles, it doesn't recive your AMD card at all. I think this is more a Flatpak problem then Bottles.
I have just installed lutris from flatpak and I can confirm that the amd gpu works without any problem there, so this is definitely related to bottles.
Maybe lutris performs some other checks. Idk how it does its stuffs
@mirkobrombin should we ping Lutris devs for this?
I don't want to ping them for this, the code is public, I'll take a look
Hey - I also have this issue, with a AMD Radeon RX640 and an Intel CPU.
Here's the troubleshooting information from Bottles:
Version: 2022.9.28.1
Display:
X.org: true
X.org (port): :99.0
Wayland: false
Graphics:
vendors:
intel:
vendor: intel
envs:
DRI_PRIME: '1'
icd: /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_icd.i686.json
prime:
integrated: null
discrete: null
Kernel:
Type: Linux
Version: 5.13.0-30-generic
Distro:
Name: GNOME
Version: '43'
Disk:
Total: 8222072832
Free: 8221929472
RAM:
MemTotal: "16.4\_GB"
MemAvailable: "9.1\_GB"
Bottles_envs: null
lspci | grep VGA
has a similar output as shown above.
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 02)
Can you all try reproducing this again? Also, do tell where you're running lspci
from - if I understand everything correctly, the dedicated GPUs here seem to just.... Not exist.
My 2 cents...this is not an issue if Bottles is lauched using the discrete GPU. (right click, then Launch using Discrete GPU) Unfortunately, only GNOME provides that level of control. KDE AFAIK doesn't have that.
One thing I think needs to be pointed out is that both DXVK and VKD3D, both mainline and Proton, have had new environmental control variables added. If the control variable is correctly specified, either iGPU or dGPU is used. If this is not specified, it seems that DXVK and VKD3D will always attempt to use the dGPU if available.
Old info around the internet suggests adding DRI_PRIME=1 to force dGPU on Steam games and such on systems that don't use nVidia Optimus. However, with Proton 8.0 and Experimental, this is no longer necessary, but if I use DRI_PRIME=0 to force iGPU, this gets ignored.
I have a bottle with Ubisoft Connect and Avatar: Frontiers of Pandora installed and it would not use my dGPU with "Use Discreet Graphics" enabled or DRI_PRIME=1. I checked the VKD3D Github page to see if anything had changed there and noticed this new-ish environmental setting that it tests for: VKD3D_VULKAN_DEVICE. I added VKD3D_VULKAN_DEVICE=1 to my the bottle's environmental variables list and viola, the dGPU is now working.
DXVK has a similar environmental setting DXVK_FILTER_DEVICE_NAME="Device Name".
TLDR:
Add VKD3D_VULKAN_DEVICE=1 to bottle's environmental variables for DX12 games and DXVK_FILTER_DEVICE_NAME="Device Name" for DX9 - DX11 games, though you'll need to replace "Device Name" with the dGPU device name which can be acquired with vulkaninfo | grep 'deviceName'
.