Difference between revisions of "Improving performance"

From Linux Gaming
Jump to navigation Jump to search
Line 1: Line 1:
== Major tweaks ==
== Major tweaks ==
{{Needs work|Problem=I don't know whether the procedure for disabling composition in Cinnamon actually works. Please edit if you know more}}
*Set your CPU to maximum performance. You can use [[Gamemode|GameMode]] or [https://gitlab.com/corectrl/corectrl/ CoreCtrl] to do this.
*Set your CPU to maximum performance. You can use [[Gamemode|GameMode]] or [https://gitlab.com/corectrl/corectrl/ CoreCtrl] to do this.
*Set your GPU to maximum performance. Read the AMD/Nvidia specific tweaks section to see how.
*Set your GPU to maximum performance. Read the AMD/Nvidia specific tweaks section to see how.
* If you use X11, disable [[Compositor|composition]]:  
*If you use X11, disable [[Compositor|composition]]:  
**If you use KDE: This can be done with a switch in Lutris settings. Right click the game -> <code>Configure</code> -> <code>System options</code> -> <code>Disable desktop effects</code>. This dramatically improves input lag and ''"smoothness"''. If you use Steam or Heroic, you have to manually disable composition with <code>shift</code> + <code>alt</code> + <code>f12</code>. The same combination re-enables it.
**If you use KDE: This can be done with a switch in Lutris settings. Right click the game -> <code>Configure</code> -> <code>System options</code> -> <code>Disable desktop effects</code>. This dramatically improves input lag and ''"smoothness"''. If you use Steam or Heroic, you have to manually disable composition with <code>shift</code> + <code>alt</code> + <code>f12</code>. The same combination re-enables it.
**If you use Gnome: You don't have to do anything.
**If you use Gnome: You don't have to do anything.
**If you use Cinnamon: Go to <code>settings</code> -> <code>general</code> -> <code>disable compositing for full-screen window</code>
** If you use Cinnamon: Go to <code>settings</code> -> <code>general</code> -> <code>disable compositing for full-screen window</code>
{{Needs work|Problem=I don't know whether the procedure for Cinnamon actually works. Please edit if you know more.}}
*Enable Esync. Lutris: Right click the game -> <code>Configure</code> -> <code>Runner options</code> -> Enable <code>Esync</code>.
*Enable Esync. Lutris: Right click the game -> <code>Configure</code> -> <code>Runner options</code> -> Enable <code>Esync</code>.
*Or, even better, enable <code>Fsync</code>. You need to use a compatible Kernel (like <code>zen</code>, <code>linux-tkg</code>, or <code>Xanmod</code>; '''kernel above 5.16 is compatible with F-sync out of the box'''), and enable it in Lutris: Right click the game -> <code>Configure</code> -> <code>Runner options</code> -> Enable <code>Fsync</code>
*Or, even better, enable <code>Fsync</code>. You need to use a compatible Kernel (like <code>zen</code>, <code>linux-tkg</code>, or <code>Xanmod</code>; '''kernel above 5.16 is compatible with F-sync out of the box'''), and enable it in Lutris: Right click the game -> <code>Configure</code> -> <code>Runner options</code> -> Enable <code>Fsync</code>
Line 12: Line 12:
* Look at your thermals and if they are too high, adapt the fan speed.
* Look at your thermals and if they are too high, adapt the fan speed.


== Optional==  
==Optional==  


*Use [[FSR - FidelityFX Super Resolution|FSR]]. This might dramatically improve your framerate in GPU limited games but will definitely hurt the image quality.
*Use [[FSR - FidelityFX Super Resolution|FSR]]. This might dramatically improve your framerate in GPU limited games but will definitely hurt the image quality.


==Input lag, Desktop Environments, and x11/Wayland==
==Input lag, Desktop Environments, and x11/Wayland==
{{Needs work|Problem=Might be outdated, and there is missing data for various desktop environments and window managers}}
{{Needs work|Problem=Might be outdated, and there is missing data for various desktop environments and window managers}}  
*It appears that KDE Plasma (X11) with no composition (currently) is (one of) the best regarding performance, and input lag. Gnome is also ok.<ref>https://www.reddit.com/r/linux_gaming/comments/cii545/linux_input_lag_analysis_v26des_windows_10_1809/</ref>
*It appears that KDE Plasma (X11) with no composition (currently) is (one of) the best regarding performance, and input lag. Gnome is also ok.<ref>https://www.reddit.com/r/linux_gaming/comments/cii545/linux_input_lag_analysis_v26des_windows_10_1809/</ref>
*You should only use Wayland, if you can enable FreeSync, because otherwise it will force vsync. If you are using KDE, and you have FreeSync enabled, the performance and input lag should be close to KDE X11 with composition disabled.<ref>https://zamundaaa.github.io/wayland/2021/12/14/about-gaming-on-wayland.html</ref> The input lag will increase by the "half frame" that is displayed with tearing. It's basically the question whether or not you want to wait for the frame to complete before displaying it. KDE Plasma is currently the best DE for Wayland.<ref>https://www.reddit.com/r/linux_gaming/comments/rghr60/about_gaming_and_latency_on_wayland/hpox61p/?context=3</ref>  
*You should only use Wayland, if you can enable FreeSync, because otherwise it will force vsync. If you are using KDE, and you have FreeSync enabled, the performance and input lag should be close to KDE X11 with composition disabled.<ref>https://zamundaaa.github.io/wayland/2021/12/14/about-gaming-on-wayland.html</ref> The input lag will increase by the "half frame" that is displayed with tearing. It's basically the question whether or not you want to wait for the frame to complete before displaying it. KDE Plasma is currently the best DE for Wayland.<ref>https://www.reddit.com/r/linux_gaming/comments/rghr60/about_gaming_and_latency_on_wayland/hpox61p/?context=3</ref>


It should be noted that we are talking about milliseconds here (the best value is 20ms, the worst is 90ms). If you are not susceptible to this, you might not even notice. But generally speaking, the game will feel more responsive if your input lag is low. You might also notice stuttering if you 99th percentile is bad.
It should be noted that we are talking about milliseconds here (the best value is 20ms, the worst is 90ms). If you are not susceptible to this, you might not even notice. But generally speaking, the game will feel more responsive if your input lag is low. You might also notice stuttering if you 99th percentile is bad.


==AMD/Nvidia specific tweaks ==
==AMD/Nvidia specific tweaks==


===AMD===
===AMD===
Line 31: Line 31:
***For your GPU select ''Performance mode'': ''Fixed'' and use the ''High'' setting (you may also adapt GPU fan speed here)
***For your GPU select ''Performance mode'': ''Fixed'' and use the ''High'' setting (you may also adapt GPU fan speed here)
***For your CPU select ''Performance scaling'': ''Custom'' and use ''Frequency governor'': ''Performance''
***For your CPU select ''Performance scaling'': ''Custom'' and use ''Frequency governor'': ''Performance''
*Use Mesa drivers
* Use Mesa drivers


===Nvidia<ref>https://www.reddit.com/r/linux_gaming/comments/sc9dv7/need_help_writing_wiki_article_about_how_to_tweak/hu54e1g/?context=3</ref> ===
===Nvidia<ref>https://www.reddit.com/r/linux_gaming/comments/sc9dv7/need_help_writing_wiki_article_about_how_to_tweak/hu54e1g/?context=3</ref>===
{{Needs work|Problem=not complete, and just copied from a reddit post}}
{{Needs work|Problem=not complete, and just copied from a reddit post}}
*The [https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Overclocking_and_cooling Arch Wiki] is the best place to start. Enable coolbits as the link explains. Good is, setting the coolbits value to 28 on anything currently supported (post-Fermi) to enable full control over the GPU (at least, as much control as you're allowed to be given).
* The [https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Overclocking_and_cooling Arch Wiki] is the best place to start. Enable coolbits as the link explains. Good is, setting the coolbits value to 28 on anything currently supported (post-Fermi) to enable full control over the GPU (at least, as much control as you're allowed to be given).
*Use GreenWithEnvy for overclocking, setting power limits (raise or lower) and fan curves. It's the closest alternative we have to MSI Afterburner.
*Use GreenWithEnvy for overclocking, setting power limits (raise or lower) and fan curves. It's the closest alternative we have to MSI Afterburner.
*Make sure to use a Proton version of 6.3, Experimental, Proton-6.21-GE-2 or later for Proton-GE and Proton-tkg/wine-tkg-git of 6.17 or greater (or build your own) for DLSS support. For Steam, you need to put <code>PROTON_HIDE_NVIDIA_GPU=0 PROTON_ENABLE_NVAPI=1 %command%</code> in your launch options (side note: there should only ever be one <code>%command%</code>).
*Make sure to use a Proton version of 6.3, Experimental, Proton-6.21-GE-2 or later for Proton-GE and Proton-tkg/wine-tkg-git of 6.17 or greater (or build your own) for DLSS support. For Steam, you need to put <code>PROTON_HIDE_NVIDIA_GPU=0 PROTON_ENABLE_NVAPI=1 %command%</code> in your launch options (side note: there should only ever be one <code>%command%</code>).

Revision as of 15:41, 7 February 2022

Major tweaks

This page needs work, for the following reason(s): I don't know whether the procedure for disabling composition in Cinnamon actually works. Please edit if you know more.
  • Set your CPU to maximum performance. You can use GameMode or CoreCtrl to do this.
  • Set your GPU to maximum performance. Read the AMD/Nvidia specific tweaks section to see how.
  • If you use X11, disable composition:
    • If you use KDE: This can be done with a switch in Lutris settings. Right click the game -> Configure -> System options -> Disable desktop effects. This dramatically improves input lag and "smoothness". If you use Steam or Heroic, you have to manually disable composition with shift + alt + f12. The same combination re-enables it.
    • If you use Gnome: You don't have to do anything.
    • If you use Cinnamon: Go to settings -> general -> disable compositing for full-screen window
  • Enable Esync. Lutris: Right click the game -> Configure -> Runner options -> Enable Esync.
  • Or, even better, enable Fsync. You need to use a compatible Kernel (like zen, linux-tkg, or Xanmod; kernel above 5.16 is compatible with F-sync out of the box), and enable it in Lutris: Right click the game -> Configure -> Runner options -> Enable Fsync
  • Install an optimized kernel like zen, linux-tkg, or Xanmod
  • Look at your thermals and if they are too high, adapt the fan speed.

Optional

  • Use FSR. This might dramatically improve your framerate in GPU limited games but will definitely hurt the image quality.

Input lag, Desktop Environments, and x11/Wayland

This page needs work, for the following reason(s): Might be outdated, and there is missing data for various desktop environments and window managers.
  • It appears that KDE Plasma (X11) with no composition (currently) is (one of) the best regarding performance, and input lag. Gnome is also ok.[1]
  • You should only use Wayland, if you can enable FreeSync, because otherwise it will force vsync. If you are using KDE, and you have FreeSync enabled, the performance and input lag should be close to KDE X11 with composition disabled.[2] The input lag will increase by the "half frame" that is displayed with tearing. It's basically the question whether or not you want to wait for the frame to complete before displaying it. KDE Plasma is currently the best DE for Wayland.[3]

It should be noted that we are talking about milliseconds here (the best value is 20ms, the worst is 90ms). If you are not susceptible to this, you might not even notice. But generally speaking, the game will feel more responsive if your input lag is low. You might also notice stuttering if you 99th percentile is bad.

AMD/Nvidia specific tweaks

AMD

  • Use CoreCtrl
    • Add a profile for every game:
      • For your GPU select Performance mode: Fixed and use the High setting (you may also adapt GPU fan speed here)
      • For your CPU select Performance scaling: Custom and use Frequency governor: Performance
  • Use Mesa drivers

Nvidia[4]

This page needs work, for the following reason(s): not complete, and just copied from a reddit post.
  • The Arch Wiki is the best place to start. Enable coolbits as the link explains. Good is, setting the coolbits value to 28 on anything currently supported (post-Fermi) to enable full control over the GPU (at least, as much control as you're allowed to be given).
  • Use GreenWithEnvy for overclocking, setting power limits (raise or lower) and fan curves. It's the closest alternative we have to MSI Afterburner.
  • Make sure to use a Proton version of 6.3, Experimental, Proton-6.21-GE-2 or later for Proton-GE and Proton-tkg/wine-tkg-git of 6.17 or greater (or build your own) for DLSS support. For Steam, you need to put PROTON_HIDE_NVIDIA_GPU=0 PROTON_ENABLE_NVAPI=1 %command% in your launch options (side note: there should only ever be one %command%).
  • For non-Steam games, use the latest lutris or wine-ge-custom build, with Lutris, and make sure to toggle on DLSS support in the Configure -> Runner options menu (though this might be better-suited to a Lutris article, which should exist). For non-Steam games, you also need a dxvk.conf file with dxgi.nvapiHack = False in it. You can just create one (mine is ~/Documents/dxvk.conf) and set DXVK_CONFIG_FILE=/path/to/dxvk.conf in your /etc/environment.
  • Use DKMS. Every distro that has proprietary nvidia driver support offers a DKMS version.
  • Use this to get minimal required drivers installed.
  • For Arch-based distributions, use TKG's nvidia-all repo, with _dkms="" set to true in customization.cfg.