How to install AMD Ryzen GPU support to WineHQ?

Questions about Wine on Linux
Locked
postcd
Level 2
Level 2
Posts: 14
Joined: Mon Nov 05, 2018 5:07 am

How to install AMD Ryzen GPU support to WineHQ?

Post by postcd »

Hello,

I have https://dl.winehq.org/wine-builds/debian bullseye/main i386 wine-devel-i386 i386 7.8~bullseye-1 on Debian 11.
And AMD Ryzen 7 APU amdgpu,ati mesa openGL 4.6 full detail

Ran:
WINEPREFIX=/home/$(whoami)/TDU winetricks corefonts d3dx9 d3dcompiler_43 dxvk vkd3d
I noticed "Unknown arg vkd3d"

DirectX Diag. shows:
DXVK: v1.10.1; AMD RADV RENOIR (ACO); Driver: 20.3.5 ; Vulkan: 1.2.145
full output

glxinfo | grep OpenGL;sudo lsmod | egrep 'radeon|amdgpu' output is here.

Game launched through Wine, yet game is a bit freezing (even the GPU should be enough powerful for the game) and APU usage is relatively low during gameplay.
Also tried to run it after changing arch:
WINEPREFIX=/home/$(whoami)/TDU WINEARCH=win32 WINEDEBUG=-all,+d3d
WINE_LARGE_ADDRESS_AWARE=1 wine "Atari/Test Drive Unlimited/TDU - Project Paradise Launcher.exe"
there is again that error:
0120:err:d3d:resource_init Out of adapter memory.
0120:fixme:rawinput:RegisterRawInputDevices Unhandled flags 0x230 for device 0.
0130:fixme:d3d:state_linepattern_w Setting line patterns is not supported in OpenGL core contexts.
Full terminal log lines during gameplay are displayed here.
In regedit, HKEY_CURRENT_USER\Software\Wine\Direct3D does not exist. (referred to by this Wine WIKI page)
Also found https://wiki.winehq.org/Performance
@Bob Wya written: If you're a gamer, then Wine Staging or Wine Staging with Gallium Direct3D (for AMD GPU's), might be a good option.

So i am wondering which command to run to install/enable my GPU support into wine, please? I would be grateful for help. Thank you very much in advance.
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: How to install AMD Ryzen GPU support to WineHQ?

Post by jkfloris »

Ran:
WINEPREFIX=/home/$(whoami)/TDU winetricks corefonts d3dx9 d3dcompiler_43 dxvk vkd3d
According to the AppDB this game doesn't need any winetricks. Could you try the game in a clean wineprefix?

Please note, dxvk is a separate project with its own bugs. It looks like this bug:
https://github.com/doitsujin/dxvk/issues/1318
postcd
Level 2
Level 2
Posts: 14
Joined: Mon Nov 05, 2018 5:07 am

Re: How to install AMD Ryzen GPU support to WineHQ?

Post by postcd »

jkfloris wrote: Sat May 21, 2022 4:25 am
Ran:
WINEPREFIX=/home/$(whoami)/TDU winetricks corefonts d3dx9 d3dcompiler_43 dxvk vkd3d
According to the AppDB this game doesn't need any winetricks. Could you try the game in a clean wineprefix?
Thanks for Your input! I have further installed following:

Code: Select all

WINEPREFIX=/home/$(whoami)/TDU winetricks corefonts d3dcompiler_43 d3dx11_42 d3dx11_43 winhttp corefont
(d3dx11_43 winhttp is the ones that are additional, rest i had already installed) I doubt it has any effect except wasting the disk space (maybe i should learn how to uninstall winhttp. But as suggested, i have tried clean wineprefix (without directx...)

Code: Select all

WINEPREFIX=/home/$(whoami)/TDU1 WINEARCH=win64 winecfg
Results, in-game FPS/freezing:

14-93FPS windowed no vsync, steady in-game environment - wineprefix default
60-180FPS windowed no vsync, steady in-game environment - wineprefix with directx and other
60FPS windowed vsync enabled, steady in-game environment - wineprefix with directx and other -> vsync enabled somehow puts significant (+20%?) load on CPU in my case

So directx prefix is more performant than default one. Higher FPS variability is caused by other apps running in parallel. I have tried to set nice and ionice to the wine process using sudo, but it cause creating /root/.wine prefix.

Someone mentioned that the freezing issue may be temporary shader compilation stutter. And indeed after lets say 30 seconds it goes away. Also worth exiting other apps, as it may cause freezes when you monitor CPU utilization graph for the past.

So the game is playable now in low resolution 1024x720, i am not completely satisfied as i think that the GPU is more than capable to play game in FullHD resolution. Maybe wine-7.9 utilize CPU rather than GPU inside the Ryzen 7 APU, who knows. But ideas are still welcome to ensure better performance. The page linked in previous paragraph suggest some wine forks to try btw..
Locked