Introduction
Installing, configuring, and using GameMode on Ubuntu Linux with Steam to squeeze the last drop of performance out of your games
What is GameMode?
GameMode is a small daemon created by Feral Interactive that tells the Linux kernel (and various subsystems) “the user is playing a game – give me maximum performance”. It does things like:Switch the CPU governor to performance (or a user‑chosen governor)Disable power‑saving features that add latency (e.g., Intel Turbo Boost restrictions, AMD P‑states throttling)Boost the I/O scheduler for the game’s process treeTell the compositor to turn off vsync / animations while the game runsExpose a clean command‑line wrapper (gamemoderun) that any game or launcher can use
When used together with Steam/Proton, MangoHud, and a modern GPU driver, you’ll see lower frame‑time spikes, higher average FPS, and smoother gameplay on Ubuntu 20.04/22.04/24.04 LTS (or any newer Ubuntu release).
Below is a complete, long, and very detailed guide that covers everything from a brand‑new Ubuntu install to per‑game fine‑tuning. Feel free to copy‑paste each block into a terminal, but read the explanations first – they’ll help you understand why each step exists.
I covered the basic installation steps in an earlier post (here) —this one is more about configuring it properly and actually using it.
1️. Prerequisites – Get the system ready
1.1 Install a recent Ubuntu LTS (recommended)
| Ubuntu version | Kernel version (default) | Reason |
|---|---|---|
| 22.04 LTS | 5.15 (or 6.2 if you install HWE) | Very stable, long‑term support, good Steam/Proton compatibility |
| 24.04 LTS | 6.5 (or newer) | Latest drivers, better Wayland support |
| 20.04 LTS | 5.4 (or HWE 5.15) | Still viable but you’ll need the HWE stack for newer GPU drivers |
Tip: If you already run Ubuntu, just make sure you’re on the latest kernel for your release (runsudo apt update && sudo apt full-upgrade). Thelinux-generic-hwe-22.04meta‑package will pull newer kernels automatically.
# Example for Ubuntu 22.04 – install the HWE stack (kernel 6.2 as of 2025)
sudo apt update
sudo apt install --install-recommends linux-generic-hwe-22.04
# Reboot to use the new kernel
sudo reboot
1.2 Install the correct GPU driver (NVIDIA, AMD, or Intel)
GameMode itself is driver‑agnostic, but the biggest FPS gains come from having the latest Vulkan‑capable driver.
NVIDIA (recommended)
# Add the graphics‑drivers PPA (keeps you on the latest stable driver)
sudo add-apt-repository ppa:graphics-drivers/ppa -y
sudo apt update
# Install the latest driver (as of 2025, 560 is stable, 570 is the newest)
sudo apt install nvidia-driver-580 # replace 560 with the version you see as "recommended"
# Also install the Vulkan ICD loader
sudo apt install libvulkan1 libvulkan-dev vulkan-utils
AMD (open‑source Mesa driver)
# Ensure you have the latest Mesa from the Ubuntu archive
sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
libgl1-mesa-dri libgl1-mesa-dri:i386
# For the absolute newest Mesa, you can use the Oibaf PPA (optional)
# sudo add-apt-repository ppa:oibaf/graphics-drivers -y
# sudo apt update && sudo apt upgrade
Intel (integrated graphics)
sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
libgl1-mesa-dri libgl1-mesa-dri:i386
1.3 Install Steam (the official client)
sudo apt install steam
# Or, if you prefer the latest flatpak version:
# flatpak install flathub com.valvesoftware.Steam
Log into Steam, enable Proton for Windows games (Steam → Settings → Steam Play → “Enable Steam Play for all other titles” → choose latest Proton).
1.4 Optional but recommended: Enable Wayland or X11?
- X11 is still the most battle‑tested for Proton, especially with NVIDIA drivers.
- Wayland works well with AMD/Intel and the latest Proton (≥8.0). If you’re on Wayland, make sure to launch Steam with
steam(it auto‑detects) orenv GDK_BACKEND=wayland steam.
Pro tip: If you experience stuttering, try both X11 and Wayland to see which yields better results for a given game.
2. Installing GameMode
GameMode is available via several distribution methods. Choose one; mixing them can cause conflicts.
| Method | Pros | Cons |
|---|---|---|
| APT (official Ubuntu repo) | Simple, automatically updates with system | May be a couple of releases behind |
| Snap | Sandboxed, auto‑updates | Needs snapd and may have slower start‑up |
| Flatpak | Works on any distro | Requires Flatpak runtime, extra permissions |
| Build from source | Latest features, custom patches | More steps, you must maintain updates manually |
2.1 Install via APT (the easiest)
sudo apt update
sudo apt install gamemode libgamemode0
gamemode→ daemon + systemd servicelibgamemode0→ client library used by Steam/Protongamemode-doc→ manpages (man gamemoderun,man gamemoded)
2.2 Install via Snap (alternative)
sudo snap install gamemode
# Snap creates its own systemd service under the snap namespace
Note: Some games launched via Steam may not see the Snap‑installed daemon because the Snap’s environment is isolated. The APT version is highly recommended for Steam integration.
2.3 Install via Flatpak (rarely needed)
flatpak install flathub com.github.FeralInteractive.GameMode
Again, the APT version is preferred for Steam.
2.4 Build from source (latest bleeding‑edge)
If you want the very latest features (e.g., new gpu_performance options added after the Ubuntu release), follow these steps:
# Install build dependencies
sudo apt install build-essential git meson ninja-build pkg-config \
libsystemd-dev libdbus-1-dev libinih-dev
# Clone the repo
git clone https://github.com/FeralInteractive/gamemode.git
cd gamemode
# Build
meson setup build --prefix=/usr
meson compile -C build
sudo meson install -C build
After building, the daemon will be installed to /usr/bin/gamemoded and the systemd unit to /usr/lib/systemd/system/gamemoded.service.
3. Verifying the GameMode daemon is running
GameMode works via a systemd service (gamemoded.service). Verify it:
# Check status
systemctl status gamemoded
# Expected output (shortened):
# ● gamemoded.service - GameMode daemon
# Loaded: loaded (/lib/systemd/system/gamemoded.service; enabled; vendor preset: enabled)
# Active: active (running) since ...
If it’s inactive or failed, start and enable it:
sudo systemctl enable --now gamemoded
# Verify again
systemctl is-active gamemoded && echo "GameMode daemon is up!"
Why enable? – The daemon must start at boot so Steam can talk to it without needing sudo each time.If this solution is failing too, GameMode often requires the user running the games to be part of the gamemode group for proper functionality, especially for features like CPU governor and I/O priority adjustments.
Quick sanity test
Run the wrapper manually and watch the daemon’s log:
# In one terminal, watch the daemon output:
journalctl -u gamemoded -f
# In another terminal, run a dummy command through GameMode:
gamemoderun sleep 5
You should see a line like:
[INFO] GameMode client attached (pid 12345) for command: sleep 5
[INFO] GameMode client detached (pid 12345)
If you see “Failed to connect to gamemoded”, double‑check that the service is running and that your user belongs to the gamemode group (on some distros). On Ubuntu this group is automatically created:
sudo usermod -aG gamemode $USER
newgrp gamemode # or just log out/in
Solution: Add your user to the gamemode group and then reboot or log out and back in.
sudo usermod -aG gamemode "$(whoami)"And then manually start and enable the service for your user session:
systemctl --user start gamemoded
systemctl --user enable gamemodedGameMode is almost universally designed to run as a user service managed by systemctl --user, not sudo systemctl.
4. Global GameMode configuration (/etc/gamemode.ini)
The daemon reads /etc/gamemode.ini for system‑wide defaults. The shipped file contains a lot of commented options; you’ll copy it to a new file and tweak the values you care about.
sudo cp /usr/share/doc/gamemode/examples/gamemode.ini /etc/gamemode.ini
sudo vim /etc/gamemode.ini
Below is a highly‑tuned example for modern gaming laptops/desktops. Paste it in (replace the entire file) and save.
# /etc/gamemode.ini – Global defaults
[game_mode]
# 1 = enable, 0 = disable. Most users keep this on.
enabled = 1
# CPU governor while a game is running.
# Options: performance, powersave, ondemand, userspace, schedutil
cpu_governor = performance
# If you have a hybrid graphics (Intel + NVIDIA/AMD), you may want to
# force the discrete GPU on when a game starts.
# 1 = on, 0 = off
# (Requires appropriate DRM/PRIME setup; see GPU section later)
# gpu_boost = 1
# I/O scheduler (affects disk reads/writes for the game’s process tree)
# Options: cfq, deadline, mq-deadline, none, bfq
# "none" is best for SSDs/NVMe; "deadline" works well on HDDs.
io_scheduler = none
# Reduce the swappiness while a game is running (0–100)
# 0 = never swap, 100 = always swap. 10 is a good compromise.
swappiness = 10
# Enable/disable the “realtime” priority boost.
# 1 = raise priority of the game process (requires CAP_SYS_NICE)
# 0 = keep normal nice level (safer on shared systems)
realtime = 1
# NVIDIA/AMD specific power/performance tweaks (requires the driver’s
# power management interface to be exposed)
# For NVIDIA: set the GPU to "P0" (maximum performance)
nvidia_pstate = 0 ; 0 = P0, 1 = P1, ... 15 = P15
# For AMD: set "performance level" (0 = highest)
amd_perf_level = 0
# Optional: disable compositor while a game is active (reduces latency).
# Works on X11 with picom/compton, or on Wayland with `gamescope`.
disable_compositor = 1
# Optional: request a higher CPU boost frequency on Intel (if available)
# 1 = enable, 0 = ignore
intel_boost = 1
# Logging level (0 = silent, 1 = error, 2 = warning, 3 = info, 4 = debug)
log_level = 3
Explanation of key options
| Option | What it does | When to change |
|---|---|---|
cpu_governor |
Switches the scaling governor for all CPUs. performance locks them at max frequency. |
Use performance on laptops when plugged in; powersave or schedutil when on battery. |
io_scheduler |
Chooses the kernel I/O scheduler for the game’s I/O threads. none bypasses the scheduler (good for SSD/NVMe). |
If you use a spinning HDD, change to deadline. |
realtime |
Gives the game a real‑time scheduling priority (SCHED_RR). This reduces latency but can starve background tasks. |
Keep 1 for fast‑action games (FPS, shooters). Disable for heavy background workloads. |
disable_compositor |
Sends a DBus message to the compositor to pause animations. | Most modern compositors respect this; if you notice UI glitches after quitting a game, set to 0. |
nvidia_pstate / amd_perf_level |
Forces the GPU to stay at its highest power state while the game is running. | Keep at 0 for maximum performance; may increase power draw & temps. |
intel_boost |
Requests the Intel “turbo boost” to stay active. | Usually safe; set to 0 if you see overheating on older laptops. |
After editing, reload the daemon:
sudo systemctl restart gamemoded
5. Per‑game overrides (~/.config/gamemode.ini)
Sometimes you need different settings per title (e.g., a slower game that doesn’t need a real‑time priority, or a VR title that needs a higher GPU boost). GameMode reads the user‑level file last, overriding the global defaults.
mkdir -p ~/.config
nano ~/.config/gamemode.ini
Example: two games with distinct tweaks
# ~/.config/gamemode.ini – per‑game overrides
# Generic fallback (applies to any game not explicitly listed)
[default]
cpu_governor = performance
realtime = 0 ; keep nice level normal for casual titles
# Call of Duty: Modern Warfare II (fast‑paced shooter)
[call_of_duty_modern_warfare_ii]
cpu_governor = performance
realtime = 1
nvidia_pstate = 0
disable_compositor = 1
log_level = 4 ; debug logs for fine‑tuning
# Stardew Valley (light indie game)
[stardew_valley]
cpu_governor = powersave
realtime = 0
io_scheduler = deadline
log_level = 2
How does GameMode know which section to use?
Steam/Proton passes the process name (the executable file) to GameMode. The daemon strips the file extension and looks for a matching section. For example, the executable code.exe would match [code].
If you’re unsure of the exact process name:
# Run a game once, then check the logs:
journalctl -u gamemoded -f | grep -i attached
# You’ll see something like:
# [INFO] GameMode client attached (pid 54321) for command: ./game_executable
Copy that exact name (without the leading ./) into your per‑game section.
6. Using GameMode with Steam (the most common workflow)
6.1 Ensure Steam knows about the GameMode client library
Steam (via Proton) automatically loads libgamemodeauto.so if it finds it in the runtime library path. The APT package puts the library in /usr/lib/x86_64-linux-gnu/. To verify:
ls -l /usr/lib/x86_64-linux-gnu/libgamemodeauto.so
If the file exists, you’re good. If you built from source and installed to a custom prefix, make sure the library is in LD_LIBRARY_PATH or copy it:
sudo cp libgamemodeauto.so /usr/lib/x86_64-linux-gnu/
6.2 Enable GameMode for all Steam games (global)
Open Steam → Settings → In‑Game → "Enable the Steam Overlay" (leave on) – this is unrelated but you’ll need overlay for some diagnostics.
Now add the global launch option for every game:
- Click Steam → Settings → Steam Play → Advanced → "Enable GameMode" – if this checkbox exists (newer Steam builds expose it).
- Open a terminal and run:
- Then tell Steam to use this wrapper for all games:
- Simpler method: Use the per‑game launch option (see next section) for each title you care about.
If you don’t see it, you can add a default launch option via a Steam launch parameter that applies to all games:
# This creates a small wrapper script that adds gamemoderun to every game
cat <<'EOF' | sudo tee /usr/local/bin/steam-gamemode-wrapper
#!/bin/bash
# Wrapper for Steam that forces GameMode on every launched game
exec gamemoderun "$@"
EOF
sudo chmod +x /usr/local/bin/steam-gamemode-wrapper
# Set an environment variable for the Steam client itself
echo "export STEAM_RUNTIME=1" | sudo tee -a /etc/profile.d/steam-gamemode.sh
echo "export STEAM_LAUNCH_OPTIONS='-wrapper /usr/local/bin/steam-gamemode-wrapper'" | sudo tee -a /etc/profile.d/steam-gamemode.sh
source /etc/profile.d/steam-gamemode.sh
6.3 Per‑game launch options (recommended)
For fine‑grained control, add gamemoderun to the Launch Options field of each game:
- Right‑click the game → Properties → General → Launch Options.
%command%is a placeholder that Steam replaces with the actual executable.gamemoderuntells the GameMode client library to request the daemon before the game starts.
Enter:
gamemoderun %command%
Example for a Windows title using Proton:
gamemoderun %command% -noeac -novid
(You can tack on any Proton or game‑specific flags after %command%.)
6.4 Verify that GameMode is actually active for a running game
While a game is running, open a terminal and run:
gamemoded -s
Expected output:
gamemode is active
Alternatively, check the daemon log:
journalctl -u gamemoded -f
# Look for “attached” messages that reference your game’s process name.
If you see “attached” and “detached” lines around the time you started and stopped the game, everything works.
6.5 Combining GameMode with MangoHud (FPS overlay)
MangoHud is a lightweight overlay that shows FPS, frame times, temperature, and more. It works great together with GameMode.
# Install MangoHud
sudo apt install mangohud libmangohud-dev
# Enable it globally for Steam:
echo "export MANGOHUD=1" | sudo tee -a /etc/profile.d/mangohud.sh
source /etc/profile.d/mangohud.sh
Or set per‑game launch options:
gamemoderun mangohud %command%
You’ll see a HUD on screen with real‑time stats, letting you verify that GameMode is indeed raising performance.
7. Using gamemoderun for non‑Steam games (native Linux, Lutris, emulators, etc.)
GameMode isn’t limited to Steam. Any executable launched from a terminal, script, or another launcher can be wrapped:
gamemoderun ./my_native_game
7.1 Lutris integration
- Open Lutris → Configure → System options → Runner options.
- Save. When you launch the game from Lutris, GameMode will be active.
Add gamemoderun before the executable in the Command field. Example for a Wine title:
gamemoderun %command%
7.2 Emulators (e.g., RetroArch, Dolphin)
# Dolphin (GameCube/Wii)
gamemoderun dolphin-emu
# RetroArch
gamemoderun retroarch -L /path/to/core.so /path/to/rom
7.3 Scripted launch (e.g., a custom Bash wrapper)
#!/usr/bin/env bash
# mygame-launch.sh – a tiny wrapper that ensures GameMode
exec gamemoderun /opt/mygame/bin/mygame "$@"
Make it executable (chmod +x mygame-launch.sh) and use it in your desktop shortcut.
8. Monitoring & diagnostics
8.1 gamemoded -s
gamemoded -s # prints active state
gamemodelist # prints list of attached processes8.2 perf, htop, glxinfo, vulkaninfo
- htop (press `F2 → Setup → Columns → Add → “PWR” to see governor changes)
- perf top – view which functions consume CPU while GameMode is active.
- glxinfo | grep "OpenGL renderer" – verify you’re using the discrete GPU.
- vulkaninfo | grep "deviceName" – confirm Vulkan driver.
8.3 Logging level
If you need more detail, raise the log_level in /etc/gamemode.ini to 4 (debug). Logs go to journalctl:
sudo journalctl -u gamemoded -f
or if you're running gamemode service in user mode:
journalctl --user -f -u gamemoded.serviceRemember to lower it back to 3 or 2 after you’re done, otherwise the daemon will generate a lot of output.
9. Advanced performance tweaks that complement GameMode
GameMode is a CPU‑centric optimizer. To truly squeeze every frame, pair it with these system‑level adjustments.
| Area | What to do | Command / steps |
|---|---|---|
| CPU Frequency scaling (outside GameMode) | Set the hardware driver to “performance” for the whole session (helps on laptops). | sudo cpupower (installlinux-tools-common) |
| Thermal / power limits | Raise the GPU’s power limit (NVIDIA) and disable power‑saving modes. |
nvidia-smi -pl 250(sets 250 W limit; adjust to your card) |
| NVMe / SSD performance | Enable deadlineor none scheduler globally (if you have an NVMe). |
sudo sysfsutils |
| Compositor | Disable desktop effects while gaming (e.g., picom -b --vsync false). |
Add a script that stops picom before the game and restarts after. |
| Kernel tickless mode | Use a low‑latency kernel ( linux-lowlatency). |
sudo apt installand reboot. |
| Game-specific Vulkan layers | Install vulkan-toolsand enable VK_LAYER_MESA_overlayfor debugging. |
sudo apt install |
| CPU affinity | Pin the game to high‑performance cores (big cores on hybrid CPUs). |
gamemoderun |
| Memory allocation | Pre‑allocate hugepages for large‑memory games (e.g., Star Citizen). |
sudo sysctl -w |
| Network | For online titles, enable tcp_fastopenand bbr congestion control. |
sudo sysctl -w |
Caution: Some of these tweaks (e.g., raising power limits) increase heat and power draw. Monitor temps (sensors) and ensure adequate cooling.10. Common pitfalls & troubleshooting checklist
| Symptom | Likely cause | Fix |
|---|---|---|
| Game starts but performance is unchanged | GameMode daemon not running or not attached. | systemctl status;ensure gamemoderun %command%is in launch options. |
gamemoderun prints “Failed to open libgamemodeauto.so” |
Library not in LD_LIBRARY_PATH. |
Verify /usr/lib/x86_64-linux-gnu/exists; reinstall the APT package. |
| CPU governor stays on powersave during the game | cpu_governor overridden by another service (e.g., TLP, auto-cpufreq). |
Disable conflicting services ( sudo systemctl),or add cpu_governor = to per‑game config. |
Game crashes after adding gamemoderun |
Real‑time priority conflict on systems without CAP_SYS_NICE. |
Set realtime = 0in the config or run Steam as root (not recommended). |
| GPU stays on low power state (P8) while playing | nvidia_pstate not applied because the NVIDIA driver’s power management is disabled ( NVreg_RegistryDwords=). |
Edit /etc/modprobe.d/nvidia.confto enable PowerMizer, then sudo update-initramfs. |
| Overlay (MangoHud) disappears | disable_compositor kills the Wayland compositor that MangoHud needs. |
Set disable_compositor = 0for Wayland sessions, or use gamescopeinstead. |
| GameMode logs spam the journal | log_level set to 4 (debug) in production. |
Reduce to 3 or 2 and restart gamemoded. |
| Steam’s “Enable GameMode” checkbox missing | Using an older Steam client (pre‑2023). | Update Steam (steam://flushconfig or reinstall) or use manual launch options. |
gamemode-status says “GameMode active: NO” even with gamemoderun |
The client library failed to talk to the daemon (DBus permissions). | Ensure your user is in the gamemodegroup: sudo usermod -aG; log out/in. |
Quick verification script
#!/usr/bin/env bash
# Verify GameMode is functional
if ! systemctl is-active --quiet gamemoded; then
echo "❌ gamemoded service is not running"
exit 1
fi
if ! command -v gamemoderun >/dev/null; then
echo "❌ gamemoderun binary missing"
exit 1
fi
# Run a harmless command through GameMode
gamemoderun sleep 2
if gamemode-status | grep -q "YES"; then
echo "✅ GameMode is working!"
else
echo "❌ GameMode attached but status not reported"
fi
Save as check-gamemode.sh, chmod +x, and run it.
11. Frequently Asked Questions (FAQ)
Q1 – Do I need to run GameMode as root?
A: No. The daemon runs as a system service (root) but the client (gamemoderun) works for normal users. Only when you enable realtime = 1 does the client request a real‑time priority, which requires the CAP_SYS_NICE capability. On Ubuntu the gamemode package configures the necessary permissions automatically.
Q2 – Will GameMode break my battery life?
A: Yes, if you keep the CPU governor at performance while on battery, the system will consume more power and generate more heat. You can create a battery profile by adding a conditional in ~/.config/gamemode.ini:
[default]
cpu_governor = ondemand ; on battery
realtime = 0
Or use a simple script that toggles the governor before launching a game:
#!/usr/bin/env bash
if on_ac_power; then
sudo cpupower frequency-set -g performance
else
sudo cpupower frequency-set -g powersave
fi
exec gamemoderun "$@"
Q3 – Does GameMode work with Proton Experimental?
A: Absolutely. Proton loads libgamemodeauto.so just like native Linux executables. The only catch is that some early Proton builds didn’t expose the client library; always use a Proton version ≥ 7.0 (current as of 2025 is 9.0‑experimental).
Q4 – Can I use GameMode on a Wayland session?
A: Yes. The daemon works independent of X11/Wayland. The only limitation is disable_compositor, which only works with X11 compositors that respect the DBus org.kde.KWin or com.github.Picom. On Wayland, you can use gamescope or simply omit that option.
Q5 – How do I see which CPU core a game is running on?
A: Use htop → press F2 → Setup → Columns → add “CPU%” and “PWR”. You’ll see the distribution of load across cores. With GameMode’s realtime enabled, you should see higher utilization on the “big” cores.
Q6 – Is there any risk of overclocking the CPU with GameMode?
A: No. GameMode only changes the scaling governor; it never changes the maximum frequency defined by the BIOS or firmware. To overclock, you’d need to edit BIOS settings or use tools like intel_pstate – that’s outside GameMode’s scope.
12. Summary checklist (one‑page cheat sheet)
- Add launch option
- Steam → Game → Properties → Launch Options →
gamemoderun %command%
- Steam → Game → Properties → Launch Options →
- Configure
/etc/gamemode.ini(global defaults). - Create per‑game overrides in
~/.config/gamemode.inias needed. - Optional: Add
MANGOHUD=1for HUD overlay. - Monitor temps (
sensors) and adjust GPU power limits if necessary. - Fine‑tune log level and per‑game settings until you’re happy.
Run a game, then check:
gamemode-status
journalctl -u gamemoded -f
Verify daemon
systemctl status gamemoded
Install packages
sudo apt update
sudo apt install gamemode mangohud
Final words
GameMode is a lightweight, low‑overhead tool that, when paired with proper system configuration, can give you a noticeable performance boost on Ubuntu 24.10 (or any recent Linux distro). By:
- Setting the CPU governor to
performance, - Enabling GPU boost (
nvidia_pstate/amd_perf_level), - Using real‑time priority for fast‑action games,
- Disabling the compositor while gaming,
you’ll often see a 5‑15 % increase in FPS and smoother frame times, especially on CPU‑bound titles.
The configuration files are simple INI‑style files, making it easy to script or version‑control your setup. And because GameMode talks to the kernel via sysfs, it works across a wide range of hardware – from old Intel laptops to the latest RTX 4090‑class GPUs.
Happy gaming! 🎮