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:
Run gamemoded
Run gamemode-simulate-game in a separate terminal
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:
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 withigpu_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:
gamemoded
gamemode-simulate-game
in a separate terminalgamemoded
:Expected behavior GameMode should not attempt to read
energy_uj
if iGPU optimization is disabled.System Info (please complete the following information):
Additional context It looks like these 2 lines contain the only instances of calls to
get_*energy_uj
: