1. Overview
The benchmark suite consists of three main parts
| Script / file | Purpose |
|---|---|
run_cp2077_benchmark.sh |
Builds the launch command, selects Proton, sets time‑outs and starts the game in benchmark mode. |
analyze_cp2077_results.sh |
Scans the benchmark output directory, builds a markdown report and inserts a link into the game’s README. |
Configuration files (groups.conf.sh, tests.conf.sh, optional profile JSONs) |
Define which test groups (sets of test names) and individual tests (mode, resolution, quality, ray‑tracing, frame‑generation) will be run. |
The workflow is:
- Configure which tests you want.
- Run
run_cp2077_benchmark.sh– it will launch the game repeatedly, each time with a different test configuration. - Analyze the generated CSV/JSON files with
analyze_cp2077_results.sh– a ready‑to‑publish markdown report is created.
2. Prerequisites
| Requirement | Details |
|---|---|
| Linux distribution | Any recent distro with a recent kernel, working Steam installation. |
| Steam & Proton | Steam must be installed (~/.local/share/Steam is the default location). The script picks a Proton version according to the precedence list: CP2077_PROTON_VERSION → PROTON_VERSION → CP2077_PROTON_VERSION_DEFAULT【1】. |
| Cyberpunk 2077 | Installed through Steam (AppID 1091500). |
| Dependencies | bash, timeout, printf, grep, sed, awk, date, git (optional for pulling updates). |
| Optional – MangoHUD / GameMode | Set ENABLE_MANGOHUD=1 or ENABLE_GAMEMODERUN=0 in the defaults to get HUD/CPU‑frequency data. |
3. Directory Layout (suggested)
benchmark/
├─ run_cp2077_benchmark.sh
├─ analyze_cp2077_results.sh
├─ config/ # will contain raw benchmark files
│ └─ groups.conf.sh # test‑group definitions
│ └─ tests.conf.sh # individual test definitions
├─ profiles/ # User settinges profiles
│ └─ ...
├─ results/ # will contain raw benchmark files
│ └─ <timestamp>/...
└─ logs/ # markdown reports generated by the analyzer
All scripts assume they are executed from the same directory (SCRIPT_DIR).
4. Configuration Files
4.1. Global defaults (run_cp2077_benchmark.sh header)
GAME_ID=1091500
STEAM_PATH="${HOME}/.local/share/Steam"
CUSTOM_LIBRARY_PATH="/mnt/Data/Games/Steam"
BENCHMARK_TIMEOUT_MINUTES=15
BENCHMARK_TIMEOUT_KILL_AFTER_SECONDS=30
You can override any of these by creating a SYSTEM_CONFIG_LOCAL_FILE or SYSTEM_CONFIG_OVERRIDE_FILE that is sourced early in the script【1】.
4.2. Proton selection
The script chooses Proton in this order:
CP2077_PROTON_VERSION(game‑specific)PROTON_VERSION(system‑wide)CP2077_PROTON_VERSION_DEFAULT(fallback)【1】
Set the appropriate variable in one of the config files if you need a specific Proton build.
4.3. Test groups (groups.conf.sh)
A group is a space‑separated list of test identifiers (the keys from tests.conf.sh).
Example excerpt:
TEST_GROUPS["quick"]="native-1080p-high-rt-off dlss-quality-1440p-high-rt-off fsr2-quality-1440p-high-rt-off"
TEST_GROUPS["4k-performance"]="native-4k-high-rt-off dlss-quality-4k-high-rt-off dlss-performance-4k-high-rt-off fsr3-quality-4k-high-rt-off"
All groups are defined in this file; you can add new ones or edit existing ones【3】.
4.4. Individual tests (tests.conf.sh)
Each entry follows the format
TESTS["<test‑name>"]="<mode> <resolution> <quality> <ray_tracing> <frame_generation>"
A few examples:
TESTS["dlss-balanced-1440p-high-rt-off"]="dlss-balanced 2560x1440 high off off"
TESTS["dlss-performance-1080p-high-rt-on"]="dlss-performance 1920x1080 high on off"
The file contains dozens of definitions covering native, DLSS, FSR, and ray‑tracing variations【4】.
4.5. (Optional) Profile JSONs
The UserSettings.*.json files you attached contain in‑game UI settings (e.g., MaximumFPS_Value, XESS_FrameGeneration).
If you want to lock a specific FPS cap or enable Frame Generation, edit the corresponding JSON and place it under the user‑settings directory ($USER_SETTINGS_FOLDER). The benchmark script does not modify these files automatically, but they are read by the game at start‑up.
5. Running the Benchmark
5.1. Choose a group (or a single test)
# Example: run the “quick” group
export BENCHMARK_GROUP="quick"
If BENCHMARK_GROUP is unset, the script will fall back to a default (you can set one in a local config).
5.2. Start the script
cd /path/to/benchmark
bash run_cp2077_benchmark.sh
What the script does (high‑level)
- Builds the launch command – a
timeoutwrapper that injects several environment variables (SteamAppId,PROTON_VERB=waitforexitandrun,VKD3D_FEATURE_LEVEL=12_0, etc.) and finally runs the game executable with-benchmarkand the per‑test arguments【1】. - Iterates over the selected tests (derived from the chosen group) and launches the game for each.
- Collects raw output (FPS logs, CSV files) into
$BENCHMARK_RESULTS_SOURCE_DIR(defaults to<CUSTOM_LIBRARY_PATH>/steamapps/compatdata/1091500/pfx/drive_c/users/steamuser/Documents/CD Projekt Red/Cyberpunk 2077/benchmarkResults/)【1】. - Stops after the timeout (
BENCHMARK_TIMEOUT_SECONDS, default 15 min) or kills the process after an extra 30 s if it hangs【1】.
You will see a line similar to:
Full launch command: cd /path/to/game && timeout --foreground --signal=TERM --kill-after=30s 900s env SteamAppId=1091500 ...
This line is printed by the script for debugging purposes【1】.
5.3. Monitoring
If ENABLE_MANGOHUD=1, MangoHUD overlay will appear showing FPS, frame time, and GPU usage during each run.
6. Analyzing the Results
After the benchmark finishes, run:
bash analyze_cp2077_results.sh
The analyzer performs the following steps (excerpted from the source):
- Checks that the README file contains the Test Results markers; if missing, it appends a section with links to the latest reports【2】.
- Generates a markdown file (
cp2077_benchmark_report.md) that starts with a header containing system information (OS, kernel, CPU, GPU, driver, Proton, etc.)【2】. - Builds a table with columns: Test Name, Mode, Resolution, Quality, Ray Tracing, Frame Generation, GPU Model, GPU VRAM, Driver, Min/Avg/Max FPS【2】.
The final report can be found under benchmark/results/ (or the directory you configured via BENCHMARK_RESULTS_OUTPUT_DIR). You can push it to a repository, publish it on a wiki, or simply read it locally.
7. Customising / Extending
7.1. Adding a new test
- Open
tests.conf.sh. - (Optional) Add it to an existing group or create a new group in
groups.conf.sh.
Add a line following the existing pattern, e.g.:
TESTS["dlss-ultra-performance-4k-low-rt-off"]="dlss-ultra-performance 3840x2160 low off off"
7.2. Adding a new group
TEST_GROUPS["ultra-4k"]="dlss-ultra-performance-4k-high-rt-off dlss-ultra-performance-4k-high-rt-on"
Now you can benchmark the whole set by setting BENCHMARK_GROUP="ultra-4k".
7.3. Changing timeout values
Edit the defaults or provide an override file:
BENCHMARK_TIMEOUT_MINUTES=30 # allow 30 min per run
BENCHMARK_TIMEOUT_KILL_AFTER_SECONDS=60
7.4. Using a specific Proton version
export CP2077_PROTON_VERSION="proton-8.0-stable"
or set it in a local config file that will be sourced before the script runs.
7.5. Tweaking in‑game settings
Modify the JSON files you attached (e.g., UserSettings.dlss3-balanced-1440p-high-rt-on-fg.json) to change MaximumFPS_Value, XESS_FrameGeneration, etc. Place the edited file in $USER_SETTINGS_FOLDER before running the benchmark.
8. Example Full Run
# 1. Prepare environment
export BENCHMARK_GROUP="quick-4k"
export CP2077_PROTON_VERSION="proton-9.0-stable"
export ENABLE_MANGOHUD=1
# 2. Run benchmark
cd ~/benchmark
bash run_cp2077_benchmark.sh
# 3. When the script finishes, analyse
bash analyze_cp2077_results.sh
# 4. Open the generated report
xdg-open results/cp2077_benchmark_report.md
The report will contain a table like:
| Test Name | Mode | Resolution | Quality | Ray Tracing | Frame Generation | GPU Model | GPU VRAM | Driver | Min FPS | Avg FPS | Max FPS |
|---|---|---|---|---|---|---|---|---|---|---|---|
| dlss-balanced-1440p-high-rt-off | dlss-balanced | 2560x1440 | high | off | off | RTX 3080 | 10 GB | 525.84.01 | 45 | 78 | 112 |
9. Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Script aborts with “CP2077_BENCHMARK_CONFIG file not found” | SYSTEM_CONFIG_OVERRIDE_FILE variable points to a non‑existent file. |
Remove the variable or create the file. |
| No results appear after the run | BENCHMARK_RESULTS_SOURCE_DIR points to a wrong location or the game never entered benchmark mode. |
Verify the -benchmark flag is present in the printed launch command; check $CUSTOM_LIBRARY_PATH path. |
| Timeout kills the game too early | BENCHMARK_TIMEOUT_MINUTES too low for the selected resolution. |
Increase the timeout value. |
| Missing “Test Results” section in README | The README file path is wrong. | Ensure GAME_README_FILE points to the correct README (usually README.md in the game’s Steam folder). The analyzer will create the section automatically if it can find the file【2】. |
| FPS numbers look far too low | Wrong Proton version or missing GPU driver. | Use a newer Proton, ensure the proprietary GPU driver is installed, and enable MANGOHUD to see real‑time stats. |
10. Summary
- Configure defaults, Proton, groups, and tests (files
run_cp2077_benchmark.sh,groups.conf.sh,tests.conf.sh). - Export
BENCHMARK_GROUP(or edit the script to pick a hard‑coded group). - Execute
run_cp2077_benchmark.sh– it builds atimeout … env … run … -benchmarkcommand for each test and stores raw logs. - Run
analyze_cp2077_results.sh– a markdown report with a full performance table is generated and linked from the game’s README. - Iterate – add new tests/groups, tweak Proton or in‑game JSON settings, and re‑run to collect comparative data.
With the steps above you can fully automate Cyberpunk 2077 benchmarking on any Linux system, generate reproducible reports, and easily share the results with the community. The code is here in my repository https://github.com/dolpa/dolpa-gaming-on-linux.