http://bugs.winehq.org/show_bug.cgi?id=21994
Summary: Dual-core not being correctly supported in GTA IV Product: Wine Version: 1.1.40 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: lukasz.wojnilowicz@gmail.com
Created an attachment (id=26717) --> (http://bugs.winehq.org/attachment.cgi?id=26717) Usage of cores
The problem is that multi-threading game such as GTA IV uses only one core on dual core system. I uploaded cores usage during the play to show the problem. The game should use all cores that are in system.
Typing taskset -p PID_OF_GTA4 in terminal when GTA 4 runs shows:
pid PID_OF_GTA4 current affinity mask: 1
Changing affinity mask to 2 doesn't change usage of second core.
Additional information: CPU: Intel Core 2 Duo OS: Fedora 12 32 bit Wine: 1.1.40+TEXP70 from bug #16328 GTA4: English version patched to 1.0.5.0
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #1 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-09 12:35:35 --- Created an attachment (id=26718) --> (http://bugs.winehq.org/attachment.cgi?id=26718) Terminal output on Wine 1.1.40
Terminal output after running LaunchGTAIV.exe. It's log from the start of LaunchGTAIV.exe to the moment where the main menu loads.
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #2 from Austin English austinenglish@gmail.com 2010-03-09 12:39:46 --- I assume you've tested this and confirmed it to work on Windows?
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #3 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-09 13:18:29 --- (In reply to comment #2)
I assume you've tested this and confirmed it to work on Windows?
I thought that I could assume that such hardware demanding game allows to use more than one core. I couldn't even think that it could be otherwise.
Although I haven't tested this myself on MS Windows but you can take comment #123 from bug #16328 as a proof.
http://bugs.winehq.org/show_bug.cgi?id=21994
Ruslan b7.10110111@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |b7.10110111@gmail.com
--- Comment #4 from Ruslan b7.10110111@gmail.com 2010-03-09 13:20:50 ---
Changing affinity mask to 2 doesn't change usage of second core.
What do you mean "doesn't change usage"? Does it switch usage to second core from first? To enable *both* cores you should use mask 3 (binary 0011), not 2 (binary 0010).
Anyway, when i set affinity mask to 3, total CPU usage is about 70%, i.e. second core(HT thread in my case) is not fully utilized. BUT, CPU usage almost never reaches 100% on Windows too (on the same machine). It's instead about 90%.
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #5 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-09 15:03:06 --- (In reply to comment #4)
Changing affinity mask to 2 doesn't change usage of second core.
What do you mean "doesn't change usage"? Does it switch usage to second core from first?
It doesn't switch usage from first to second core. I meant that the image from the first attachment looks the same for both values of affinity mask.
To enable *both* cores you should use mask 3 (binary 0011), not 2 (binary 0010).
Setting affinity mask to 3 doesn't change anything. It seems like affinity mask hasn't any influence on the usage of cores.
Anyway, when i set affinity mask to 3, total CPU usage is about 70%, i.e. second core(HT thread in my case) is not fully utilized. BUT, CPU usage almost never reaches 100% on Windows too (on the same machine). It's instead about 90%.
As you can see the usage for the first core is 100% and for the second is 20-30% so it seems like the second core doesn't work.
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #6 from Jeff Zaroyko jeffz@jeffz.name 2010-03-09 15:21:58 --- (In reply to comment #5)
(In reply to comment #4) As you can see the usage for the first core is 100% and for the second is 20-30% so it seems like the second core doesn't work.
20-30% is some load, rather than none which looks reasonable, but have you verified that the 100% isn't just the game on one core and then maybe Xorg on another, or wineserver, or some other process?
The picture doesn't illustrate which processes are using which percentage of cpu.
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #7 from Ruslan b7.10110111@gmail.com 2010-03-09 15:37:45 --- (In reply to comment #5)
It doesn't switch usage from first to second core. I meant that the image from the first attachment looks the same for both values of affinity mask.
You're right. I tried to set affinity mask of 2 and the game is executed on BOTH cores (cpu usage by LaunchGTAIV.exe is 63%). Mask of 1 makes it execute on one core (cpu usage 51%), and 3 seems to be the same as 2... Seems here's something wrong with kernel affinity setup, but windows' calc.exe under wine is correctly placed to the core specified, so the problem may also be with wine. But affinity isn't controlled from inside wine, except of initial setting!
As you can see the usage for the first core is 100% and for the second is 20-30% so it seems like the second core doesn't work.
The second core actually does work, but in some strange incomplete way...
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #8 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-09 16:06:22 --- Created an attachment (id=26724) --> (http://bugs.winehq.org/attachment.cgi?id=26724) What does take CPU
(In reply to comment #6)
20-30% is some load, rather than none which looks reasonable, but have you verified that the 100% isn't just the game on one core and then maybe Xorg on another, or wineserver, or some other process?
You may have right. Xorg+wineserver ~= 18 MB. I'm attaching terminal output after typing ps -aux
http://bugs.winehq.org/show_bug.cgi?id=21994
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #9 from Dmitry Timoshkov dmitry@codeweavers.com 2010-03-09 23:32:14 --- (In reply to comment #3)
(In reply to comment #2)
I assume you've tested this and confirmed it to work on Windows?
I thought that I could assume that such hardware demanding game allows to use more than one core. I couldn't even think that it could be otherwise.
You need to verify that on your own *before* filing a bug. Feel free to reopen once have a confirmation.
http://bugs.winehq.org/show_bug.cgi?id=21994
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED Severity|normal |minor
--- Comment #10 from Dmitry Timoshkov dmitry@codeweavers.com 2010-03-09 23:32:30 --- Closing.>
Although I haven't tested this myself on MS Windows but you can take comment #123 from bug #16328 as a proof.
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #11 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-11 04:41:57 --- Created an attachment (id=26744) --> (http://bugs.winehq.org/attachment.cgi?id=26744) Usage of cores on MS Windows XP
As you can see in the attachment, GTA 4 uses both cores equally on MS Windows XP. On Linux GTA4 uses only one core the second core is used by xorg+wineserver+...
The expected behaviour: GTA 4 should use both cores on Linux
http://bugs.winehq.org/show_bug.cgi?id=21994
NSLW lukasz.wojnilowicz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #12 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-11 04:42:27 --- Reopening bug, see above comment.
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #13 from Dmitry Timoshkov dmitry@codeweavers.com 2010-03-11 06:00:39 --- The picture means and explains nothing, there may be other processes running that use the CPUs.
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #14 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-11 06:12:16 --- (In reply to comment #13)
The picture means and explains nothing, there may be other processes running that use the CPUs.
When I click RMB on LaunchGTAIV.exe in process manager and choose option where I can see which processors are assigned to the task then I see CPU0 and CPU1. How can I prove it more?
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #15 from Ruslan b7.10110111@gmail.com 2010-03-11 07:26:21 --- 51% on the screenshot :) This means that the game is being transferred from one CPU to another one while being executed. Thus, this screenshot doesn't prove anything.
Though, it's still strange that if affinity mask is 2, the game is still executed on 1st CPU instead of 2nd (and a little bit of 2nd) on WINE.
http://bugs.winehq.org/show_bug.cgi?id=21994
NSLW lukasz.wojnilowicz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #26744|0 |1 is obsolete| |
--- Comment #16 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-11 08:42:30 --- Created an attachment (id=26748) --> (http://bugs.winehq.org/attachment.cgi?id=26748) Usage of cores on MS Windows XP in the background of the game
(In reply to comment #15)
51% on the screenshot :) This means that the game is being transferred from one CPU to another one while being executed. Thus, this screenshot doesn't prove anything.
51% because I ALT+tab the game when it was in main menu but look at the flow of the usage of processor. It's higher when I play the game. I'm attaching new image to be more credible.
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #17 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-11 08:43:57 --- Created an attachment (id=26749) --> (http://bugs.winehq.org/attachment.cgi?id=26749) Processes that take CPU on MS Windows XP
(In reply to comment #13)
The picture means and explains nothing, there may be other processes running that use the CPUs.
You can see in this image what processes are running.
http://bugs.winehq.org/show_bug.cgi?id=21994
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #18 from Vitaliy Margolen vitaliy@kievinfo.com 2010-03-11 09:01:23 --- Enough duplicates.
*** This bug has been marked as a duplicate of bug 11674 ***
http://bugs.winehq.org/show_bug.cgi?id=21994
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #19 from Vitaliy Margolen vitaliy@kievinfo.com 2010-03-11 09:01:33 --- Closing
http://bugs.winehq.org/show_bug.cgi?id=21994
--- Comment #20 from NSLW lukasz.wojnilowicz@gmail.com 2010-03-11 10:02:53 --- I don't think it's duplicate. Please see comment #4 from bug #11674. Here the usage of one core isn't inversely proportional to the usage of the other. Here one core is used to the maximum and the second stays idle at all time.