LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Games (http://www.linuxquestions.org/questions/linux-games-33/)
-   -   problems with cpu affinity, wine and Mass Effect 2 (http://www.linuxquestions.org/questions/linux-games-33/problems-with-cpu-affinity-wine-and-mass-effect-2-a-819987/)

gimli01 07-15-2010 10:19 AM

problems with cpu affinity, wine and Mass Effect 2
 
Hello,
I'm running Ubuntu Lucid 64 bit, with wine 1.2-rc6 and all relevant video drivers and such, in addition to linux-kernel 2.6.32-24 preempt and an nvidia gtx 260.

I've looked all over the web, and tried most of the cpu affinity tools out there, from schedtools to taskset and to cpulimit, which I compiled myself.

The problem I'm having is with running a game via wine, Mass Effect 2. I compiled wine to support it, and under an older realtime kernel (2.6.31-11-rt?) it ran perfectly, albeit slow). I now am using a preemptive kernel, and the game crashes after loading a savegame.

I can get around that, if I'm launching the program directly. Using taskset, I can change the affinity of the ME2 process to use one cpu core only. However, this does not seem to work when running the game from steam, and no effort I have made to apply a cpu affinity at game launch or steam launch has had the slightest effect.

My question is: is there a way to make wine apply a cpu affinity to every process run with it, for as long as i say so? If so, how?

Or can I somehow set up my system to have every wine process automatically confined to a single cpu core?

Thanks for your help.

zaks_974 07-16-2010 06:39 AM

Why do you want to restrict wine to run on a single core if you have more. Linux if configured for smp (in the kernel) will take care of balancing all CPU's and the user need NOT worry about it. If you have a specific reason of running wine on a single cpu, let us know

gimli01 07-17-2010 02:49 AM

Quote:

Originally Posted by zaks_974 (Post 4035177)
Why do you want to restrict wine to run on a single core if you have more. Linux if configured for smp (in the kernel) will take care of balancing all CPU's and the user need NOT worry about it. If you have a specific reason of running wine on a single cpu, let us know

Well, it's pretty simple really. If I don't confine the game to a single core, it crashes. It's a bit misbehaved under many dual core cpus, and has documented bugs relating to them. The usual fix is to set Mass Effect 2's cpu affinity to one cpu core, which works for the most part. I was just looking for ways to set a permanent policy without having to set it manually.

In any case, it's not an issue anymore, wine has a built in task manager that allows someone to set affinity for a wine process. It can be used by running wine taskmgr. Still in early stages, I think.


All times are GMT -5. The time now is 11:12 PM.