gamemode icon indicating copy to clipboard operation
gamemode copied to clipboard

energy_uj errors in log even when iGPU optimization disabled

Open kroq-gar78 opened this issue 2 years ago • 1 comments

Describe the bug Per #337, gamemoded produces errors when reading /sys/class/powercap/intel-rapl*/*/energy_uj because it is usually run as an unprivileged user. Disabling iGPU optimization with igpu_power_threshold=-1 does not get rid of this error. Even though it is a non-fatal error, this log message can mislead users when debugging possible GameMode issues.

To Reproduce Steps used to reproduce the behavior:

  1. Run gamemoded
  2. Run gamemode-simulate-game in a separate terminal
  3. Output of gamemoded:
Entering Game Mode...
governor was initially set to [performance]
Requesting update of governor policy to performance
ERROR: Configured iGPU power threshold value '-1.000000' is invalid, ignoring iGPU default governor.
ERROR: Failed to open file for read /sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:0/energy_uj

Expected behavior GameMode should not attempt to read energy_uj if iGPU optimization is disabled.

System Info (please complete the following information):

  • OS and version: Manjaro Linux, kernel 5.17.13
  • GameMode Version: v1.6.1

Additional context It looks like these 2 lines contain the only instances of calls to get_*energy_uj:

  • https://github.com/FeralInteractive/gamemode/blob/126e67fb6b60051c2a9095856c120aab9e2ccb17/daemon/gamemode-context.c#L262
  • https://github.com/FeralInteractive/gamemode/blob/126e67fb6b60051c2a9095856c120aab9e2ccb17/daemon/gamemode-context.c#L288

kroq-gar78 avatar Jun 08 '22 09:06 kroq-gar78

Configured iGPU power threshold value '-1.000000' is invalid, ignoring iGPU default governor.

This doesn't seem right.

eternal-sorrow avatar Aug 24 '23 14:08 eternal-sorrow