Optimizations
Last updated: 2024, Wed Jul 10th at 02:14 CDT
This guide and walkthroughs are to help with the performance and hardware. This list covers some basic to more advanced issues. This covers most distros, some information and packages maybe different.
Additional Resoureces #
Enable Libraries #
- Arch - enable Multilib in the
pacman.conf
- Ubuntu/Debian - enable i386 architecture
- 32-bit - enable 32-bit support, this can be a few different items, like
lib32-fontconfig
orglibc-devel-32bit
this depends on the distro
GPU drivers #
Make sure to include 32-bit versions and libraries if available.
- Nvidia - has options either NVK or Nvidia drivers
- AMD - has mesa and Vulkan
- Intel - has mesa and Vulkan Always reboot system after GPU driver installs and updates.
Enable Resizable BAR #
To get the most from your GPU you should enable Resizable BAR βReBARβ support. This is done though the Bios, which varies form manufacture and model, consult user manual. to check to see if its enabled and/or working properly use: Intel or AMD
sudo dmesg | grep BAR=
with Nvidia use:
nvidia-smi -q | grep -A 4 BAR
If resizable BAR is working and enabled BAR >= RAM. Another option could be to use the program cpu-x.
CPU Adjustments #
Install either kernel-tools
or cpupower
depending on your distro. After which, check your CPU governor.
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
If the governor is not set to the desired setting use:
sudo cpupower frequency-set -g performance
Use performance
or one of these other settings:
- Ondemand: Check the current system load and whether it may require higher frequency or not.
- PowerSave: Put the CPU frequency on the lowest possible.
- Performance: Put the CPU frequency on the highest possible.
- Userspace: The CPU frequency is determined by the user or his root applications.
- Conservative: Similar to ondemand, but gradually increases or decreases the frequency when needed instead of instantly setting it.
In addition, it is possible to verify that the p-state of your CPU is set accurately.
sudo cpupower frequency-info | grep driver
There are several ways to adjust the p-state of both Intel and AMD if needed. Depending on your system, the adjustments or settings may vary. Another issue that may come up is several p-states may drain batteries faster.
Performance #
In order have a good experience gaming on Linux, its best to max out the performance of your hardware. On some distros like arch you can use the Zen kernel to get a bit more power. Gamemode should also be installed to set all your hardware to performance mode. Make sure to enable the service.
Custom Kernel #
There are several kernels that are more hardware optimized.
- Liquorix
- Performance: Not as high as other kernels.
- Popularity: Not as widely used as Zen or Xanmod.
- Use Case: More suitable for Debian-based systems.
- Stability: Generally stable.
- Zen
- Optimization Focus: Designed for desktop responsiveness and general performance.
- Target Audience: Suitable for most users.
- Performance Impact: May slightly improve average framerate in benchmarks.
- Stability: Generally stable.
- TKG
- Customizability: Acts as a build system for various patches, CPU schedulers, and optimizations.
- Flexibility: Allows users to tailor their kernel to specific needs.
- Performance: Varies based on hardware and settings.
- Stability: Depends on the specific configuration.
- Xanmod
- AMD Ryzen Optimization: Offers advantages on AMD Ryzen processors.
- Multi-Core Performance: Slightly better multi-core performance in some tests.
- Build Variants: Provides both stable and edge builds.
- Stability: Generally stable.
Graphics #
VKBasalt enhances Vulkan graphics with a post processing layer. Adjust the .conf
file to improve the look and feel of games. For vsync settings and to control framerates you can use
libstrangle.
Controls #
There are a variety of both mouse/keyboard support and controllers. Solaar works with many Logitech keyboards, mice, and other devices. You can program many types of gaming mice with libratbag and Piper. Xbox One controllers wired and over Bluetooth are supported with xpadneo. If you are having issues with controller support, you may want to try game devices udev. If there is a device that is not covered or if you want other features you can try AntiMicroX. Its used to map gamepad keys to keyboard, mouse, scripts and macros.