process-governor
process-governor copied to clipboard
Affinity not set for games on Xbox app
Describe the bug
When launching a game installed via the Xbox app the settings are not applied to the process and nothing appear in the logs when the game is launched regarding the main game process.
However, if the rule is deleted and recreated once the game is running, the rule is correctly applied.
It is as if the app didn't notice that process started.
Steps to reproduce
Add a rule either by path or process name for Xbox games, e.g.
{
"selectorBy": "Path",
"selector": "C:\\XboxGames\\**\\*.exe",
"affinity": "0-15",
"force": "N",
"delay": "2"
}
or
{
"selectorBy": "Name",
"selector": "OblivionRemastered-WinGDK-Shipping.exe",
"affinity": "0-15",
"force": "N",
"delay": "2"
}
And Launch Oblivion Remastered.
Expected behavior
The games should get the affinity applied and it should appear in the logs.
Actual Behaviour
2025-05-05 22:02:35,511 - proc-gov - INFO - Set affinity `0-15` for gamelaunchhelper.exe (15765).
but OblivionRemastered-WinGDK-Shipping.exe doesn't get the affinity applied and doesn't appear in the logs.
Environment
- Windows Version: 11 24H2
Hi @alefranz !
Thanks for reporting the issue.
Regarding the affinity for games from the Xbox App. To understand what's wrong, could you please clarify:
-
What is the actual
affinityof the game process (e.g.,OblivionRemastered-WinGDK-Shipping.exe) right after it starts?- To check: Task Manager -> Details -> Right-click on the process -> Set affinity.
- Important: Does this actual
affinitymatch the one specified in your rule ("0-15")? If theaffinityis already set as defined in the rule, Process Governor won't change it and log the event.
-
Could you please share your complete
config.jsonfile? This will help check for conflicts with other rules, especially those using the*selector. -
Are you using any other programs to manage process
affinity(like Process Lasso, etc.)?
In the meantime, here are a couple of things you could try as potential workarounds:
- Increase Delay: Try increasing the
"delay"value in your rule to something higher, perhaps30seconds. This gives the game more time to initialize before the rule is applied. - Rule Order: Ensure your specific game rule is placed higher up in the
processRuleslist within yourconfig.json. Rules are processed top-down, so more specific rules should come before general ones (like those using*).
Hello!
I did try to remove all the rules, with only one of the above in the file. The process is started with the default affinity all CPUs) which make sense given nothing is in the logs about setting affinity.
As mentioned, the weird thing is that if the rule is present when the game starts, nothing happens. But if I later delete, save, then recreate the rule, it gets applied.
It is as if this tool is unable to see the process starting.
I've quickly put together some code to monitor for new processes last night (not in python) and I can see the game process, so I don't think it's a permission problem (wanted to double check as I know Store apps have some oddities on permissions)
Okay, thanks for the update, @alefranz!
As a next step, could you please try a couple of things with your rule, preferably using the Process Governor settings UI?
-
Increase Delay: Try setting the
Delayvalue in your rule to something significantly higher, for example,30seconds, or even60seconds just for testing. -
Set Force to Yes: If increasing the delay doesn't help, or in addition to it, try setting the
Forceparameter toY. This tells Process Governor to continuously try to apply the rule. (You can tryForce: Ywith or without an increased delay).
These settings might help Process Governor "catch" and configure the process correctly, even if there's an unusual startup behavior.
If neither approach works, I'll need to investigate the problem further.