You're browsing our forum as a Guest meaning you can only see a portion of the forum in read-only mode. To view all forum nodes and be able to create threads/posts please register or log-in.
Events Updates Discord Top RB Hunters Castle Sieges Raid Bosses L2 Database LF Clan Freya raid WTS WTB

Linux optimizations for games


Linux optimizations for games
« on: January 28, 2020, 04:53:32 PM »
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.


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

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



My final path looks like this:
env DXVK_ASYNC=1 DXVK_HUD=fps WINEESYNC=1  /Games/Freya/system/L2.exe
« Last Edit: June 04, 2022, 02:08:08 AM by AssassinPWNZ »
Linux optimizations for games
« Reply #1 on: October 03, 2020, 12:53:04 AM »
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
« Last Edit: June 04, 2022, 02:05:09 AM by AssassinPWNZ »
Re: Linux optimizations for games
« Reply #2 on: June 04, 2022, 01:27:30 PM »
For computers with a video card without Vulkan.

For those who don't have a better experience with DXVK + vkBasalt there is a solution in the form of Gallium Nine representing DX9 Native. It's certainly not the same FPS as with DXVK, but much better than DX9 > OpenGL, and for some even slightly worse than DXVK. Resource consumption will be lower than with DXVK, which is also important on older computers.

You can read about lower resource consumption and best practices here:
https://www.supergoodcode.com/the-finale/

I am also attaching my test results

With C4 client


With the latest Korean client


Gallium Nine is included in Mesa 18.0, so you must have version 18.0 and above. To use in Wine you need the wine-nine package, which can be installed from the repositories or via winetricks.

Then check if it is activated by typing
wine ninewinecfg

For those who like to run third-party games via Steam
PROTON_USE_GALLIUM_NINE=1 %command%

After that, run it for the first time via the console
wine /path/to/l2.exe
to see a green text notification in the console that DX9 Native is used. After that we can use it as usual.

To compare performance before and after, and just for fun, you can use Gallium HUD, pass in startup properties via env
env GALLIUM_HUD=GPU-load+cpu+fps wine /path/to/l2.exe

To compare resource consumption you can use PowerTOP or a simpler radeontop (for Radeon users)
« Last Edit: June 04, 2022, 01:37:07 PM by AssassinPWNZ »
Re: Linux optimizations for games
« Reply #3 on: June 06, 2022, 01:47:56 AM »
C4 client is outdated/deprecated.
Latest Korean client is not supported on more than 90% of L2 servers.

Also SCARLET servers are compatible with EU Lineage 2 clients and not tested with Korean stuff.

But good info anyways. Ty for posting it.
Re: Linux optimizations for games
« Reply #4 on: June 06, 2022, 01:04:14 PM »
Also SCARLET servers are compatible with EU Lineage 2 clients and not tested with Korean stuff.

They have a cosmetic difference. There will be no FPS difference.