How to drastically improve gaming performance on Linux

王林
Release: 2023-06-23 12:54:45
forward
1811 people have browsed it

Linux is increasingly becoming a strong choice for PC gaming as a practical alternative to Windows. Thanks to Wine, improved GPU driver support, SteamOS, and various other enhancements, Linux gaming is now possible.

But as with Windows, everything may not be perfect from the start. Here are excellent tips for improving Linux gaming performance.

如何大幅提升 Linux 上的游戏性能

Use the correct display driver

For those who have been using Linux for a long time, they may be well aware that on Linux Using some GPU drivers is not an easy task. Traditionally, proprietary drivers have been limited to Windows and Mac systems. Therefore, third-party drivers are required, but none of them are as good as the real ones.

如何大幅提升 Linux 上的游戏性能

Fortunately, if you are new to Linux, you won't know or care about any of this. You don't need to care about this either. AMD graphics cards are widely supported, while NVIDIA has changed its previous stance and now offers better drivers.

But which GPU is best on Linux – AMD or NVIDIA? It's hard to say, but you'll probably get better support using an AMD system. This doesn't mean you should replace your NVIDIA graphics card immediately. NVIDIA plus Intel CPU will probably get better results than AMD plus Intel CPU. But if your CPU is AMD, it would make more sense to pair it with an AMD GPU.

Choose the right hardware, install the right drivers and things will improve in no time.

You can get a better gaming experience on Linux systems by using fully compatible controllers and audio devices. Make sure the drivers for these devices are up to date and update them if necessary.

If any problems arise, you're better off just updating the kernel.

Updating the Linux Kernel

In any operating system, the core is a piece of software that bridges the gap between the hardware and the software you run. The Linux kernel is the core of any Linux-based operating system and contains a large number of device driver libraries.

Typically, these drivers are up to date and support almost any device connected to the computer. Occasionally, you may encounter a situation where your game controller, audio device, or monitor isn't functioning optimally.

When faced with this situation, you can check whether the Linux kernel needs to be updated, or see if the planned revision can solve the problem.

Set the CPU scheduler to improve performance

Linux users can instruct the CPU to improve performance, which is crucial for gaming. The easiest way is to use the cpufrequtils tool.

Install using the following command:

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install cpufrequtils
Copy after login

如何大幅提升 Linux 上的游戏性能

You can launch the tool from the application (or search for cpupower-gui) and use it to maximize your The computer's CPU core. The steps are as follows:

  • Select (all CPUs) ALL CPU
  • Set the scheduler to performance mode (Performance)
  • Click "Apply" to confirm the settings

如何大幅提升 Linux 上的游戏性能

#This should significantly improve the Linux gaming experience.

Is the GPU suppressed by the operating system?

In some cases, the operating system actively degrades the gaming experience on Linux. This usually happens on PCs and laptops that come with a discrete graphics card or chip, as opposed to those systems that have an integrated GPU.

The easiest way to overcome this problem is to right-click on the corresponding game and select Launch with discrete graphics.

Launching Applications Using a Graphics Card in Linux This will ensure that the game relies on your computer's GPU card for all graphics processing. You can then expect a performance boost when the game launches.

Changing Desktop Environments

Some desktop environments are more bulky than others. This is not surprising, as they require more system resources to run, which reduces the CPU and memory required by the game you are using.

Switching to a lightweight desktop environment can help solve this problem. Installing a lightweight desktop environment means more resources are available for gaming. This may be just the extra framerate boost your system needs.

Our introduction to the best lightweight desktop environments will help you make the right choice.

Disable desktop compositor

Another tweak you can make to your Linux desktop is to disable compositors.

虽然有些桌面环境可以采用这种方法,但通常情况下在GNOME中是不必要的,因为应用程序和游戏可以直接绕过合成。

合成器(或融合式窗口管理器)是一种软件,为每个屏幕窗口(包括最小化的窗口)提供了内存缓冲区。它还可以处理每个应用窗口的视觉效果。

禁用合成器取决于你使用的桌面环境和合成器。

  • 对于 KDE,在启动游戏之前按 shift + alt + f12
  • 在 Xfce 上,使用终端命令 xfconf-query -c xfwm4 -p /general/use_compositing -s false(切换到 true 以重新启用合成)
  • 对于 MATE,输入 gsettings set org.mate.Marco.general compositing-manager false(或启用时为 true)

某些发行版和桌面环境在禁用合成方面不太可靠。禁用合成器已经不再被允许在Linux Mint的Cinnamon桌面环境中。

启用游戏模式以提升游戏性能

Linux发行版还支持游戏模式,这是一种临时优化(CPU调度器、屏幕保护程序阻止、GPU性能、自定义脚本等),可以根据需要进行运行。

GameMode 已经内置在最新版本的 Ubuntu中。如果你的发行版没有安装它,请使用以下命令安装:

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install gamemode
Copy after login

在 Fedora 和 CentOS 上,使用以下命令:

linuxmi@linuxmi:~/www.linuxmi.com$ sudo dnf install gamemode
Copy after login

一些游戏具备内置游戏模式支持,因此一安装好,启动游戏时这些模式就会自动激活。在非此情况下,请使用 gamemoderun 命令并指定游戏进程的名称

linuxmi@linuxmi:~/www.linuxmi.com$ gamemoderun quake3
Copy after login

如何大幅提升 Linux 上的游戏性能

使用起来就是这么简单。

更新Wine和其他兼容性工具

在Linux系统上运行Windows游戏时,你应该预期性能会受到影响。如果游戏没有专门设计为在Linux上运行,那么使用Wine和其他兼容性软件会对游戏的运行产生影响。

如何大幅提升 Linux 上的游戏性能

为了减轻这个问题,请确保Wine和相关软件保持最新版本。

不要忘记更新游戏

像其他平台一样,提高性能不仅仅需要更新驱动程序和操作系统,还需要更新您正在玩的游戏。更新游戏将确保应用最新的补丁、错误修复和其他调整。

这样做可以对Linux游戏性能产生重要影响。如果你使用Steam客户端,默认情况下游戏会自动更新。

或者只需使用 SteamOS

虽然上述的修复方法容易理解,但却必不可少,这让人感到失望。幸运的是,有一个替代方案。为什么还要麻烦手动更新内核和游戏模式呢?使用SteamOS直接就可以了。

如何大幅提升 Linux 上的游戏性能

SteamOS offers the best gaming experience on Linux by being based on Arch Linux.。可以说与Windows一样好(如果不是更好),这是与Steam Deck掌上游戏主机上运行的相同操作系统。

这些维修措施以及许多其他措施都可以在SteamOS中使用或切换。在大多数情况下,它们会自动处理。结果是一个稳定可靠的Linux游戏体验。

获得最佳的Linux游戏体验

在过去几年中,Linux上的游戏已经取得了相当大的进展。发布Steam Deck和更新SteamOS似乎给Linux游戏注入了新的动力。

之前认为不可能的事情,在当前,它们的体验逐渐趋于一致,尽管它并没有与Windows游戏表现一致。如果你正在考虑使用Linux作为你的游戏桌面操作系统,以下步骤可帮助你优化性能。

The above is the detailed content of How to drastically improve gaming performance on Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:51cto.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template