FeralInteractive / gamemode

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

gamemode.ini isn't read from $PWD #388

Open hashworks opened 1 year ago

hashworks commented 1 year ago

Describe the bug A gamemode.ini configuration isn't read from the current PWD. The same file works in ~/.config/gamemode.ini:

[custom]
start=echo start > /tmp/gm_test

To Reproduce Steps used to reproduce the behavior:

  1. Create the above file in ~/.config/gamemode.ini
  2. Launch gamemoderun with anything
  3. As expected: /tmp/gm_test contains start
  4. rm /tmp/gm_test
  5. mv ~/.config/gamemode.ini ./
  6. Launch gamemoderun with anything
  7. Unexpected: /tmp/gm_test doesn't exist

Expected behavior $PWD/gamemode.ini should be read and merged with any other configurations.

System Info (please complete the following information):

hashworks commented 1 year ago

I see that there are many LOG_foo calls in the code. How do I enable them to debug this?

myghi63 commented 1 year ago

I also noticed that gamemode is ignoring /usr/share/gamemode/gamemode.ini and /etc/gamemode.ini here, only respects my configs if I put the file at .config/gamemode.ini