### Build and Install Proton Using Makefile Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md This command leverages the top-level Makefile provided with the Proton source to automate the build and installation process. It assumes a Docker or Podman setup is already configured and will compile and install Proton into the appropriate location. ```bash make install ``` -------------------------------- ### Select Vulkan Device with Mesa (AMD to Intel) Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/PRIME.md This Steam launch option enables PRIME and explicitly selects a Vulkan device using Mesa's `MESA_VK_DEVICE_SELECT` layer. The example shows selecting an AMD GPU by its vendor and product ID (1002:67df) for offloading to an integrated Intel GPU. ```Shell DRI_PRIME=1 MESA_VK_DEVICE_SELECT=1002:67df %command% ``` -------------------------------- ### Install Mesa and LLVM for AMD/Intel Graphics on Ubuntu Source: https://github.com/valvesoftware/proton/wiki/Requirements This snippet outlines the steps to add the Kisak Mesa PPA, upgrade existing packages, and install necessary Mesa Vulkan drivers for AMD and Intel graphics cards. This ensures access to recent graphics stack components for better game compatibility. ```Bash sudo add-apt-repository ppa:kisak/kisak-mesa sudo apt dist-upgrade sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386 ``` -------------------------------- ### Enable Proton Logging for Troubleshooting Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/PRIME.md This Steam launch option enables detailed logging for Proton, including WineD3D and VKD3D-Proton debug traces. The log file (`steam-$APPID.log`) will be created in your home directory, providing insights into device selection and other issues. Remember to remove these options after troubleshooting as they can impact performance. ```Shell PROTON_LOG=1 WINEDEBUG=+d3d VKD3D_DEBUG=trace ``` -------------------------------- ### Local Proton Installation Directory Structure Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md Illustrates the expected directory structure for a locally installed Proton build within Steam's compatibility tools directory. This structure is necessary for Steam to recognize and utilize the custom Proton version. ```bash compatibilitytools.d/my_proton/ ├── compatibilitytool.vdf ├── filelock.py ├── LICENSE ├── proton ├── proton_dist.tar ├── toolmanifest.vdf ├── user_settings.sample.py └── version ``` -------------------------------- ### Proton Make Targets API Documentation Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md Detailed documentation for the various `make` targets available in the Proton build system, enabling specific build, installation, and deployment actions. Each target serves a distinct purpose in the development and distribution workflow. ```APIDOC make - Description: Executes the default build process for Proton. make install - Description: Installs the built Proton into the user's Steam directory. - Usage Notes: Refer to the 'install Proton locally' section for detailed instructions. make redist - Description: Creates a redistribute build of Proton, generating output in the `redist/` directory. - Usage Notes: The contents of `redist/` can be copied to `~/.steam/root/compatibilitytools.d/` for local use. make deploy - Description: Creates a deployment build of Proton in the `deploy/` directory. - Usage Notes: This build type is specifically used for deploying Proton to Steam users via Steamworks. make module= module - Description: Builds both 32-bit and 64-bit versions of a specified Wine module. - Parameters: - : The name of the specific Wine module to be built (e.g., 'd3dcompiler_47'). - Usage Notes: This target is particularly useful for rapid iteration and testing on individual modules after the initial full Proton build. make dxvk - Description: Rebuilds the DXVK component of Proton. make vkd3d-proton - Description: Rebuilds the vkd3d-proton component of Proton. ``` -------------------------------- ### Proton Installation Paths Source: https://github.com/valvesoftware/proton/wiki/Proton-FAQ This snippet illustrates the typical installation locations for Proton within your Steam library. Proton is installed in the same library as the first Steam Play game launched and resides in a single location. ```bash $HOME/.local/share/Steam/steamapps/common/Proton 3.7/ ``` ```bash /mnt/data/SteamLibrary/steamapps/common/Proton 3.7/ ``` -------------------------------- ### List Vulkan Devices with Mesa Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/PRIME.md This command uses `vulkaninfo` with the `MESA_VK_DEVICE_SELECT` environment variable to list selectable Vulkan devices, showing their vendor/product IDs and names. This is useful for identifying GPUs for explicit selection in Vulkan applications. ```Shell MESA_VK_DEVICE_SELECT=list vulkaninfo ``` -------------------------------- ### Example of Original Command in Pressure-Vessel Shell Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-LINUX.md When `PRESSURE_VESSEL_SHELL=instead` is used, the original game launch command is passed as arguments in `$@`. This snippet shows an example of such a command, illustrating the structure and pathing that would typically be executed by Proton. ```Bash /home/ivyl/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/pressure-vessel/bin/steam-runtime-launcher-interface-0 container-runtime /home/ivyl/.local/share/Steam/steamapps/common/Proton - Experimental/proton waitforexitandrun /home/ivyl/.local/share/Steam/steamapps/common/Game/Game.exe ``` -------------------------------- ### Enable PRIME for OpenGL/DirectX 8 (Nvidia to Intel) Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/PRIME.md This Steam launch option enables PRIME GPU offloading for games using OpenGL or DirectX 8, specifically for configurations where an Nvidia discrete GPU offloads to an integrated Intel GPU using Nvidia's proprietary driver. ```Shell __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command% ``` -------------------------------- ### Enable PRIME for OpenGL/DirectX 8 (AMD to Intel) Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/PRIME.md This Steam launch option enables PRIME GPU offloading for games using OpenGL or DirectX 8, specifically for configurations where an AMD discrete GPU offloads to an integrated Intel GPU using Mesa drivers. ```Shell DRI_PRIME=1 %command% ``` -------------------------------- ### Install NVIDIA Proprietary Drivers on Ubuntu Source: https://github.com/valvesoftware/proton/wiki/Requirements This snippet provides commands to add the official graphics-drivers PPA and install a recommended version of the NVIDIA proprietary driver. A system reboot is required after installation for changes to take effect. ```Bash sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt install nvidia-driver-535 ``` -------------------------------- ### Identify Selected GPU in Proton Logs Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/PRIME.md These log snippets show how to identify the GPU selected by different graphics APIs within the `steam-$APPID.log` file generated by Proton. Look for specific keywords to confirm which GPU is being utilized by WineD3D/DXGI, DXVK, or VKD3D-Proton. ```Log Analysis trace:d3d:wined3d_adapter_init_gl_caps GL_RENDERER: "Radeon RX 580 Series (POLARIS10, DRM 3.40.0, 5.10.9-zen1-1-zen, LLVM 11.0.1)". info: DXVK: v1.7.3-36-g85c70ad5 ... info: AMD RADV POLARIS10 (ACO): info: Driver: 20.3.3 info: Vulkan: 1.2.145 trace:vkd3d_trace_physical_device_properties: Device name: AMD RADV POLARIS10 (ACO). trace:vkd3d_trace_physical_device_properties: Vendor ID: 0x1002, Device ID: 0x67df. ``` -------------------------------- ### Filter GPU Device for DXVK/VKD3D-Proton Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/PRIME.md This Steam launch option filters the enumerated GPU devices for games using DXVK or VKD3D-Proton, ensuring the correct discrete GPU is selected. Replace 'GTX 1650' with your specific GPU's name, which can be found using `vulkaninfo`. ```Shell DXVK_FILTER_DEVICE_NAME="GTX 1650" %command% ``` -------------------------------- ### Configure Debugging Tools with Public Proton Symbol Store URI Source: https://github.com/valvesoftware/proton/blob/proton_10.0/symstore/guidelines.md This snippet provides the format for configuring debugging tools (like WinDbg) to use the public Proton symbol store available online. Replace `` with the actual URL of the public store (e.g., `https://proton-archive.steamos.cloud/`). This method eliminates the need for local installation of symbol files. ```WinDbg srv* ``` -------------------------------- ### Configure clangd with Compilation Database via .clangd Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md Shows how to create a `.clangd` file to explicitly point the clangd LSP server to the compilation database for a specific directory. This is useful for projects using autotools where `compile_commands.json` might not be in the default location. ```bash cd src/proton/wine/ cat > .clangd < info process pid threads executable (all id:s are in hex) 0000028c 1 'start.exe' 0000029c 1 \_ 'winedbg.exe' =000002a4 1 \_ 'winedbg.exe' 00000294 2 \_ 'conhost.exe' 00000030 10 'services.exe' 000000e4 6 \_ 'rpcss.exe' 000000b0 3 \_ 'svchost.exe' 00000094 6 \_ 'plugplay.exe' 00000064 9 \_ 'winedevice.exe' 0000003c 8 \_ 'winedevice.exe' 00000020 3 'steam.exe' 00000128 62 \_ 'Game.exe' 000000d0 3 \_ 'explorer.exe' 0000010c 3 \_ 'tabtip.exe' ``` -------------------------------- ### Default Proton Build Command Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md Executes the default build process for Proton. This command compiles the entire project based on the `Makefile`'s default target. ```Makefile make ``` -------------------------------- ### Enable Proton Logging for Games Source: https://github.com/valvesoftware/proton/wiki/Proton-FAQ This command enables detailed logging for a specific game when added as a Steam launch option. Logs are saved to your home directory, named after the game's Steam Application ID, overwriting previous logs. ```bash PROTON_LOG=1 %command% ``` -------------------------------- ### Proton Game Startup Issue: Steam2.dll Load Failure Source: https://github.com/valvesoftware/proton/wiki/Checklist-Proton-bugs This specific warning indicates that Proton failed to load the Steam2.dll, which can prevent games from starting. It points to a known issue tracked in the Proton GitHub repository. ```APIDOC warn:module:load_builtin_dll cannot open .so lib for builtin L"Steam2.dll": ``` -------------------------------- ### Clone Proton Source Repository with Submodules Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md This command clones the Proton Git repository from GitHub, including all its necessary submodules. The `--recurse-submodules` flag ensures that all dependencies are fetched correctly, creating a complete local copy of the Proton source. ```bash git clone --recurse-submodules https://github.com/ValveSoftware/Proton.git proton ``` -------------------------------- ### Proton Runtime Configuration Environment Variables Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md Details environment variables that can be used to tune Proton's behavior at runtime. These variables allow users to override default settings for all games or specific titles, enabling or disabling features like different renderers. ```APIDOC General Usage: - To enable an option: Set the variable to a non-`0` value. - To disable an option: Set the variable to `0`. - To use Steam's default: Do not specify the variable at all. - Global configuration: Rename `user_settings.sample.py` to `user_settings.py` in the Proton installation directory and modify it. - Per-game configuration: Use 'Set Launch Options' in Steam, e.g., `VARIABLE=1 %command%`. Environment Variables: PROTON_USE_WINED3D - Description: Forces Proton to use the OpenGL-based wined3d renderer instead of the Vulkan-based DXVK renderer. - Type: Boolean (0 or non-0) - Example Usage: `PROTON_USE_WINED3D=1 %command%` (for a specific game) ``` -------------------------------- ### Load Wine/Proton Symbols and Get Backtrace in GDB Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-LINUX.md Illustrates how to source Wine's `gdbinit.py` script within GDB to enable the `load-symbol-files` command. This command automatically loads symbols for Proton's DLLs and executables based on `/proc/$pid/maps`, which is crucial for obtaining meaningful backtraces across PE (Portable Executable) and Unix boundaries. ```gdb (gdb) source ~/src/proton/wine/tools/gdbinit.py (gdb) load-symbol-files loading symbols for /home/ivyl/.local/share/Steam/steamapps/common/Proton - Experimental/files/lib64/wine/x86_64-windows/kernelbase.dll ... (gdb) bt #0 0x000075dce0cd788d in ?? () #1 0x000075dcdf26e842 in futex_wait (timeout=0x0, val=0, addr=0x75dcdd8383e0) at ../src-wine/dlls/ntdll/unix/sync.c:127 #2 NtWaitForAlertByThreadId (address=, timeout=0x0) at ../src-wine/dlls/ntdll/unix/sync.c:2658 #3 #4 0x000000017000ebb4 in NtWaitForAlertByThreadId () #5 0x00000001700367f9 in RtlWaitOnAddress (addr=addr@entry=0x4850970, cmp=0x3d12fa9c, cmp@entry=0x3d12fabc, size=size@entry=4, timeout=timeout@entry=0x0) at ../src-wine/dlls/ntdll/sync.c:941 #6 0x000000017003276a in RtlSleepConditionVariableSRW (variable=0x4850970, lock=0x4850908, timeout=0x0, flags=) at ../src-wine/dlls/ntdll/sync.c:837 #7 0x000000007b061e41 in SleepConditionVariableSRW (variable=, lock=, timeout=, flags=) at ../src-wine/dlls/kernelbase/sync.c:1064 #8 0x000000035915c892 in dxvk::condition_variable::wait (lock=..., this=0x4850970) at ../src-dxvk/src/dxvk/../util/log/../thread.h:251 #9 dxvk::condition_variable::wait > (pred=..., lock=..., this=0x4850970) at ../src-dxvk/src/dxvk/../util/log/../thread.h:257 #10 dxvk::DxvkPipelineWorkers::runWorker (this=0x48508f0, maxPriority=dxvk::DxvkPipelinePriority::Normal) at ../src-dxvk/src/dxvk/dxvk_pipemanager.cpp:140 #11 0x00000003591a7781 in std::function::operator()() const (this=0x4852ee0) at /usr/x86_64-w64-mingw32/include/c++/10.3.0/bits/std_function.h:622 #12 dxvk::thread::threadProc (arg=0x4852ed0, arg@entry=) at ../src-dxvk/src/util/thread.cpp:68 #13 0x000000007b6146ed in BaseThreadInitThunk (unknown=, entry=, arg=) at ../src-wine/dlls/kernel32/thread.c:61 #14 0x000000017000f1a7 in RtlUserThreadStart () #15 0x0000000000000000 in ?? () ``` -------------------------------- ### Build Proton with Debug Symbols Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md Instructions to create a debug build of Proton by preventing symbol stripping. This ensures that debugging tools can access full symbol information. It's recommended to use a clean build directory for this process. ```bash mkdir ../debug-proton-build && cd ../debug-proton-build ../proton/configure.sh --enable-ccache --build-name=debug_build make UNSTRIPPED_BUILD=1 install ``` -------------------------------- ### Proton Environment Variable: PROTON_USE_D9VK Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md Documents the `PROTON_USE_D9VK` environment variable, which was used in older versions of Proton to enable Vulkan-based DXVK for d3d9. This variable is now obsolete as of Proton 5.0. ```APIDOC PROTON_USE_D9VK - Description: An environment variable that, in older Proton versions, forced the use of Vulkan-based DXVK for d3d9 rendering instead of OpenGL-based wined3d. - Related Concept: `d9vk` (Direct3D 9 to Vulkan translation layer). - Status: Obsoleted in Proton 5.0. This variable no longer has an effect in newer Proton releases. - Usage (Historical): Setting this variable would direct Proton to use DXVK for d3d9 games, leveraging Vulkan for improved performance and compatibility over the older wined3d OpenGL backend. ``` -------------------------------- ### Configure Proton for Debugger Attachment at Startup Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-LINUX.md Explains how to configure a Proton game to wait for a debugger attachment before its main executable starts. By setting the `PROTON_WAIT_ATTACH=1` environment variable as a launch option, the `steam.exe` shim will pause execution, allowing a debugger to attach. It also includes the GDB command to ensure the debugger follows child processes, which is essential for debugging applications that fork. ```bash PROTON_WAIT_ATTACH=1 %command% ``` ```gdb set follow-fork-mode child ``` -------------------------------- ### Proton Runtime Configuration and Environment Variables Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md This section outlines the various runtime configuration strings and environment variables that can be used to modify Proton's behavior. These settings are temporary and do not affect the Wine prefix permanently. Each option controls a specific aspect of Proton's operation, from logging and debugging to graphics API selection and synchronization primitives. ```APIDOC Proton Runtime Options: - Environment Variable: PROTON_LOG Description: Convenience method for dumping a useful debug log to $PROTON_LOG_DIR/steam-$APPID.log. Set to '1' to enable default logging, or set to a string to be appended to the default WINEDEBUG channels. - Environment Variable: PROTON_LOG_DIR Description: Output log files into the directory specified. Defaults to your home directory. - Environment Variable: PROTON_WAIT_ATTACH Description: Wait for a debugger to attach to steam.exe before launching the game process. To attach to the game process at startup, debuggers should be set to follow child processes. - Environment Variable: PROTON_CRASH_REPORT_DIR Description: Write crash logs into this directory. Does not clean up old logs, so may eat all your disk space eventually. - Compat Config: wined3d / Environment Variable: PROTON_USE_WINED3D Description: Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11, d3d10, and d3d9. - Compat Config: nod3d11 / Environment Variable: PROTON_NO_D3D11 Description: Disable d3d11.dll, for d3d11 games which can fall back to and run better with d3d9. - Compat Config: nod3d10 / Environment Variable: PROTON_NO_D3D10 Description: Disable d3d10.dll and dxgi.dll, for d3d10 games which can fall back to and run better with d3d9. - Compat Config: dxvkd3d8 / Environment Variable: PROTON_DXVK_D3D8 Description: Use DXVK's d3d8.dll. - Compat Config: noesync / Environment Variable: PROTON_NO_ESYNC Description: Do not use eventfd-based in-process synchronization primitives. - Compat Config: nofsync / Environment Variable: PROTON_NO_FSYNC Description: Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.) - Compat Config: noxim / Environment Variable: PROTON_NO_XIM Description: Enabled by default. Do not attempt to use XIM (X Input Methods) support. XIM support is known to cause crashes with libx11 older than version 1.7. - Compat Config: disablenvapi / Environment Variable: PROTON_DISABLE_NVAPI Description: Disable NVIDIA's NVAPI GPU support library. - Compat Config: nativevulkanloader Description: Use the Vulkan loader shipped with the game instead of Proton's built-in Vulkan loader. This breaks VR support, but is required by a few games. - Compat Config: forcelgadd / Environment Variable: PROTON_FORCE_LARGE_ADDRESS_AWARE Description: Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. - Compat Config: heapdelayfree / Environment Variable: PROTON_HEAP_DELAY_FREE Description: Delay freeing some memory, to work around application use-after-free bugs. - Compat Config: gamedrive / Environment Variable: PROTON_SET_GAME_DRIVE Description: Create an S: drive which points to the Steam Library which contains the game. - Compat Config: noforcelgadd Description: Disable forcelgadd. If both this and 'forcelgadd' are set, enabled wins. - Compat Config: oldglstr / Environment Variable: PROTON_OLD_GL_STRING Description: Set some driver overrides to limit the length of the GL extension string, for old games that crash on very long extension strings. - Compat Config: vkd3dfl12 Description: Force the Direct3D 12 feature level to 12, regardless of driver support. - Compat Config: vkd3dbindlesstb Description: Put 'force_bindless_texel_buffer' into VKD3D_CONFIG. - Compat Config: nomfdxgiman / Environment Variable: WINE_DO_NOT_CREATE_DXGI_DEVICE_MANAGER Description: Enable hack to work around video issues in some games due to incomplete IMFDXGIDeviceManager support. - Compat Config: noopwr / Environment Variable: WINE_DISABLE_VULKAN_OPWR Description: Enable hack to disable Vulkan other process window rendering which sometimes causes issues on Wayland due to blit being one frame behind. - Compat Config: hidenvgpu / Environment Variable: PROTON_HIDE_NVIDIA_GPU Description: Force Nvidia GPUs to always be reported as AMD GPUs. Some games require this if they depend on Windows-only Nvidia driver functionality. See also DXVK's nvapiHack config, which only affects reporting from Direct3D. - Environment Variable: WINE_FULLSCREEN_INTEGER_SCALING Description: Enable integer scaling mode, to give sharp pixels when upscaling. - Compat Config: cmdlineappend: Description: Append the string after the colon as an argument to the game command. May be specified more than once. Escape commas and backslashes with a backslash. - Compat Config: xalia / Environment Variable: PROTON_USE_XALIA Description: Enable Xalia, a program that can add a gamepad UI for some keyboard/mouse interfaces. - Compat Config: seccomp / Environment Variable: PROTON_USE_SECCOMP Description: **Note: Obsoleted in Proton 5.13.** In older versions, enable seccomp-bpf filter to emulate native syscalls, required for some DRM protections to work. ``` -------------------------------- ### Temporarily Increase Memory Map Count Limit Source: https://github.com/valvesoftware/proton/wiki/Requirements This command sets a higher value for 'vm.max_map_count' for the current session. This change is not persistent and will revert upon system reboot. ```Bash sudo sysctl vm.max_map_count=2147483642 ``` -------------------------------- ### Persistently Increase Memory Map Count Limit Source: https://github.com/valvesoftware/proton/wiki/Requirements To make the 'vm.max_map_count' setting persistent across reboots, this snippet shows the content for a configuration file that should be placed in '/etc/sysctl.d/'. This ensures the desired memory map limit is applied automatically at boot. ```Bash vm.max_map_count = 2147483642 ``` -------------------------------- ### Bash script for iterative cherry-picking of commits Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/REBASING_TIPS.md This Bash script automates the cherry-picking of commits listed in an input file, formatted with `--pretty=oneline`. It ignores lines starting with '#', aborts when a cherry-pick fails, and outputs the processed list to stderr, marking successfully picked commits with a '#'. This allows for an iterative process of fixing conflicts and resuming the cherry-picking. ```Bash #!/bin/bash # Cherry-picks commits from an input file in --pretty=oneline format. # Lines that begin with '#' are ignored. # Aborts when a cherry-pick fails. # Outputs the same input file on stderr, but with '#' prefixed to lines that were successfully cherry-picked. #Usage: # $ pick_commits to_pick 2> ~/to_pick2 # On pick failure, fix conflicts and use "git cherry-pick --continue", or # otherwise fix up the repo as desired. # Edit ~/to_pick2 to comment-out the commit that you fixed. # Continue using the new file: # $ pick_commits to_pick2 2> ~/to_pick # Repeat, alternating between to_pick and to_pick2. broken=0 while read -r l; do f=$(echo -n "$l" | cut '-d ' -f1 -) if [ $broken == 0 -a ${f:0:1} != '#' ]; then echo "Picking $l" git cherry-pick $f 2>&1 if [ $? -ne 0 ]; then echo $l 1>&2 broken=1 else echo '#'$l 1>&2 fi else echo $l 1>&2 fi done < "$1" ``` -------------------------------- ### Check Current Memory Map Count Limit Source: https://github.com/valvesoftware/proton/wiki/Requirements This command allows users to inspect the current maximum number of memory map areas a process is allowed to have. Some modern games may require a higher limit than the kernel's default. ```Bash sysctl vm.max_map_count ``` -------------------------------- ### Configure AMD Radeon R9 200/300 Series for AMDGPU Source: https://github.com/valvesoftware/proton/wiki/Requirements For users with older AMD Radeon R9 200/300 series GPUs, these commands blacklist the legacy 'radeon' module and enable 'si_support' and 'cik_support' parameters for the 'amdgpu' driver. This is crucial for enabling Vulkan support and improving performance on these specific cards. A system reboot is required after updating the initramfs. ```Bash echo "blacklist radeon" | sudo tee --append /etc/modprobe.d/blacklist.conf echo "options amdgpu si_support=1 cik_support=1" | sudo tee --append /etc/modprobe.d/amdgpu.conf sudo update-initramfs -u ``` -------------------------------- ### Update Proton Submodules After Branch Switch Source: https://github.com/valvesoftware/proton/blob/proton_10.0/README.md These commands are used when switching between different Proton branches. First, `git checkout` changes to the desired branch, and then `git submodule update` ensures that all submodules are synchronized with the new branch's specific versions, maintaining consistency across the project. ```bash git checkout experimental_6.3 git submodule update --init --recursive ``` -------------------------------- ### Substitute Game Binary with Custom Command via Launch Options Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-LINUX.md This launch option uses `sed` to dynamically replace the game's default `%command%` with a custom one, such as launching `winecfg`. This method is useful for running specific utilities or debugging tools instead of the main game executable. ```Bash echo "%command%" | sed 's/proton waitforexitandrun .*/proton waitforexitandrun winecfg/' | sh ``` -------------------------------- ### Configure Steam Launch Options for Runtime Shell Access Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-LINUX.md Sets Steam launch options to enable the command-launcher service and generate a log. This log will contain the specific command needed to enter the per-app container shell, which is the initial step to interact with the runtime environment directly. ```Bash PROTON_LOG=1 STEAM_COMPAT_LAUNCHER_SERVICE=proton %command% ``` -------------------------------- ### Windows Controller Input APIs and Proton Mapping Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/CONTROLLERS.md This documentation block describes the five core Windows APIs used by games for controller access (dinput, xinput, winmm, hid, rawinput), detailing their purpose, historical context, and how Proton intercepts and translates their calls to underlying Linux input mechanisms. It also outlines the architectural flow from game to hardware and specific considerations for different controller types. ```APIDOC Windows Controller APIs and Proton Mapping: rawinput: - Purpose: Allows direct access to the gamepad hardware. - Details: Requires the application to understand the HID protocol or device-specific protocols for non-standard devices (e.g., Xbox controllers). hid: - Purpose: A layer above rawinput, where Windows manages HID communication on behalf of the game. - Details: Translates raw HID protocol data into usable inputs like buttons and joysticks. dinput (DirectInput): - Purpose: A 'legacy' API for general joystick access, still widely used due to its broad compatibility. - Implementation: On Windows, it is built on top of HID. xinput (XInput): - Purpose: The modern API specifically designed to support Xbox controllers. - Implementation: On Windows, likely implemented on top of rawinput, as Xbox controllers do not behave like standard HID devices. winmm (Windows Multimedia): - Purpose: A very legacy API, originally for joysticks connected via soundcards. - Implementation: On modern Windows, it is implemented on top of dinput. Proton's Controller Mapping Architecture: Game.exe -> (xinput, dinput, winmm, hid, rawinput) APIs Mapping Flow: - xinput, dinput, winmm APIs often funnel through dinput. - dinput and hid APIs connect to the 'hid' layer. - hid connects to 'rawinput'. - rawinput connects to 'winebus.sys' (Proton's internal bus). Linux Backend Integration: - winebus.sys connects to 'SDL2' for controller mapping features. - winebus.sys also allows direct access to 'hidraw' devices. - SDL2 and hidraw connect to 'input event' and 'hidraw' respectively, which interface with the 'hardware'. Key Considerations: - SDL2: Provides Steam client's controller mapping feature. Events are converted to winebus data. - hidraw: Allows direct device communication for games that speak HID. User access may be restricted by default (udev rules needed). - Xbox Controllers: Do not speak standard HID. Windows provides a HID compatibility layer for dinput. Proton duplicates this behavior in winebus.sys. - Controller Mapping: Steam's feature can present any controller as a virtual Steam Controller, which appears as an xinput device to the game. Unmapped controllers appear as their real type. - Direct Controller Support: Some games directly support specific controllers (e.g., PS4 controllers), which Proton respects by not forcing xinput presentation. ``` -------------------------------- ### Enter Steam Runtime Container Shell Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-LINUX.md This command, extracted from the `steam-$GAMEID.log` after setting the appropriate launch options, allows direct entry into the per-app container's shell. Once inside, environment variables like `WINEPREFIX` are pre-set, enabling direct execution of Wine commands. ```Bash /home/ivyl/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/pressure-vessel/bin/steam-runtime-launch-client \ --bus-name=:1.307 \ --directory='' \ -- \ bash ``` -------------------------------- ### Attach GDB to Running Proton Game Process Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-LINUX.md Demonstrates how to identify a running Proton game process ID using the `ps` command and then attach the GNU Debugger (GDB) to it. This allows for live debugging of the game's executable and its associated Proton/Wine components. ```bash $ ps | grep Game 2263566 ? tsl 0:09 Z:\home\ivyl\.local\share\Steam\steamapps\common\Game\Game.exe $ gdb GNU gdb (GDB) 14.1 ... (gdb) attach 2263566 Attaching to process 2263566 [New LWP 2263569] ... 0x000075dce0cd788d in ?? () ``` -------------------------------- ### Set WINEDLLPATH for Discord RPC Libraries Source: https://github.com/valvesoftware/proton/wiki/Enabling-Discord-Rich-Presence This Bash command appends the paths to the 64-bit and 32-bit Discord RPC library binaries to the WINEDLLPATH environment variable. This allows Wine/Proton to locate and load the necessary DLLs for Discord RPC functionality. It's a crucial step for the game to find the custom RPC implementation. ```Bash export WINEDLLPATH=$WINEDLLPATH:/opt/discord-rpc/bin64:/opt/discord-rpc/bin32 ``` -------------------------------- ### Configure WinDbg Symbol Path for Local Proton Symbol Store Source: https://github.com/valvesoftware/proton/blob/proton_10.0/symstore/guidelines.md This snippet illustrates the format for adding a locally extracted Proton symbol store to WinDbg's symbol path settings. The `` placeholder should be replaced with the absolute path to your top-level directory where the Proton symbol store zip was extracted. ```WinDbg srv* ``` -------------------------------- ### Build Proton Symbol Server Tarball Source: https://github.com/valvesoftware/proton/blob/proton_10.0/symstore/guidelines-deploy.md This command is executed within a Proton build environment after Proton has been built. It generates a `.zip` file containing symbol store data, located in the `/symstore` directory, named after the release being built. ```shell make symstore-tarball ``` -------------------------------- ### Launch Winecfg from Pressure-Vessel Shell Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-LINUX.md After entering the Pressure-Vessel shell (e.g., by setting `PRESSURE_VESSEL_SHELL=instead`), this command demonstrates how to manually invoke `winecfg` using the full path to the Proton executable. This is useful for configuring Wine settings directly within the game's specific Proton environment. ```Bash "/home/ivyl/.local/share/Steam/steamapps/common/Proton - Experimental/proton" waitforexitandrun winecfg ``` -------------------------------- ### Configure Pressure-Vessel to Spawn a Shell Instead of Game Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-LINUX.md Sets the `PRESSURE_VESSEL_SHELL` environment variable to `instead` as a launch option. This instructs Pressure-Vessel to spawn an xterm or similar shell environment instead of launching the game, providing a direct interactive shell within the runtime context. ```Bash PRESSURE_VESSEL_SHELL=instead %command% ``` -------------------------------- ### Create Mount Point for NTFS Game Disk Source: https://github.com/valvesoftware/proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows This command creates a new directory that will serve as the designated mount point for the NTFS game partition. This step is essential before attempting to mount the disk. ```bash sudo mkdir /media/gamedisk ``` -------------------------------- ### Proton Media Playback Issues: Media Foundation, Quartz, WMVcore, XNA Source: https://github.com/valvesoftware/proton/wiki/Checklist-Proton-bugs This comprehensive entry covers various log messages and DLLs associated with missing cinematics or cutscenes, typically stemming from problems with Media Foundation, Quartz, WMVcore, or XNA components. These issues are tracked collectively in the Proton GitHub repository. ```APIDOC mfplat.dll mfplay.dll mfreadwrite.dll mfstartup.dll fixme:quartz:MPEGSplitter_QueryInterface err:quartz:GetClassMediaFile Media class not found WMVcore.dll fixme:wmvcore:WMReader_Open fixme:wmvcore:WMCreateSyncReader Microsoft.Xna.Framework.Video.dll ``` -------------------------------- ### List Attached Disk Partitions Source: https://github.com/valvesoftware/proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows This command displays detailed information about all attached disk partitions, including their labels (e.g., /dev/sda2). It helps in identifying the specific NTFS partition that needs to be configured for mounting. ```bash sudo fdisk -l ``` -------------------------------- ### Accessing ProtonDB Game Compatibility Reports and Statistics Source: https://github.com/valvesoftware/proton/wiki/Community-Compatibility-Reports This API documentation describes the URL structure for retrieving compatibility reports for specific games on ProtonDB, along with links to overall statistics and raw data downloads. It allows users to access community-contributed data based on a game's application ID and explore aggregated report information. ```APIDOC ProtonDB Game Compatibility Reports and Data Access GET https://www.protondb.com/app/ Description: Retrieves compatibility reports for a specific game based on its Steam Application ID. Parameters: : The Steam Application ID (integer) for the game. Example: https://www.protondb.com/app/379720 (Reports for Doom (2016)) GET https://www.protondb.com/stats Description: Provides aggregated statistics of all compatibility reports submitted to ProtonDB. GET https://github.com/bdefore/protondb-data Description: Direct download link for raw compatibility reports data, typically in a structured format like JSON or CSV. ``` -------------------------------- ### Edit fstab File for Automounting Source: https://github.com/valvesoftware/proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows This command opens the system's fstab file using the Nano text editor. The fstab file contains static information about filesystems, their mount points, and options, which the system uses to automatically mount partitions at boot time. ```bash sudo nano /etc/fstab ``` -------------------------------- ### Retrieve User and Group IDs Source: https://github.com/valvesoftware/proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows These commands are used to find the current user's User ID (UID) and Group ID (GID). These IDs are typically '1000' by default and are necessary for setting correct ownership and permissions when mounting the NTFS filesystem. ```bash id -u ``` ```bash id -g ``` -------------------------------- ### Proton Environment Variables and Launch Options Source: https://github.com/valvesoftware/proton/wiki/Changelog This section details the environment variables and command-line options available for configuring Proton's behavior, enabling debugging, and controlling logging. These settings are typically applied via Steam game launch options or system-wide environment variables. ```APIDOC PROTON_USE_WINED3D: Description: Controls whether WineD3D is used instead of DXVK. This variable affects more than just Direct3D 11. Type: Environment Variable (Boolean/Flag) Alias: PROTON_USE_WINED3D11 (older name, still functional) Usage: Set to '1' to enable WineD3D. Example: PROTON_USE_WINED3D=1 %command% PROTON_DEBUG_DIR: Description: Configures the directory where debug script dumps are placed. By default, debug scripts are no longer dumped to /tmp/. Type: Environment Variable (String) Usage: PROTON_DEBUG_DIR=/path/to/debug/output %command% PROTON_LOG: Description: Enables useful default logging for Proton. Logs are typically dumped to $HOME/steam-$APPID.log. Type: Environment Variable (Boolean/Flag) Usage: Set to '1' to enable logging. Example: PROTON_LOG=1 %command% PROTON_DUMP_DEBUG_COMMANDS: Description: Enables the dumping of debug scripts. When enabled, scripts are moved to /tmp/proton_$USER/. Type: Environment Variable (Boolean/Flag) Usage: Set to '1' to enable dumping. Example: PROTON_DUMP_DEBUG_COMMANDS=1 %command% WINEDEBUG: Description: Allows for more extensive and granular debugging of Wine components. This variable can be set directly or configured within user_settings.py for persistent application. Type: Environment Variable (String) Usage: WINEDEBUG=+loaddll,+seh %command% (example flags) ``` -------------------------------- ### Configure WinDbg Symbol Path for Proton Archive Source: https://github.com/valvesoftware/proton/blob/proton_10.0/docs/DEBUGGING-WINDOWS.md This configuration string is used to set the symbol path in WinDbg, allowing the debugger to load symbols directly from the official Proton archive. This is crucial for analyzing minidumps generated by Proton applications, providing access to necessary debugging information. ```APIDOC WinDbg Symbol Path Configuration: Path: srv*https://proton-archive.steamos.cloud/ Description: Specifies the symbol server URL for WinDbg to download debugging symbols for Proton builds. This path should be entered in the 'symbol path' field within WinDbg's Debugging Settings. ``` -------------------------------- ### Proton Log Error and Warning Prefixes Source: https://github.com/valvesoftware/proton/wiki/Checklist-Proton-bugs This entry lists common prefixes to search for within Proton logs to quickly identify and filter for error, warning, and fixme messages, which are crucial for debugging. ```APIDOC fixme: err: warn: error: ``` -------------------------------- ### Proton Build System Updates and Submodule Management Source: https://github.com/valvesoftware/proton/wiki/Changelog This snippet provides instructions for users who build Proton from source, detailing how to update submodules and noting new dependencies for the build system. It also mentions the need to rebuild Vagrant VMs due to these changes. ```Shell git submodule update --init --recursive ```