FeralInteractive / gamemode

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

Gpu device never parsed? #486

Open Ciflire opened 1 month ago

Ciflire commented 1 month ago

Describe the bug gamemoded -t does not look for the device set in settings, it always looks for default value which is 0

To Reproduce Steps used to reproduce the behavior:

  1. configure your gpu device to be different from 0
  2. run gamemoded -t
  3. get the following error ERROR: Couldn't open vendor file at /sys/class/drm/card0/device/vendor, will not apply gpu optimisations!
  4. See that it's looking for card0 even if gpu device is not 0

Expected behavior I do not expect it to pass all the tests but at least not for it to look for card 0 when specified 1

System Info (please complete the following information):

Additional context this is my config, generated by nix in /etc/gamemode.ini, it is found by process

[custom]
end=/nix/store/qjc7b5l019p260qv9r7w39hsap656jbl-libnotify-0.8.3/bin/notify-send 'GameMode ended'
start=/nix/store/qjc7b5l019p260qv9r7w39hsap656jbl-libnotify-0.8.3/bin/notify-send 'GameMode started'

[general]
disable_splitlock=0
igpu_desiredgov=performance
inhibit_screensaver=0
renice=10

[gpu]
apply_gpu_optimisations=accept-responsibility
gpu_device=1
nv_powermizer_mode=2

i do belive but could be wrong that you never parse this part of the config and keep it to default i belive the device should be set here https://github.com/FeralInteractive/gamemode/blob/master/daemon/gamemode-gpu.c#L74-L75 but this symbol leads to a reference in https://github.com/FeralInteractive/gamemode/blob/master/daemon/gamemode-config.h#L116-L117 but i think is never implemented

MrSn0wy commented 1 month ago

i had the same issue. A thing i noticed is that when it is set to 2 it does use card2, i guess for some reason it just doesn't like card1 lmao.

OS: Nixos 24.05 GameMode Version 1.8.1