<div dir="ltr"><div><div>Hi Scott,<br><br></div>On Linux power management decisions are made by cpufreq governors. Most distributions I have used recently use the 'ondemand' scheduler, which makes decisions as you would guess based on cpu load. This scheduler has various parameters you can tweak in '/sys/devices/system/cpu/cpufreq/ondemand'. Its 'up_threshold' parameter is typically set to 95, which means when the load on a CPU reaches 95% it is time to increase the clock frequency to a higher level. Often this value is too high to trigger a high clock frequency. Just for fun adjust it to let's say 25 and see it change behaviour.<br>
<br></div><div>Figuring out the 'right' power settings is a very hard problem, because there are different use cases of which battery life vs performance is probably the most important one.<br><br></div><div>There is not much which can be done at the application level. If you were to tune cpufreq settings from Wine this would interfere with other apps.<br>
<br></div><div>Maybe some settings like up_treshold should be tuned at the distribution level, but finding the right balance is a problem and every user has different preferences.<br><br></div><div>Thanks,<br>Roderick<br>
</div><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 13, 2013 at 2:14 PM, Scott Ritchie <span dir="ltr"><<a href="mailto:scottritchie@ubuntu.com" target="_blank">scottritchie@ubuntu.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Over the past couple years I've been able to try out Wine games on many<br>
different environments -- laptops, desktops, even cloud servers.<br>
<br>
On many occasions, I've discovered that a game appears to run<br>
functionally but slowly, however upon further investigation I find that<br>
forcing the CPU to run at 100% "performance" mode can make the game<br>
playable.<br>
<br>
There are a few tools to do this (eg cpufreq-indicator for desktop<br>
users), however the long and short of it is that, for many users, I<br>
suspect they just assume Wine is slow and give up on that particular game.<br>
<br>
<br>
1) Since Wine is truly CPU-bound here, why isn't it provoking the<br>
autoscaling to actually speed up the processor? �I've seen this happen<br>
on systems running with AC power and 100% battery life.<br>
<br>
2) Is this a kernel issue? �A distribution power management<br>
configuration issue? �Or is there something we can do in Wine itself to<br>
be less courteous?<br>
<br>
<br>
Mostly I've seen this on Ubuntu, however I'm sure it's affecting other<br>
distributions that have any sort of power managment whatsoever as it can<br>
be quite tricky to get this right.<br>
<br>
<br>
Thanks,<br>
Scott Ritchie<br>
<br>
<br>
</blockquote></div><br></div>