记录一些在 linux 上配置 steam 以及 proton 的 tricks

proton

proton 管理工具:protonplus

  • proton-ge-custom
  • dwproton
  • cachyos-proton

启动选项

仅 Nvidia显卡:

1
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json gamemoderun %command%

设置 cache:

1
__GL_SHADER_DISK_CACHE=1

设置 steam 预编译着色器缓存使用 cpu 核数:

1
2
# ~/.steam/steam/steam_dev.cfg
unShaderBackgroundProcessingThreads <cpu-num>

ESYNC, FSYNC, NTSYNC

1
2
3
NTSYNC=1
WINEFSYNC=1
WINEESYNC=1

其他工具

  • mangohud
  • gamemode

硬件配置

硬盘

硬盘关闭 aspm 省电模式
可以使用命令查看节区大小,最好是 4096 字节,注意Metadata Size 必须为 0, 才能格式化,linux 对不为 0 情况支持不完善。

1
2
3
❯ sudo nvme id-ns -H /dev/nvme0n1 | grep "Relative Performance"
LBA Format 0 : Metadata Size: 0 bytes - Data Size: 512 bytes - Relative Performance: 0x2 Good
LBA Format 1 : Metadata Size: 0 bytes - Data Size: 4096 bytes - Relative Performance: 0x1 Better (in use)

cpu

cpu 关闭 split_lock 惩罚