원문 보기: https://dawoum.duckdns.org/wiki/Gamemode
GameMode는 리눅스에 대한 데몬/라이브러리 콤보로, 게임에서 호스트 OS 및/또는 게임 프로세스에 일시적으로 적용할 최적화 집합을 요청할 수 있습니다.
GameMode는 주로 Intel 및 AMD CPU powersave 또는 ondemand 거버너 문제에 대한 임시 해결책으로 설계되었지만, 이제 다양한 최적화 기능과 구성을 호스트합니다.
현재 GameMode에는 다음을 포함한 최적화 지원이 포함됩니다:
- CPU governor
- I/O priority
- Process niceness
- Kernel scheduler (SCHED_ISO)
- Screensaver inhibiting
- GPU performance mode (NVIDIA and AMD), GPU overclocking (NVIDIA)
- CPU core pinning or parking
- Custom scripts
Installation
데비안 저장소에서 설치할 수 있습니다:
- sudo apt install gamemode
Configurations
설치 중에 데몬도 같이 설치되지만, 별도로 활성화할 필요는 없습니다. 필요에 따라, 자동으로 동작합니다.
기본 설정 파일을 사용자 디렉토리로 복사해 옵니다:
- cp /usr/share/gamemode/gamemode.ini ~/.config/
내용을 확인해서 새롭게 설정할 수 없습니다.
이제, 테스트를 수행합니다:
- gamemoded -t
주로, cpu governor와 ioprio에서 오류가 발생할 수 있습니다.
Cpu governor는 다음과 같이 바꿀 수 있습니다:
- echo "ondemand" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
반면에 ioprio에 대한 오류는 해결책이 알려져 있지 않아 보입니다.
이제, 게임모드를 이용하기 위해, 게임 실행 전에 gamemoderun을 먼저 적어서 실행할 수 있습니다. 예를 들어, 터미널에서
- gamemoderun bottles-cli run -p 'StarCraft II Offline' -b 'Starcraft2' -- %u
만약 실행용 desktop 파일이 있다면, Exec에서 수정할 수 있습니다.
이때, /usr/games가 전역 $PATH에 기록되지 않으면, 절대 경로를 적어야 합니다:
- Exec=/usr/games/gamemoderun bottles-cli run -p 'StarCraft II Offline' -b 'Starcraft2' -- %u
External Resources
- https://github.com/FeralInteractive/gamemode
- https://wiki.archlinux.org/title/Gamemode
- https://linux-gaming.kwindu.eu/index.php?title=Improving_performance