Wine in Gentoo: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:
  =app-emulation/wine-9999
  =app-emulation/wine-9999


= Direct3D, Vulkan, DXVK =
= Graphic Acceleration Support =
 
== OpenGL ==
 
* nvidia-drivers need to be built with ABI_X86="32 64" even though wine does not explicitely ask for it. If you don't, OpenGL support in wine will not be present (you'll get the following message on console: wgl:X11DRV_WineGL_InitOpenglInfo  couldn't initialize OpenGL). Some games might work, but with alternate rendering paths and potentially many issues.
 
== Direct3D, Vulkan, DXVK ==


* By default, I think Wine translates Direct3D (versions 9, 10 and 11) calls to OpenGL calls. However you can also uses DXVK: this project replaces the Direct3D Windows DLLs by implementations that translate the calls to the Vulkan API (Vulkan is well supported on Linux). This can lead to improved performance or better stability for some games.
* By default, I think Wine translates Direct3D (versions 9, 10 and 11) calls to OpenGL calls. However you can also uses DXVK: this project replaces the Direct3D Windows DLLs by implementations that translate the calls to the Vulkan API (Vulkan is well supported on Linux). This can lead to improved performance or better stability for some games.
* On Gentoo, it is recommended to install the dxvk-bin package (only available via overlays), then run the install script. This script will symlink the Windows native DLLs to the replacement dxvk DLLs, and register wine to uses those native DLLs rather than the built-in ones.
* On Gentoo, it is recommended to install the dxvk package, then run the install script. This script will symlink the Windows native DLLs to the replacement dxvk DLLs, and register wine to uses those native DLLs rather than the built-in ones.
* Note that for Direct3D 12, Wine uses vkd3d layer, which directly translates the Direct3D 12 calls to Vulkan (using the built-in Wine D3D DLLs). So DXVK is not needed for Direct3D 12.
* Note that for Direct3D 12, Wine uses vkd3d layer, which directly translates the Direct3D 12 calls to Vulkan (using the built-in Wine D3D DLLs). So DXVK is not needed for Direct3D 12.


Line 35: Line 41:
= AMD64 Profile =
= AMD64 Profile =


Wine does not yet play very well with the no-exec protection of recent Linux kernels. It may be necessary to disable no-exec at boot with the following kernel argument:
* Wine does not yet play very well with the no-exec protection of recent Linux kernels. It may be necessary to disable no-exec at boot with the following kernel argument:


  noexec32=off
  noexec32=off
Line 51: Line 57:


* If Hearthstone / Battle.net is "stuck", you can login using Diablo III. This will work.
* If Hearthstone / Battle.net is "stuck", you can login using Diablo III. This will work.
* Heroes of Might & Magic IV needs a virtual desktop (1280x1024) else it displays an ugly gray menu bar.

Revision as of 12:18, 28 August 2023

General Hints

  • You may need to recreate your Wine directory (~/.wine) if it is very old. The current Wine directory is controlled by the WINEPREFIX environment variable and is by default equal to ~/.wine. Making multiple Wine prefixes / installations can be useful to try out new Wine versions or Windows software. However the Program Files directory is also different, so it may be not convenient to have multiple copies / installs of heavy Windows games lying around.
  • You *need* the loopback interface for wine to work correctly, so don't remove /etc/init.d/net.lo from the init scripts.

Building with PE (Portable Executable format) support

  • Newest Wine releases use PE format, the old ELF formats are not really supported any longer. Some stuff only works with PE support, for instance 64-bit Blizzard game clients. For this reason, it is recommended to build Wine with PE support.
  • On Gentoo this can be activated via the mingw USE flag (disabled by default as of Wine-6.9). For this you need to install the mingw toolchain (this is very easy by following instructions on this link).

Building latest Git

  • Add to /etc/portage/package.accept_keywords:
app-emulation/wine **
  • Add to /etc/portage/package.unmask:
=app-emulation/wine-9999

Graphic Acceleration Support

OpenGL

  • nvidia-drivers need to be built with ABI_X86="32 64" even though wine does not explicitely ask for it. If you don't, OpenGL support in wine will not be present (you'll get the following message on console: wgl:X11DRV_WineGL_InitOpenglInfo couldn't initialize OpenGL). Some games might work, but with alternate rendering paths and potentially many issues.

Direct3D, Vulkan, DXVK

  • By default, I think Wine translates Direct3D (versions 9, 10 and 11) calls to OpenGL calls. However you can also uses DXVK: this project replaces the Direct3D Windows DLLs by implementations that translate the calls to the Vulkan API (Vulkan is well supported on Linux). This can lead to improved performance or better stability for some games.
  • On Gentoo, it is recommended to install the dxvk package, then run the install script. This script will symlink the Windows native DLLs to the replacement dxvk DLLs, and register wine to uses those native DLLs rather than the built-in ones.
  • Note that for Direct3D 12, Wine uses vkd3d layer, which directly translates the Direct3D 12 calls to Vulkan (using the built-in Wine D3D DLLs). So DXVK is not needed for Direct3D 12.

Russian Programs

  • If text is garbled, try to run with a Russian locale (be sure to have this locale available, check /etc/locale.gen):
LANG=ru_RU.UTF-8 wine Setup.exe
  • However, there may still be problems with fonts. I haven't been able to solve them yet.

AMD64 Profile

  • Wine does not yet play very well with the no-exec protection of recent Linux kernels. It may be necessary to disable no-exec at boot with the following kernel argument:
noexec32=off

Registry Keys

  • If you need to add or change keys to the Windows registry, you can use regedit which is a GUI for this task.
  • The following key is needed for Hearthstone (Wine 5.3, KDE), else the mouse is not recaptured as soon as you Alt-Tab out of Hearthstone:
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"

Specific Programs

  • If Hearthstone / Battle.net is "stuck", you can login using Diablo III. This will work.
  • Heroes of Might & Magic IV needs a virtual desktop (1280x1024) else it displays an ugly gray menu bar.