Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are some old games who don't like the multicore processors in today's computers. I am wondering if there is a way to set the CPU affinity for them to '1' under Wine or CrossOver? i.e. In a native Windows environment you would right click on the game's process in the Task Manager then set the affinity there.

I've came across a program called RunFirst.exe, but can't figure out a way to run it, then the game in one command.

Suggestions are appreciated. Thanks!

share|improve this question
up vote 0 down vote accepted

Run the taskmgr.exe that comes with Wine, it allows you to set the affinity just like in Windows :).

I don't know how to set it permanently or automate setting it, though.

Possibly the same API that Windows uses for this task is present in Wine, which means that a Windows tool could be used for that task.


I found a tool that does exactly that:

Process -a name_of_exe 1 sets the affinity mask to processor 0.

Process -a name_of_exe 11 sets the affinity mask to processor 0 and 1.

... and so on.

See also:

share|improve this answer

I think it's possible with the taskset command. Run wine like this:

taskset -c 0 wine program_name.exe

to get rid of debug-messages:

WINEDEBUG=-all taskset -c 0 wine program_name.exe

The "-c 0" part will set cpu affinity for core 1, "-c 1" would set it for core 2, etc. See "man taskset" for some more info.

share|improve this answer
Thanks for the tip, just tried it, but Mac OS X doesn't seem to come with taskset. Any other ideas? – hpy Mar 29 '10 at 5:28

Setting processor affinity on OS X is not supported. There is no such system call that wine could make to achieve this functionality. The related bug for this at WineHQ is appropriately closed as a WONTFIX (Bug 30480 - Setting CPU affinity doesn't work on Macs).

See also this related SU question: "How to set processor affinity on OS X?".

So while Jens' answer is a valiant effort, Wine will silently (or not so silently, depending on WINEDEBUG) discard those API calls to set affinity on a Mac.

The workaround commonly cited is to use one of Xcode's developer tools (like Instruments) to limit the total number of active cores available to the entire system. Not pretty, but it works. Preferences: General Pane

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .