Oa5678 Stack
ArticlesCategories
Gaming

Revive Your Old Gaming PC on Linux: A Step-by-Step Scheduler Optimization Guide

Published 2026-05-14 00:07:13 · Gaming

Introduction

If you’re gaming on Linux with hardware that’s seen better days, you might have noticed sluggish performance when multiple tasks are running in the background. The culprit? A Linux scheduler that doesn’t play well with cgroup scheduling on older systems or high-core-count machines. Developer Peter Zijlstra has proposed a kernel patch that flattens the scheduler’s task selection process, potentially breathing new life into your old potato PC. While the patch isn’t in the mainline kernel yet, you can already test the fix or use a temporary workaround with a shorter scheduler time slice. This guide will walk you through everything you need to optimize your Linux gaming experience on older hardware.

Revive Your Old Gaming PC on Linux: A Step-by-Step Scheduler Optimization Guide
Source: itsfoss.com

What You Need

  • A Linux PC: Preferably with older hardware (e.g., Intel Core i7-2600K and AMD Radeon RX 580, like in the test). High-core-count machines (16+ cores) can also benefit.
  • A game to test: For example, Shadows: Awakening from GOG (or any CPU-intensive game).
  • Background load tools: Use stress or spinning processes to simulate real-world usage (e.g., Discord, browser tabs, system updates).
  • MangoHud: For recording FPS and frame times.
  • chrt utility: To change the scheduler time slice (part of util-linux).
  • Optional – Kernel source and patch: If you want to apply the patch yourself.

Step-by-Step Guide

Step 1: Assess Your Current Performance Baseline

Before applying any changes, run your game under normal conditions to have a baseline. Launch your game via Lutris or Steam, and record metrics with MangoHud. For our example, we’ll use Shadows: Awakening on Proton (GE-Proton10-34 and Steam Runtime 3 (sniper)). Simulate background load by starting 8 spinning processes (one per CPU thread) using stress -c 8. Note the minimum, average, and maximum FPS and frame times.

Step 2: (Optional) Apply the Linux Kernel Patch

This step is for advanced users who want to try Zijlstra’s patch series “sched: Flatten the pick.” The patch aims to fix weight fragmentation in cgroup scheduling.

  1. Get the patch: Find the latest version (v2 as of writing) from the Linux kernel mailing list or Phoronix.
  2. Download kernel source: Use git clone from kernel.org or your distribution’s source.
  3. Apply the patch: Navigate to the kernel source directory and run patch -p1 < /path/to/patch.
  4. Compile and install: Configure your kernel (keep existing config), compile (make -j$(nproc)), and install (sudo make modules_install install). Reboot into the new kernel.
  5. Test: Repeat the baseline test with the patched kernel. Note that Zijlstra did not compare with and without the patch in his experiment; he focused on the slice workaround.

Important: This patch is still under review and may change. Proceed with caution.

Step 3: Use the Temporary Workaround – Shorten the Scheduler Time Slice

If you don’t want to patch the kernel, you can get a similar benefit by reducing the scheduler time slice to one-tenth of the default value. Zijlstra used chrt to set this for his gaming session.

  1. Find your game’s process ID (PID): Launch the game, then run ps aux | grep [game-name] to get the PID.
  2. Set a shorter time slice: Use the chrt command with the --deadline or --slice option. For example, to set the slice to 0.1ms (one-tenth of default 1ms): sudo chrt --slice 100000:0:0 -p PID (adjust slice duration as needed; default is 1,000,000 ns). Alternatively, you can run the entire game with a one-tenth slice from the start: sudo chrt --slice 100000:0:0 [game-launcher].
  3. Verify: Check the scheduler parameters with chrt -p PID.
  4. Monitor performance: Use MangoHud while playing with the shorter slice.

Step 4: Repeat Tests with Background Load

To replicate Zijlstra’s stress test, run 8 spinner processes (one per CPU thread) alongside the game. You can use stress -c 8 or a custom script that spins indefinitely. Record metrics with MangoHud for both the default slice and the shorter slice. Compare results.

Revive Your Old Gaming PC on Linux: A Step-by-Step Scheduler Optimization Guide
Source: itsfoss.com

Step 5: Analyze and Compare Results

Based on Zijlstra’s experiment with an older i7-2600K and RX 580 in Shadows: Awakening, here’s what you can expect:

MetricDefault sliceShorter slice (one-tenth)
FPS min3.820.6
FPS avg48.057.2
FPS max87.480.3
Frame time min (ms)9.48.4
Frame time avg (ms)34.519.5
Frame time max (ms)107.437.2

Notice the significant improvement in minimum FPS and frame time consistency. Your mileage may vary.

Tips and Considerations

  • Patch status: The kernel patch is not yet merged into mainline. It needs review from maintainers and will likely undergo revisions. Check Phoronix for updates.
  • Not just for old hardware: The scheduler issue scales with core count. Even modern 16+ core systems can see gains from this fix or the slice workaround.
  • Real-world relevance: The stress test with 8 spinner processes mimics common scenarios: Discord, web browser with a dozen tabs, and system updates all competing for CPU time.
  • Safety first: Compiling and installing a custom kernel carries risk. Back up your data and have a fallback kernel. The chrt workaround is safer and easier.
  • Experiment with slice values: The one-tenth value worked in Zijlstra’s test, but you can try other fractions (e.g., 0.2ms) to balance responsiveness and overhead.

With these steps, you can optimize your old gaming PC on Linux today. Whether you wait for the official patch or use the chrt workaround, you’ll likely see smoother gameplay under load.