L2TopZone L2HopZone

Linux optimizations for games

Discussion in 'Info and Tutorials' started by AssassinPWNZ, Jan 28, 2020.

Top RB Hunters Weekly Reset (1st day, 00:00 GMT+1)
Long-Term L2 Freya 15X mid-server! Enjoy!
Join Lineage 2 Freya server 15X
  1. AssassinPWNZ

    AssassinPWNZ Heir

    Messages:
    2
    Likes Received:
    2
    Trophy Points:
    25
    Esync
    Esync is enabled by default only in SteamPlay / Proton, but is disabled by default in Wine Staging, so to use Esync in Wine Staging you will need Wine Staging 4.6 or later, because in earlier releases Esync has not been added yet, and you also need to use the variable WINEESYNC=1. For example, you can add such a new line to ~/.bashrc:
    export WINEESYNC=1
    Changes will become available after restarting the operating system or relog.
    More details: https://github.com/zfigura/wine/blob/esync/README.esync

    Increasing the limit of descriptors, if you have it default. Fortunately, Debian and its derivatives [Ubuntu, Mint] already come out of the box, the default is a predefined reasonable limit for descriptors, but Arch Linux, according to Arch's philosophy, always uses only the default settings set by program developers (upstream), therefore users of this distribution will have to manually configure a reasonable descriptor limit.

    Open them one by one for editing with commands in the terminal:
    $ sudo nano /etc/systemd/system.conf
    $ sudo nano /etc/systemd/user.conf

    In each of them, find the line:
    # DefaultLimitNOFILE =
    It is necessary to uncomment it, that is, remove the # at the beginning of only this line and add the value 1024: 1048576 here, so that in the end this line looks like this:
    DefaultLimitNOFILE=1024:1048576
    Next, press Ctrl + x to save your changes and exit. These changes will take effect only after restarting the operating system.
    [​IMG]

    Feral Game Mode

    GameMode is a background process that on-the-fly modifies various Linux system settings to maximize gaming application performance.
    For example, with GameMode, power-saving modes can be turned off, resource allocation and task scheduling parameters (CPU governor and SCHED_ISO) can be changed, I/O priorities can be changed, the screen saver can be blocked, various high-performance modes in the NVIDIA and AMD GPUs can be turned on, and NVIDIA GPU overclocked (overclocking), run scripts with user-defined optimizations.

    Installation instructions and commands. On the latest versions it defines the games itself, including games through Wine
    https://github.com/FeralInteractive/gamemode

    DXVK

    I believe that this project is known to many thanks to the use of Proton in Steam for broadcasting Windows games through the Vulkan API, due to which there is now an adequate FPS, even higher than the native Linux ports

    For users of Arch Linux, ArcoLinuxB, Endeavor OS, Manjaro, or another GNU / Linux-based Arch Linux distribution, install the dxvk-bin package from AUR. If you have installed, for example, yay, enter this command in the terminal:
    $ yay -Syu dxvk-bin
    After installing these packages, the DXVK libraries can be found in /usr/share/dxvk
    To further install DXVK on your WINEPREFIX, run this command:
    $ sh /usr/share/dxvk/setup_dxvk.sh install --symlink
    Learn more about installing DXVK in the Wine prefix: https://github.com/doitsujin/dxvk#how-to-use
    To upgrade to a new DXVK release, you do not need to run these commands again for each of your WINEPREFIX, but instead simply run the AUR package update. For other distributions, you cannot install the DXVK package from repositories.
    To install DXVK on other distributions, run this command:
    $ winetricks dxvk

    DXVK_HUD

    If you want to enable the HUD to display the frame per second (fps) counter during the game, add the environment variable DXVK_HUD = 1 to your start command
    For instance:
    $ env DXVK_HUD=1 wine start /unix "/home/user/.wine/drive_c/Program Files (x86)/The Game/game.exe"

    If you want to display only the FPS counter, then replace DXVK_HUD=1 > DXVK_HUD=fps
    If you want to display simultaneous information, then replace DXVK_HUD=1 > DXVK_HUD=full

    Read more about DXVK_HUD at this link:
    https://github.com/doitsujin/dxvk#hud

    RADV-ACO

    Valve's open source ACO shader compiler for the Radeon Vulkan Open Driver (RADV).
    Added starting from Mesa 19.3, use via the variable RADV_PERFTEST=aco
    Tests can be viewed on the Internet, for example on the popular Linux resource
    https://www.phoronix.com

    DXVK_ASYNC=1
    There is also a DXVK_ASYNC option, but it was removed from the standard DXVK. The installation instructions are different for distributions, I installed dxvk-winelib. It seems to have helped me, but I don’t know

    You can verify that DXVK and RADV-ACO are enabled with the variable enabled DXVK_HUD=1
    [​IMG]


    My final path looks like this:
    env DXVK_ASYNC=1 DXVK_HUD=fps WINEESYNC=1 RADV_PERFTEST=aco /Games/Freya/system/L2.exe
    Last edited: Jan 30, 2020
    L2S likes this.
  2. AssassinPWNZ

    AssassinPWNZ Heir

    Messages:
    2
    Likes Received:
    2
    Trophy Points:
    25
    Improving graphics with vkBasalt
    Download and compile vkBasalt. ArchLinux already has AUR.

    https://github.com/DadSchoorse/vkBasalt
    Downloading: raytracing, reshade, reshade-master

    https://drive.google.com/drive/folders/1OYrJjzF7KbSV8l_jfgj-fUee0a84JnWS
    We unpack it into one folder. In the configuration file, specify the path to textures and shaders.
    You throw the file into the .exe folder, but if it doesn't work, you throw it into the folder next to the global configuration. The paths where you can find the file are listed on github.
    By default, the most stable options are already included in the file. Raytracing doesn't work well for me. SMAA can be swapped for FXAA for performance.

    Here's an example of a change with options enabled: SMAA, CAS (Contrast Adaptive Sharpening), FakeMotionBlur, FakeHDR

    Before:

    https://imgur.com/1A1yMB7.png
    After:
    https://imgur.com/8htunzI.png
    L2S likes this.