process-governor icon indicating copy to clipboard operation
process-governor copied to clipboard

Affinity not set for games on Xbox app

Open alefranz opened this issue 6 months ago • 3 comments
trafficstars

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

alefranz avatar May 05 '25 21:05 alefranz

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:

  1. What is the actual affinity of 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 affinity match the one specified in your rule ("0-15")? If the affinity is already set as defined in the rule, Process Governor won't change it and log the event.
  2. Could you please share your complete config.json file? This will help check for conflicts with other rules, especially those using the * selector.

  3. 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, perhaps 30 seconds. 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 processRules list within your config.json. Rules are processed top-down, so more specific rules should come before general ones (like those using *).

SystemXFiles avatar May 06 '25 09:05 SystemXFiles

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)

alefranz avatar May 06 '25 09:05 alefranz

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?

  1. Increase Delay: Try setting the Delay value in your rule to something significantly higher, for example, 30 seconds, or even 60 seconds just for testing.

  2. Set Force to Yes: If increasing the delay doesn't help, or in addition to it, try setting the Force parameter to Y. This tells Process Governor to continuously try to apply the rule. (You can try Force: Y with 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.

SystemXFiles avatar May 06 '25 09:05 SystemXFiles