Skip to content

Commit

Permalink
gamemode-context: Ignore Steam client processes
Browse files Browse the repository at this point in the history
If you want to run your whole Steam client under gamemode to not adjust
each game individually, we certainly should leave the Steam client
processes alone as we don't want them to take resources away from the
game. Otherwise, Steam client processes may run with `SCHED_ISO`.

Closes: FeralInteractive#67
Signed-off-by: Kai Krakow <kai@kaishome.de>
  • Loading branch information
kakra committed Apr 22, 2020
1 parent ddca60d commit ea8d116
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions daemon/gamemode-context.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,19 @@ int game_mode_context_register(GameModeContext *self, pid_t client, pid_t reques
goto error_cleanup;

/* Check for forced exceptions */
char *exe = NULL;
if (strstr(executable, "/wineserver") != NULL) {
/* wineserver from wine-staging has its own means of setting priorities */
LOG_MSG("Client [%s] was rejected (forced to ignore wineserver)\n", executable);
goto error_cleanup;
} else if (((exe = strstr(executable, "/steam")) != NULL) && (strlen(exe) == 6)) {
/* we don't want to touch steam if the whole steam client runs in gamemode */
LOG_MSG("Client [%s] was rejected (forced to ignore steam)\n", executable);
goto error_cleanup;
} else if (strstr(executable, "/steamwebhelper") != NULL) {
/* we don't want to touch steamwebhelper if the whole steam client runs in gamemode */
LOG_MSG("Client [%s] was rejected (forced to ignore steamwebhelper)\n", executable);
goto error_cleanup;
}

/* Check our blacklist and whitelist */
Expand Down

0 comments on commit ea8d116

Please sign in to comment.