You are not logged in.

#1 2016-12-19 18:45:05

Kierek
Member
From: Poland
Registered: 2013-02-20
Posts: 16

CPU Governor and RetroArch

I experience some annoying problem with my supposedly powerful cpu(i5-6500). I mainly use RetroArch for my gaming needs and so far it's been a great experience. Bsnes Accuracy, mGBA, fbAlpha, Mednafen Saturn, all daily compiled from git and all working great.

The problem I have is with Mednafen PSX core, the one I want to use the most. It seems to use the cpu in some grey area of frequencies, not high enough to switch to the "performance area", but high enough that it's, well, not enough. With all the aforementioned cores the cpu is either enough at 800hz to play it all stable at 60fps, or, as in the case of Saturn core, used almost entirely at 3.6GHz and also playing at stable 60fps.

The PSX one varies between 58 and 59. It may not sound so bad, but because of that I get annoying audio cracking, it's completely unplayable for me. The first solution I've accidentaly found was to stress one of the cores. After some tinkering it seemed more plausible to just change cpu governor from powersave to performance, but it's not really convenient. Is there any solution that would change automatically governor for me, when I run and stop retroarch, or is it just some bug that I should report somewhere?

Or maybe I should just permanently set governor to performance? How much would it affect power usage, when my PC is mostly idling(web browsing, music, movies)?

Offline

#2 2016-12-20 10:52:33

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: CPU Governor and RetroArch

wtf is RetroArch.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#3 2016-12-20 13:00:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,738

Re: CPU Governor and RetroArch

@Moo-Crumpus http://lmgtfy.com/?q=retroarch

@Kierek Yeah accurate emulators that stress the CPU have that tendency, because they aren't a constant heavy workload and switch from doing something intensive to nothing too quick for the governor to cope, same can be seen with higan (or retroarch's bsnes core). I don't really have any hard numbers on power consumption, but I'd guess  it doesn't have that much of an impact, because the CPU doesn't go a constant full throttle, but rather does make sure to have the full power available immediately, if a suitable workload shows up. FWIW I have the same reasoning and have just chosen to switch the governor to performance globally. I probably wouldn't do it on a notebook on battery, but I don't feel like it is necessary on a desktop.

Offline

#4 2016-12-20 15:07:40

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: CPU Governor and RetroArch

With an i5 you are probably using intel_pstate, you could either temporarily change the governor to performance or you might want to try setting a minimum frequency by tweaking '/sys/devices/system/cpu/cpufreq/policy?/scaling_min_freq', it will be easier if you use cpupower to do it.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2016-12-20 18:46:51

Kierek
Member
From: Poland
Registered: 2013-02-20
Posts: 16

Re: CPU Governor and RetroArch

V1del wrote:

@Moo-Crumpus http://lmgtfy.com/?q=retroarch

@Kierek Yeah accurate emulators that stress the CPU have that tendency, because they aren't a constant heavy workload and switch from doing something intensive to nothing too quick for the governor to cope, same can be seen with higan (or retroarch's bsnes core). I don't really have any hard numbers on power consumption, but I'd guess  it doesn't have that much of an impact, because the CPU doesn't go a constant full throttle, but rather does make sure to have the full power available immediately, if a suitable workload shows up. FWIW I have the same reasoning and have just chosen to switch the governor to performance globally. I probably wouldn't do it on a notebook on battery, but I don't feel like it is necessary on a desktop.

I've changed to performance for now, I hope that I won't get bankrupt any time soon.

R00KIE wrote:

With an i5 you are probably using intel_pstate, you could either temporarily change the governor to performance or you might want to try setting a minimum frequency by tweaking '/sys/devices/system/cpu/cpufreq/policy?/scaling_min_freq', it will be easier if you use cpupower to do it.

The best solution would be to set some kind of listener that would change governor to performance when it detects retroarch process starting and changing back to powersave when the process is killed. Is there some kind of mechanism that would allow it?

Offline

#6 2016-12-20 19:39:40

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: CPU Governor and RetroArch

Kierek wrote:

The best solution would be to set some kind of listener that would change governor to performance when it detects retroarch process starting and changing back to powersave when the process is killed. Is there some kind of mechanism that would allow it?

Not that I know of, but you could always make a custom launcher and wrap the call of retroarch with two cpupower calls changing the governor. You may need to fiddle a bit with sudo configuration but it should work.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2016-12-20 20:26:50

Kierek
Member
From: Poland
Registered: 2013-02-20
Posts: 16

Re: CPU Governor and RetroArch

R00KIE wrote:
Kierek wrote:

The best solution would be to set some kind of listener that would change governor to performance when it detects retroarch process starting and changing back to powersave when the process is killed. Is there some kind of mechanism that would allow it?

Not that I know of, but you could always make a custom launcher and wrap the call of retroarch with two cpupower calls changing the governor. You may need to fiddle a bit with sudo configuration but it should work.

That's the exact solution I was hoping to find, works perfect, thank you smile

Offline

Board footer

Powered by FluxBB