FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.68k stars 184 forks source link

Gamemode does not change Nvidia performance mode #209

Open JulianGro opened 4 years ago

JulianGro commented 4 years ago

Describe the bug Gamemode does not change Nvidia performance mode

To Reproduce Steps used to reproduce the behavior:

  1. Launch gamemode with 'gamemoderun java -jar FTBLauncher.jar'
  2. Look at the PowerMizer tab in NVIDIA X Server Settings
  3. See "Current Mode" still being "Adaptive"

Expected behavior Gamemode should set it to "Prefer Maximum Performance"

System Info (please complete the following information):

Additional context "Performance Level" is also not set to the highest in the NVIDIA X Server Settings. Coolbits was set with "sudo nvidia-xconfig --cool-bits=8" and system was restarted. Editable Performance Levels shows in the PowerMIzer. syslog.log gamemode.ini.txt

fsyy commented 4 years ago

Hi, same here, i worked around it by adding a script to start=notify-send "GameMode started" and end=notify-send "GameMode ended".

For starting gamemode i called the script start_gamemode.sh (chmod +x) and it contains:

!/bin/bash

/usr/bin/nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'

for the end section i got stop_gamemode.sh:

!/bin/bash

/usr/bin/nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=0'

looks like this in the gamemode.ini:

[custom] ; Custom scripts (executed using the shell) when gamemode starts and ends start=notify-send "GameMode started" ; /home/me/bin/stop_ethmining.sh /home/fsyy/Desktop/start_gamemode.sh

end=notify-send "GameMode ended" ; /home/me/bin/start_ethmining.sh /home/fsyy/Desktop/stop_gamemode.sh

amithiel commented 3 years ago

Hi, same here, i worked around it by adding a script to start=notify-send "GameMode started" and end=notify-send "GameMode ended".

For starting gamemode i called the script start_gamemode.sh (chmod +x) and it contains:

!/bin/bash

/usr/bin/nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'

for the end section i got stop_gamemode.sh:

!/bin/bash

/usr/bin/nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=0'

looks like this in the gamemode.ini:

[custom] ; Custom scripts (executed using the shell) when gamemode starts and ends start=notify-send "GameMode started" ; /home/me/bin/stop_ethmining.sh /home/fsyy/Desktop/start_gamemode.sh

end=notify-send "GameMode ended" ; /home/me/bin/start_ethmining.sh /home/fsyy/Desktop/stop_gamemode.sh

Thanks so much for this script! I was just having this issue on Manjaro, and this serves as a very nice workaround! cheers!

Tatsh commented 3 years ago

I did the same thing but I feel like this should not be necessary.

Sturmlocke86 commented 2 years ago

Hello there, since this issue is still open, I just wanted to take the time to add my vote in this regard.

These are my system specs:

Optiplex 3040 SFF:

And I am seeing the exact same behaviour as mentioned by Julian and the others. I use Gamemode on my workstation for a game called "Everquest 2". Gamemode is running after starting the game, verified via the terminal. Any update on this? Is the workaround seen further above really necessary or can someone integrate the above into Gamemode for ease of use? Would love a more user-friendly and "working out-of-the-box" approach to this, if possible. Wouldn't mind donating a few bucks for a fix.