WineHQ
Bug Tracking Database – Bug 13486

 Bugzilla

 

Last modified: 2014-02-07 13:05:41 UTC  

Having CPU switch frequency dynamically (powersave daemon), Prince of Persia (potentially more apps?) runs way too fast

Bug 13486 - Having CPU switch frequency dynamically (powersave daemon), Prince of Persia (potentially more apps?) runs way too fast
Having CPU switch frequency dynamically (powersave daemon), Prince of Persia ...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: -unknown
1.0-rc3
x86-64 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
:
: 16327 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-05-27 13:53 UTC by Nico Kruber
Modified: 2014-02-07 13:05 UTC (History)
7 users (show)

See Also:
Regression SHA1:
Fixed by SHA1:
Distribution: ---
Staged patchset:


Attachments
Log running the game (10.87 KB, text/plain)
2008-06-03 11:56 UTC, Nico Kruber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Kruber 2008-05-27 13:53:36 UTC
I normally let my CPU change frequencies dynamically as required by the current load. Starting Prince of Persia The Sands of Time, this game runs too fast. When I change CPU frequency policy in powersaved to performance, everything runs fine.
Comment 1 Vitaliy Margolen 2008-05-27 21:42:14 UTC
Have you tried that on windows using same hardware?
Comment 2 Nico Kruber 2008-05-28 04:09:17 UTC
I forgot to mention that it's "Prince of Persia - The Sands of Time".

Yes, I run this game successfully on Windows Vista x64. My linux distribution is openSUSE x86_64 (if this is important).
Comment 3 Nico Kruber 2008-05-28 04:10:46 UTC
(In reply to comment #2)
> I forgot to mention that it's "Prince of Persia - The Sands of Time".

ok, I did mention it in the text :P
Comment 4 Lei Zhang 2008-05-28 16:58:06 UTC
On Windows, is your cpu also running at a lower frequency?
Comment 5 Nico Kruber 2008-06-01 05:47:45 UTC
(In reply to comment #4)
> On Windows, is your cpu also running at a lower frequency?

yes, power saving is active and adjusting core speed continuously (between 1000 and 2400 MHz)
Comment 6 Nico Kruber 2008-06-03 11:56:14 UTC
Created attachment 13634 [details]
Log running the game

attached is the log I took when I ran the game starting with "Powersave" CPU frequency policy and switching to "Performance" once a new game was started.
(Leaving to dynamic sometimes shows correct timings - this is a save way to reproduce it, although I have not tested a similar behaviour on Windows)

I'm guessing it depends on the difference of frequency when the game (application) started and the in-game cpu frequency.
Comment 7 Nico Kruber 2008-06-04 02:46:12 UTC
maybe I should also mention, that the only thing running at normal speed when this happens is the game's music and sound effects
Comment 8 Austin English 2008-12-02 07:00:53 UTC
Please retest in 1.1.9.
Comment 9 Nico Kruber 2008-12-08 17:54:45 UTC
retested with wine 1.1.10 - bug is still present :(

I'd like to add some more comments about the details of this bug though:

- game started with CPU@Powersave
  -> game runs at normal speed
- game started with CPU@Powersave, changed to "Performance" in the game
  -> game runs too quickly

- game started with CPU@Performance
  -> game runs at normal speed
- game started with CPU@Performance, changed to "Powersave" in the game
  -> game runs too slowly

- game started with CPU@Dynamic
  -> game runs too quickly
Comment 10 Lei Zhang 2008-12-08 18:20:06 UTC
Please don't change the original reported version.
Comment 11 M.Kiesel 2008-12-26 16:50:45 UTC
On the net you will find reports of similar issues for Sands of Time on Windows. Seems that the game has problems with c'n'q and/or multi core machines. However, I wasn't able to reproduce the same error in Windows. Perhaps recent Windows c'n'q drivers come with workarounds for this.
Comment 12 Florian 2009-02-14 07:36:23 UTC
I just started playing The Sand of Time with wine-1.1.14 and did not discover that problem so far.
I use an AMD Athlon 64 X2 4200+ and the governor is set to "ondemand" and the game runs pretty fine.
Comment 13 Florian 2009-02-15 04:49:25 UTC
(In reply to comment #12)
> I just started playing The Sand of Time with wine-1.1.14 and did not discover
> that problem so far.
> I use an AMD Athlon 64 X2 4200+ and the governor is set to "ondemand" and the
> game runs pretty fine.
> 

Forget that. I played the game again today and discovered the same behaviour as stated in comment #9
Comment 14 jyaan 2009-08-14 05:59:21 UTC
I can confirm. When the ondemand daemon is running, the game runs far too fast. Stopping the daemon with 'sudo /etc/init.d/ondemand stop' before running the game allows it to run at the correct speed (and making the game playable).
Comment 15 Béla Gyebrószki 2010-01-31 05:38:03 UTC
Another game which is affected is Beyond Good & Evil. Audio and video are out-of-sync when cpu frequency scaling is enabled.
Comment 16 Ozan Türkyılmaz 2010-06-22 06:16:04 UTC
i had same problem at windows xp pro 64 bit with AMD Authon 64 X2 Dual Core 4400+ 2.3 GHz. at that time i checked gaming forms and i found this solution: make the game use only one core. it's probably programmers didn't really think of multi core systems.
Comment 17 Matthias 2010-07-05 04:32:47 UTC
Same Problem like comment #9 im DeusEx 1
(wine 1.2 rc 6)

Maybe it´s not an wine Bug. 
There is a workaround in the DeusEx howto. 
I hope in some day there is an switch to disable the dynamic clock speed while playing.
Comment 18 Nico Kruber 2010-07-07 17:18:40 UTC
(In reply to comment #17)
> Same Problem like comment #9 im DeusEx 1
> (wine 1.2 rc 6)
> 
> Maybe it´s not an wine Bug. 

then why does it work on Windows (same machine?) - although cnq driver workaround mentioned in Comment #11 seem reasonable...

> There is a workaround in the DeusEx howto. 
> I hope in some day there is an switch to disable the dynamic clock speed while
> playing.

this might not be the desired behaviour - imagine old games not using all the power modern machines got - they don't need to waste energy then...

I'll however test with the newest wine version soon - also with the program attached to a single CPU core...
Comment 19 Austin English 2010-12-23 17:50:30 UTC
*** Bug 16327 has been marked as a duplicate of this bug. ***
Comment 20 Ronny Schmatzler 2011-04-10 21:29:38 UTC
I don't think that this is a wine bug - its a fault of the Prince of Persia engine. Beyond Good and Evil also uses this engine and has the same problems on Windows (XP or 7, doesn't make much difference).
Comment 21 butraxz 2013-10-18 13:20:51 UTC
This ticket has not been updated for over 900 days. Development recommends
to check the status on your bug every release or two and let to be known if the bug is still present. If not, mark it fixed. If you are no longer able to put effort to this ticket, you can abandon it.

Is this still an issue with 1.7.4 or higher ?
Comment 22 Ronny Schmatzler 2014-01-26 06:49:09 UTC
Tested Beyond Good and Evil on Wine 1.7.11 - audio and video are always in sync, even when the CPU is throttled.

I tested it with running my CPU throttled:

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

and afterwards with the full power:

echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor


(I noticed that the game is not playing some of the menu sounds when the CPU is throttled, but there is another bug for this already opened. This bug can be closed)
Comment 23 Jerome Leclanche 2014-01-26 15:50:51 UTC
Reported fixed.
Comment 24 Alexandre Julliard 2014-02-07 13:05:41 UTC
Closing bugs fixed in 1.7.12.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers