Caught in the Net (Posts about Gentoo)francescomecca.euenContents © 2024 <a href="mailto:francescomecca.eu">Francesco Mecca</a> Wed, 28 Feb 2024 13:37:25 GMTNikola (getnikola.com)http://blogs.law.harvard.edu/tech/rssPlaying videogames with WINE on Gentoofrancescomecca.eu/blog/2024/2/28/wine-gentoo/Francesco Mecca<p><a href="francescomecca.eu/2024/1/12/happy-new-year-2024/">One of my new year's resolution</a> are related to playing videogames on GNU/Linux rather than resorting to dual booting as I did for the last 15 years. This blogpost aims to be a continuosly updated guide to my journey in having a proper gaming setup on my Gentoo workstation. My main resources are the <a href="https://wiki.gentoo.org/wiki/Wine">Gentoo wiki</a> and the <a href="https://wiki.archlinux.org/title/Wine">Arch Wiki</a>. </p> <p>These objectives should be clear:</p> <ul> <li>I will not use steam: I only buy from <a href="https://www.gog.com/games">GOG</a> or use CDs</li> <li>I want to use one of my controllers for games that need it</li> <li>use as much software from the Gentoo repos as possible; this means avoiding <a href="https://usebottles.com/">Bottles</a> and <a href="https://lutris.net/">Lutris</a></li> </ul> <h3>Hardware</h3> <div class="code"><pre class="code literal-block"><span class="n">user</span><span class="w"> </span><span class="o">~&gt;</span><span class="w"> </span><span class="n">sudo</span><span class="w"> </span><span class="n">inxi</span><span class="w"> </span><span class="o">-</span><span class="n">AGSC</span> <span class="n">System</span><span class="p">:</span> <span class="w"> </span><span class="n">Host</span><span class="p">:</span><span class="w"> </span><span class="n">____</span><span class="w"> </span><span class="n">Kernel</span><span class="p">:</span><span class="w"> </span><span class="mf">6.1</span><span class="o">.</span><span class="mi">69</span><span class="o">-</span><span class="n">gentoo</span><span class="o">-</span><span class="n">dist</span><span class="w"> </span><span class="n">arch</span><span class="p">:</span><span class="w"> </span><span class="n">x86_64</span><span class="w"> </span><span class="n">bits</span><span class="p">:</span><span class="w"> </span><span class="mi">64</span><span class="w"> </span><span class="n">Desktop</span><span class="p">:</span><span class="w"> </span><span class="n">spectrwm</span> <span class="w"> </span><span class="n">Distro</span><span class="p">:</span><span class="w"> </span><span class="n">Gentoo</span><span class="w"> </span><span class="n">Base</span><span class="w"> </span><span class="n">System</span><span class="w"> </span><span class="n">release</span><span class="w"> </span><span class="mf">2.14</span> <span class="n">CPU</span><span class="p">:</span> <span class="w"> </span><span class="n">Info</span><span class="p">:</span><span class="w"> </span><span class="mi">6</span><span class="o">-</span><span class="n">core</span><span class="w"> </span><span class="n">model</span><span class="p">:</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">Ryzen</span><span class="w"> </span><span class="mi">5</span><span class="w"> </span><span class="mi">2600</span><span class="w"> </span><span class="n">bits</span><span class="p">:</span><span class="w"> </span><span class="mi">64</span><span class="w"> </span><span class="n">type</span><span class="p">:</span><span class="w"> </span><span class="n">MT</span><span class="w"> </span><span class="n">MCP</span><span class="w"> </span><span class="n">cache</span><span class="p">:</span><span class="w"> </span><span class="n">L2</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="w"> </span><span class="n">MiB</span> <span class="w"> </span><span class="n">Speed</span><span class="w"> </span><span class="p">(</span><span class="n">MHz</span><span class="p">):</span><span class="w"> </span><span class="n">avg</span><span class="p">:</span><span class="w"> </span><span class="mi">1858</span><span class="w"> </span><span class="nb">min</span><span class="o">/</span><span class="nb">max</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span><span class="o">/</span><span class="mi">3400</span><span class="w"> </span><span class="n">cores</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">:</span><span class="w"> </span><span class="mi">3400</span><span class="w"> </span><span class="mi">2</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span><span class="w"> </span><span class="mi">3</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span> <span class="w"> </span><span class="mi">4</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span><span class="w"> </span><span class="mi">5</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span><span class="w"> </span><span class="mi">6</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span><span class="w"> </span><span class="mi">7</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span><span class="w"> </span><span class="mi">8</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span><span class="w"> </span><span class="mi">9</span><span class="p">:</span><span class="w"> </span><span class="mi">3400</span><span class="w"> </span><span class="mi">10</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span><span class="w"> </span><span class="mi">11</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span><span class="w"> </span><span class="mi">12</span><span class="p">:</span><span class="w"> </span><span class="mi">1550</span> <span class="n">Graphics</span><span class="p">:</span> <span class="w"> </span><span class="n">Device</span><span class="o">-</span><span class="mi">1</span><span class="p">:</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">Navi</span><span class="w"> </span><span class="mi">22</span><span class="w"> </span><span class="p">[</span><span class="n">Radeon</span><span class="w"> </span><span class="n">RX</span><span class="w"> </span><span class="mi">6700</span><span class="o">/</span><span class="mi">6700</span><span class="w"> </span><span class="n">XT</span><span class="o">/</span><span class="mi">6750</span><span class="w"> </span><span class="n">XT</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">6800</span><span class="n">M</span><span class="o">/</span><span class="mi">6850</span><span class="n">M</span><span class="w"> </span><span class="n">XT</span><span class="p">]</span> <span class="w"> </span><span class="n">driver</span><span class="p">:</span><span class="w"> </span><span class="n">amdgpu</span><span class="w"> </span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="n">kernel</span> <span class="w"> </span><span class="n">Device</span><span class="o">-</span><span class="mi">2</span><span class="p">:</span><span class="w"> </span><span class="n">Logitech</span><span class="w"> </span><span class="n">C920</span><span class="w"> </span><span class="n">HD</span><span class="w"> </span><span class="n">Pro</span><span class="w"> </span><span class="n">Webcam</span><span class="w"> </span><span class="n">driver</span><span class="p">:</span><span class="w"> </span><span class="n">usbfs</span><span class="w"> </span><span class="n">type</span><span class="p">:</span><span class="w"> </span><span class="n">USB</span> <span class="w"> </span><span class="n">Display</span><span class="p">:</span><span class="w"> </span><span class="n">server</span><span class="p">:</span><span class="w"> </span><span class="n">X</span><span class="o">.</span><span class="n">org</span><span class="w"> </span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="mf">1.21</span><span class="o">.</span><span class="mf">1.11</span><span class="w"> </span><span class="n">driver</span><span class="p">:</span><span class="w"> </span><span class="n">X</span><span class="p">:</span><span class="w"> </span><span class="n">loaded</span><span class="p">:</span><span class="w"> </span><span class="n">amdgpu</span> <span class="w"> </span><span class="n">unloaded</span><span class="p">:</span><span class="w"> </span><span class="n">modesetting</span><span class="p">,</span><span class="n">radeon</span><span class="w"> </span><span class="n">dri</span><span class="p">:</span><span class="w"> </span><span class="n">radeonsi</span><span class="w"> </span><span class="n">gpu</span><span class="p">:</span><span class="w"> </span><span class="n">amdgpu</span> <span class="w"> </span><span class="n">resolution</span><span class="p">:</span><span class="w"> </span><span class="mi">1920</span><span class="n">x1200</span><span class="o">~</span><span class="mi">60</span><span class="n">Hz</span> <span class="w"> </span><span class="n">API</span><span class="p">:</span><span class="w"> </span><span class="n">EGL</span><span class="w"> </span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="mf">1.5</span><span class="w"> </span><span class="n">drivers</span><span class="p">:</span><span class="w"> </span><span class="n">radeonsi</span><span class="p">,</span><span class="n">swrast</span> <span class="w"> </span><span class="n">platforms</span><span class="p">:</span><span class="w"> </span><span class="n">gbm</span><span class="p">,</span><span class="n">x11</span><span class="p">,</span><span class="n">surfaceless</span><span class="p">,</span><span class="n">device</span> <span class="w"> </span><span class="n">API</span><span class="p">:</span><span class="w"> </span><span class="n">OpenGL</span><span class="w"> </span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="mf">4.6</span><span class="w"> </span><span class="n">vendor</span><span class="p">:</span><span class="w"> </span><span class="n">amd</span><span class="w"> </span><span class="n">mesa</span><span class="w"> </span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="mf">23.3</span><span class="o">.</span><span class="mi">5</span><span class="w"> </span><span class="n">renderer</span><span class="p">:</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">Radeon</span><span class="w"> </span><span class="n">RX</span> <span class="w"> </span><span class="mi">6750</span><span class="w"> </span><span class="n">XT</span><span class="w"> </span><span class="p">(</span><span class="n">radeonsi</span><span class="w"> </span><span class="n">navi22</span><span class="w"> </span><span class="n">LLVM</span><span class="w"> </span><span class="mf">17.0</span><span class="o">.</span><span class="mi">6</span><span class="w"> </span><span class="n">DRM</span><span class="w"> </span><span class="mf">3.49</span><span class="w"> </span><span class="mf">6.1</span><span class="o">.</span><span class="mi">69</span><span class="o">-</span><span class="n">gentoo</span><span class="o">-</span><span class="n">dist</span><span class="p">)</span> <span class="w"> </span><span class="n">API</span><span class="p">:</span><span class="w"> </span><span class="n">Vulkan</span><span class="w"> </span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="mf">1.3</span><span class="o">.</span><span class="mi">275</span><span class="w"> </span><span class="n">drivers</span><span class="p">:</span><span class="w"> </span><span class="n">N</span><span class="o">/</span><span class="n">A</span><span class="w"> </span><span class="n">surfaces</span><span class="p">:</span><span class="w"> </span><span class="n">xcb</span><span class="p">,</span><span class="n">xlib</span> <span class="n">Audio</span><span class="p">:</span> <span class="w"> </span><span class="n">Device</span><span class="o">-</span><span class="mi">1</span><span class="p">:</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">Navi</span><span class="w"> </span><span class="mi">21</span><span class="o">/</span><span class="mi">23</span><span class="w"> </span><span class="n">HDMI</span><span class="o">/</span><span class="n">DP</span><span class="w"> </span><span class="n">Audio</span><span class="w"> </span><span class="n">driver</span><span class="p">:</span><span class="w"> </span><span class="n">snd_hda_intel</span> <span class="w"> </span><span class="n">Device</span><span class="o">-</span><span class="mi">2</span><span class="p">:</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">Family</span><span class="w"> </span><span class="mi">17</span><span class="n">h</span><span class="w"> </span><span class="n">HD</span><span class="w"> </span><span class="n">Audio</span><span class="w"> </span><span class="n">driver</span><span class="p">:</span><span class="w"> </span><span class="n">snd_hda_intel</span> <span class="w"> </span><span class="n">Device</span><span class="o">-</span><span class="mi">5</span><span class="p">:</span><span class="w"> </span><span class="n">Focusrite</span><span class="o">-</span><span class="n">Novation</span><span class="w"> </span><span class="n">Focusrite</span><span class="w"> </span><span class="n">Scarlett</span><span class="w"> </span><span class="mi">2</span><span class="n">i2</span><span class="w"> </span><span class="n">driver</span><span class="p">:</span><span class="w"> </span><span class="n">snd</span><span class="o">-</span><span class="n">usb</span><span class="o">-</span><span class="n">audio</span> <span class="w"> </span><span class="n">type</span><span class="p">:</span><span class="w"> </span><span class="n">USB</span> <span class="w"> </span><span class="n">API</span><span class="p">:</span><span class="w"> </span><span class="n">ALSA</span><span class="w"> </span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="n">k6</span><span class="o">.</span><span class="mf">1.69</span><span class="o">-</span><span class="n">gentoo</span><span class="o">-</span><span class="n">dist</span><span class="w"> </span><span class="n">status</span><span class="p">:</span><span class="w"> </span><span class="n">kernel</span><span class="o">-</span><span class="n">api</span> <span class="w"> </span><span class="n">Server</span><span class="o">-</span><span class="mi">1</span><span class="p">:</span><span class="w"> </span><span class="n">PulseAudio</span><span class="w"> </span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="mf">16.1</span><span class="w"> </span><span class="n">status</span><span class="p">:</span><span class="w"> </span><span class="n">active</span><span class="w"> </span><span class="p">(</span><span class="n">root</span><span class="p">,</span><span class="w"> </span><span class="n">process</span><span class="p">)</span> <span class="n">USB</span><span class="p">:</span> <span class="w"> </span><span class="n">Device</span><span class="o">-</span><span class="mi">1</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="o">-</span><span class="mi">4</span><span class="p">:</span><span class="mi">2</span><span class="w"> </span><span class="n">info</span><span class="p">:</span><span class="w"> </span><span class="n">splitkb</span><span class="o">.</span><span class="n">com</span><span class="w"> </span><span class="n">Kyria</span><span class="w"> </span><span class="n">rev2</span><span class="w"> </span><span class="n">type</span><span class="p">:</span><span class="w"> </span><span class="n">keyboard</span><span class="p">,</span><span class="n">HID</span><span class="w"> </span><span class="n">rev</span><span class="p">:</span><span class="w"> </span><span class="mf">2.0</span> <span class="w"> </span><span class="n">Device</span><span class="o">-</span><span class="mi">2</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="o">-</span><span class="mi">7</span><span class="p">:</span><span class="mi">4</span><span class="w"> </span><span class="n">info</span><span class="p">:</span><span class="w"> </span><span class="n">Microsoft</span><span class="w"> </span><span class="n">Xbox360</span><span class="w"> </span><span class="n">Controller</span><span class="w"> </span><span class="n">type</span><span class="p">:</span><span class="w"> </span><span class="o">&lt;</span><span class="n">vendor</span><span class="w"> </span><span class="n">specific</span><span class="o">&gt;</span> <span class="w"> </span><span class="n">rev</span><span class="p">:</span><span class="w"> </span><span class="mf">2.0</span> <span class="w"> </span><span class="n">Device</span><span class="o">-</span><span class="mi">3</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="o">-</span><span class="mi">2</span><span class="p">:</span><span class="mi">3</span><span class="w"> </span><span class="n">info</span><span class="p">:</span><span class="w"> </span><span class="n">Focusrite</span><span class="o">-</span><span class="n">Novation</span><span class="w"> </span><span class="n">Focusrite</span><span class="w"> </span><span class="n">Scarlett</span><span class="w"> </span><span class="mi">2</span><span class="n">i2</span> <span class="w"> </span><span class="n">type</span><span class="p">:</span><span class="w"> </span><span class="n">audio</span><span class="w"> </span><span class="n">rev</span><span class="p">:</span><span class="w"> </span><span class="mf">2.0</span> <span class="w"> </span><span class="n">Device</span><span class="o">-</span><span class="mi">4</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="o">-</span><span class="mi">4</span><span class="p">:</span><span class="mi">6</span><span class="w"> </span><span class="n">info</span><span class="p">:</span><span class="w"> </span><span class="n">ThrustMaster</span><span class="w"> </span><span class="n">XB1</span><span class="w"> </span><span class="n">Classic</span><span class="w"> </span><span class="n">Controller</span> <span class="w"> </span><span class="n">type</span><span class="p">:</span><span class="w"> </span><span class="o">&lt;</span><span class="n">vendor</span><span class="w"> </span><span class="n">specific</span><span class="o">&gt;</span><span class="w"> </span><span class="n">rev</span><span class="p">:</span><span class="w"> </span><span class="mf">2.0</span> </pre></div> <h3>Drivers</h3> <p>For the kernel, I am using the <code>gentoo-kernel</code> seed.</p> <p>For the GPU setup you need:</p> <ul> <li>the open source drivers, see https://wiki.gentoo.org/wiki/AMDGPU</li> <li>the proprietary drivers, see https://wiki.gentoo.org/wiki/AMDGPU-PRO</li> <li>the vulkan drivers, see https://wiki.gentoo.org/wiki/AMDVLK These are useful commands to check if the drivers are loaded correctly:</li> </ul> <div class="code"><pre class="code literal-block">user ~&gt; lspci -k | grep -A 3 -E "(VGA|3D)" 08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] (rev c0) Subsystem: Tul Corporation / PowerColor Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] Kernel driver in use: amdgpu Kernel modules: amdgpu </pre></div> <div class="code"><pre class="code literal-block">user ~&gt; glxinfo -B name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: AMD (0x1002) Device: AMD Radeon RX 6750 XT (radeonsi, navi22, LLVM 17.0.6, DRM 3.49, 6.1.69-gentoo-dist) (0x73df) Version: 23.3.5 Accelerated: yes Video memory: 12288MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 Memory info (GL_ATI_meminfo): VBO free memory - total: 11874 MB, largest block: 11874 MB VBO free aux. memory - total: 32064 MB, largest block: 32064 MB Texture free memory - total: 11874 MB, largest block: 11874 MB Texture free aux. memory - total: 32064 MB, largest block: 32064 MB Renderbuffer free memory - total: 11874 MB, largest block: 11874 MB Renderbuffer free aux. memory - total: 32064 MB, largest block: 32064 MB Memory info (GL_NVX_gpu_memory_info): Dedicated video memory: 12288 MB Total available memory: 44400 MB Currently available dedicated video memory: 11874 MB OpenGL vendor string: AMD OpenGL renderer string: AMD Radeon RX 6750 XT (radeonsi, navi22, LLVM 17.0.6, DRM 3.49, 6.1.69-gentoo-dist) OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.3.5 OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.3.5 OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.3.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 </pre></div> <div class="code"><pre class="code literal-block"><span class="n">user</span><span class="w"> </span><span class="o">~&gt;</span><span class="w"> </span><span class="n">vulkaninfo</span><span class="w"> </span><span class="o">--</span><span class="n">summary</span><span class="w"> </span> <span class="n">ac_compute_device_uuid</span><span class="s1">'s output is based on invalid pci bus info.</span> <span class="o">==========</span> <span class="n">VULKANINFO</span> <span class="o">==========</span> <span class="n">Vulkan</span><span class="w"> </span><span class="n">Instance</span><span class="w"> </span><span class="n">Version</span><span class="p">:</span><span class="w"> </span><span class="mf">1.3</span><span class="o">.</span><span class="mi">275</span> <span class="n">Instance</span><span class="w"> </span><span class="n">Extensions</span><span class="p">:</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">22</span> <span class="o">-------------------------------</span> <span class="n">VK_EXT_acquire_drm_display</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_EXT_acquire_xlib_display</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_EXT_debug_report</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">10</span> <span class="n">VK_EXT_debug_utils</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">2</span> <span class="n">VK_EXT_direct_mode_display</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_EXT_display_surface_counter</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_EXT_surface_maintenance1</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_EXT_swapchain_colorspace</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">4</span> <span class="n">VK_KHR_device_group_creation</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_KHR_display</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">23</span> <span class="n">VK_KHR_external_fence_capabilities</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_KHR_external_memory_capabilities</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_KHR_external_semaphore_capabilities</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_KHR_get_display_properties2</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_KHR_get_physical_device_properties2</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">2</span> <span class="n">VK_KHR_get_surface_capabilities2</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_KHR_portability_enumeration</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_KHR_surface</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">25</span> <span class="n">VK_KHR_surface_protected_capabilities</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_KHR_xcb_surface</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">6</span> <span class="n">VK_KHR_xlib_surface</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">6</span> <span class="n">VK_LUNARG_direct_driver_loading</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">extension</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="mi">1</span> <span class="n">Instance</span><span class="w"> </span><span class="n">Layers</span><span class="p">:</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span> <span class="o">--------------------------</span> <span class="n">VK_LAYER_AMD_switchable_graphics_32</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">switchable</span><span class="w"> </span><span class="n">graphics</span><span class="w"> </span><span class="n">layer</span><span class="w"> </span><span class="mf">1.3</span><span class="o">.</span><span class="mi">241</span><span class="w"> </span><span class="n">version</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_LAYER_AMD_switchable_graphics_64</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">switchable</span><span class="w"> </span><span class="n">graphics</span><span class="w"> </span><span class="n">layer</span><span class="w"> </span><span class="mf">1.3</span><span class="o">.</span><span class="mi">241</span><span class="w"> </span><span class="n">version</span><span class="w"> </span><span class="mi">1</span> <span class="n">VK_LAYER_MESA_device_select</span><span class="w"> </span><span class="n">Linux</span><span class="w"> </span><span class="n">device</span><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="n">layer</span><span class="w"> </span><span class="mf">1.3</span><span class="o">.</span><span class="mi">211</span><span class="w"> </span><span class="n">version</span><span class="w"> </span><span class="mi">1</span> <span class="n">Devices</span><span class="p">:</span> <span class="o">========</span> <span class="n">GPU0</span><span class="p">:</span> <span class="w"> </span><span class="n">apiVersion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">1.3</span><span class="o">.</span><span class="mi">260</span> <span class="w"> </span><span class="n">driverVersion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">2.0</span><span class="o">.</span><span class="mi">279</span> <span class="w"> </span><span class="n">vendorID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x1002</span> <span class="w"> </span><span class="n">deviceID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x73df</span> <span class="w"> </span><span class="n">deviceType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PHYSICAL_DEVICE_TYPE_DISCRETE_GPU</span> <span class="w"> </span><span class="n">deviceName</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">Radeon</span><span class="w"> </span><span class="n">RX</span><span class="w"> </span><span class="mi">6750</span><span class="w"> </span><span class="n">XT</span> <span class="w"> </span><span class="n">driverID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DRIVER_ID_AMD_PROPRIETARY</span> <span class="w"> </span><span class="n">driverName</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">proprietary</span><span class="w"> </span><span class="n">driver</span> <span class="w"> </span><span class="n">driverInfo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">AMD</span><span class="w"> </span><span class="n">proprietary</span><span class="w"> </span><span class="n">shader</span><span class="w"> </span><span class="n">compiler</span><span class="p">)</span> <span class="w"> </span><span class="n">conformanceVersion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">1.3</span><span class="o">.</span><span class="mf">3.1</span> <span class="w"> </span><span class="n">deviceUUID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span> <span class="w"> </span><span class="n">driverUUID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">414</span><span class="n">d442d</span><span class="o">-</span><span class="mi">4</span><span class="n">c49</span><span class="o">-</span><span class="mf">4e55</span><span class="o">-</span><span class="mi">582</span><span class="n">d</span><span class="o">-</span><span class="mi">445256000000</span> <span class="n">GPU1</span><span class="p">:</span> <span class="w"> </span><span class="n">apiVersion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">1.3</span><span class="o">.</span><span class="mi">241</span> <span class="w"> </span><span class="n">driverVersion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">2.0</span><span class="o">.</span><span class="mi">257</span> <span class="w"> </span><span class="n">vendorID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x1002</span> <span class="w"> </span><span class="n">deviceID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x73df</span> <span class="w"> </span><span class="n">deviceType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PHYSICAL_DEVICE_TYPE_DISCRETE_GPU</span> <span class="w"> </span><span class="n">deviceName</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">Radeon</span><span class="w"> </span><span class="n">RX</span><span class="w"> </span><span class="mi">6750</span><span class="w"> </span><span class="n">XT</span> <span class="w"> </span><span class="n">driverID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DRIVER_ID_AMD_OPEN_SOURCE</span> <span class="w"> </span><span class="n">driverName</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AMD</span><span class="w"> </span><span class="n">open</span><span class="o">-</span><span class="n">source</span><span class="w"> </span><span class="n">driver</span> <span class="w"> </span><span class="n">driverInfo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">2023.</span><span class="n">Q1</span><span class="o">.</span><span class="mi">3</span><span class="w"> </span><span class="p">(</span><span class="n">LLPC</span><span class="p">)</span> <span class="w"> </span><span class="n">conformanceVersion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">1.3</span><span class="o">.</span><span class="mf">0.0</span> <span class="w"> </span><span class="n">deviceUUID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span> <span class="w"> </span><span class="n">driverUUID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">414</span><span class="n">d442d</span><span class="o">-</span><span class="mi">4</span><span class="n">c49</span><span class="o">-</span><span class="mf">4e55</span><span class="o">-</span><span class="mi">582</span><span class="n">d</span><span class="o">-</span><span class="mi">445256000000</span> </pre></div> <p>The most important bits are:</p> <ul> <li><code>Kernel driver in use: amdgpu</code></li> <li><code>direct rendering: Yes</code></li> <li>that <code>vulkaninfo</code> doesn't produce any errors</li> </ul> <h3>Wine and other software packages</h3> <p>These are my current useflags:</p> <ul> <li>wine: <code>+abi_x86_32 +abi_x86_64 +proton</code></li> <li>wine-staging: <code>+X +abi_x86_32 +abi_x86_64 +fontconfig +gecko +gstreamer +mingw +mono +nls +opengl +pulseaudio +sdl +ssl +strip +truetype +unwind +usb +vulkan +xcomposite -wow64</code></li> <li>wine-proton: <code>+X +abi_x86_32 +abi_x86_64 +fontconfig +gecko +gstreamer +mingw +mono +nls +opengl +pulseaudio +sdl +ssl +strip +truetype +unwind +vulkan +xcomposite -wow64</code></li> <li>[ ] wine-vanilla: <code>+abi_x86_32 +abi_x86_64 +fontconfig +gecko +gstreamer +mono +nls +pulseaudio +sdl +ssl +strip +unwind +usb +video_cards_amdgpu +xcomposite -wow6</code> Notice that I am targeting all WINE packages in order to test slightly different configurations. Use <code>eselect wine</code> to switch between versions. Until the Gentoo devs says that wow64 feature is stable and fully functional, I will keep it off.</li> </ul> <p>I have enable the <code>abi_x86_32</code> use flag for many packages, probably more than needed. This is to ensure that I avoid problems related to my configuration. Enabling the flag globally seems like a waste of cpu and disk.</p> <p>These are the additional WINE related packages that I installed:</p> <ul> <li>app-emulation/winetricks: <code>+gtk +rar</code></li> <li>app-emulation/vkd3d-proton: <code>+abi_x86_32 +strip</code></li> <li>app-emulation/dxvk: <code>+d3d10 +d3d11 +d3d9 +dxgi +strig +abi_x86_32</code></li> </ul> <p>GPU related packages:</p> <ul> <li>dev-util/DirectXShaderCompiler: necessary for proper directX support with vulkan</li> <li>media-libs/vulkan-loader: <code>+X +abi_x86_32 +layers</code></li> <li>dev-util/vulkan-tools: <code>+X</code></li> <li>media-libs/amdgpu-pro-vulkan: <code>+abi_x86_32 +video_cards_amdgpu</code></li> <li>media-libs/amdvlk: <code>+abi_x86_32 +raytracing</code> but I am not sure my gpu supports raytracing</li> <li>media-libs/shaderc</li> </ul> <p>I am using spectrwm as my windows manager. It is not the best option and I would suggest to use a more featured DE. This is an example of an innocous error that is caused by spectrwm when using WINE:</p> <div class="code"><pre class="code literal-block"><span class="n">ERROR</span><span class="p">:</span><span class="w"> </span><span class="n">ld</span><span class="o">.</span><span class="n">so</span><span class="p">:</span><span class="w"> </span><span class="n">object</span><span class="w"> </span><span class="s1">'/usr/lib64/libswmhack.so.0.0'</span><span class="w"> </span><span class="n">from</span><span class="w"> </span><span class="n">LD_PRELOAD</span><span class="w"> </span><span class="n">cannot</span><span class="w"> </span><span class="n">be</span><span class="w"> </span><span class="n">preloaded</span><span class="w"> </span><span class="p">(</span><span class="n">wrong</span><span class="w"> </span><span class="n">ELF</span><span class="w"> </span><span class="k">class</span><span class="p">:</span><span class="w"> </span><span class="n">ELFCLASS64</span><span class="p">):</span><span class="w"> </span><span class="n">ignored</span><span class="o">.</span> </pre></div> <p>Consider that WMs need a compositor to avoid some clashes with WINE. I am using x11-misc/picom with drm and opengl support.</p> <h3>Using WINE</h3> <p>If you have no clue about how WINE works, start by reading the <a href="https://wiki.winehq.org/FAQ#Wineprefixes">FAQs</a>.</p> <p>The biggest considerations you have to make when using WINE are the software dependencies of the Windows program you want to use. For the moment I have been able to survive with only two prefixes, one for 32 bits games and one for more recent software.</p> <p>What all of this means, is that I have two folders in my home, <code>.wine</code> and <code>.wine32</code> in which I instruct WINE to start a new program using the environment variable (that is what WINEPREFIX is all about). When I feel lazy, I select the WINE prefix using winetricks, then navigate to the game using explorer.exe.</p> <p>It's important to remember that whenever you create a new WINE prefix, you need to symlink the correct directx dependencies, as the Gentoo ebuilds suggests:</p> <ul> <li><code>WINEPREFIX=/home/user/.wine setup_vkd3d_proton.sh install --symlink</code> for directx12</li> <li><code>WINEPREFIX=/home/user/.wine setup_dxvk.sh install --symlink</code> for directx11 and earlier</li> </ul> <p>Usually WINE takes care of starting up necessary processes inside the prefixes. This is done by the <code>wineboot</code> program so I suggest to read its manpage.</p> <p>To install software dependencies, I use winetricks. If a dependency is not available through winetricks, it's always possible to install the .exe as you would on Windows. Take in mind that WINE uses some Linux specific software in place of some Windows libraries. Some key replacements include:</p> <ul> <li>wine-mono in place of dotnet</li> <li>dxvk and vkd3d in place of directx</li> <li>gallium-nine and wined3d, in place of directx but I had better experience with dxvk and vkd3d</li> <li>wine-gecko in place of whatever web view IE was offering</li> <li>wineconsole in place of the Windows cmd program</li> <li>your dotnet installation is usually enough for WINE, you don't need to install the dotnet runtimes, although I have to check this assertion on a fresh installation</li> </ul> <h4>Dependencies rules of thumb</h4> <ol> <li>lots of games prompt you to install dependencies such as directx. Avoid it as much as possible and rely on WINE specific libraries</li> <li>winetricks can manage most if not all of those dependencies for you. It will save you time to figure out the correct paths for each library and automate the install as much as possible</li> <li>recent games usually want the Visual C++ libraries. You can install them all with the vcrun2022 package </li> <li>older games usually want Visual C++ libraries, but you need to install the different yearly versions one by one</li> <li>you can backup or modify the winetricks installers. They are in you cache directory, usually <code>~/.cache/winetricks</code></li> </ol> <h4>Debugging</h4> <p>In all honesty, it's too early in this journey to write a comprehensive chapter on this topic. The <code>winedbg</code> command is still shrouded in mystery.</p> <p>At the moment I am keeping a small set of games that are self contained and allows me to check if WINE inside the wineprefix is working as I expect.</p> <p>I have uploaded some mostly self contained demos that you can use to test that directx and you GPU is working as it should:</p> <ul> <li><a href="francescomecca.eu/blog/2024/2/28/wine-gentoo/UnrealEngine4%20tech%20demo%20for%20directx12">https://archive.org/details/elemental-demo-dx-12-guru-3-d.com</a></li> <li><a href="francescomecca.eu/blog/2024/2/28/wine-gentoo/the%20same%20demo,%20but%20for%20directx11">https://archive.org/details/ue-4-elemental-demo</a></li> <li><a href="francescomecca.eu/blog/2024/2/28/wine-gentoo/ATI%20Radeon%209700%20Debevec%20RNL%20Demo%20v1.1ATI%20Radeon%209700%20Debevec%20RNL%20Demo%20for%20directx9">https://archive.org/details/ati-radeon-9700-debevec-rnl-demo-v-1.1.7z</a></li> </ul> <p>You can find more video card demos at <a href="francescomecca.eu/blog/2024/2/28/wine-gentoo/soggi.org">https://soggi.org/video-cards/tech-demos.htm</a>.</p> <p>For controllers, you can use two tools:</p> <ul> <li><code>wine dxdiag</code> that launches the directx toolbox, useful not only for the gpu, but also for audio and input devices</li> <li><code>wine control joy.cpl</code>, a cool utility to see your XInput and DInput compatible hardware</li> </ul>Gentoolinuxvideogamesfrancescomecca.eu/blog/2024/2/28/wine-gentoo/Wed, 28 Feb 2024 00:00:00 GMTAbout Perl packages in Gentoofrancescomecca.eu/blog/2015/9/11/about-perl-packages-in-gentoo/Francesco Mecca<p>In this post I wish to explain a bit about Perl related ebuilds in Gentoo and how to update from perl-core to virtual/perl without conflicts.</p> <p>First of all the core distribution of Perl is included in <a href="https://packages.gentoo.org/package/dev-lang/perl">dev-lang/Perl</a> along with <a href="http://perldoc.perl.org/index-modules-A.html">modules</a>.</p> <p>The <a href="https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/perl-core/">perl-core category</a> in portage contains ebuilds for perl modules, some of which are included in the core perl distibution. The perl-core ebuilds overrides the perl-core modules such that you can update them without recompiling dev-lang/Perl.</p> <p>Each perl-core module has a corrensponding virtual/perl-* package. The virtual category is used by portage when emerging to take into account that a module can be either provided by dev-lang/perl package or found in perl-core category.</p> <p>So, what to do in case of blocks when upgrading your Gentoo machine?</p> <p>Perl-cleaner is a package provided to get rid of these blocks and to migrate from perl-core to virtual/perl-*.</p> <pre class="wp-code-highlight prettyprint linenums:1">emerge perl-cleaner emerge dev-lang/perl perl-cleaner --all</pre> <p>if you still have problems when upgrading @world you add a backtrack option</p> <pre class="wp-code-highlight prettyprint linenums:1">emerge -uDN --backtrack=30 @world</pre> <p>or you can unmerge all perl-core packages and then finally upgrade world</p> <pre class="wp-code-highlight prettyprint linenums:1">emerge --unmerge perl-core/*</pre> <p>This will remove all perl-core packages that virtual/perl-* packages will bring back if needed.</p> <p style="text-align: right;"> Francesco Mecca </p>emergeGentooperlperl-corePesceWandaportage conflictvirtual/perlfrancescomecca.eu/blog/2015/9/11/about-perl-packages-in-gentoo/Fri, 11 Sep 2015 12:52:25 GMT