Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#363138 - 15/12/2014 19:02 Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!)
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Can anyone offer a suggestion as to what might be causing the following situation to happen? I've been trying all sorts of things for weeks, trying to narrow this down, and I can't figure out how to fix this. I'm only bringing this to the EmpegBBS as a last resort... I know this isn't our normal area of expertise.

Computer system details:
Sony Vaio Flip 15 laptop SVF15N2ACXB
OS: Windows 8.1, latest updates. From a fresh wipe/reinstall about a month ago.
RAM: 12 gb
HDD: Upgraded to 1tb SSD (Model: Samsung 840 EVO)
Graphics: NVIDIA GeForce GT 735M with 2GB of video RAM. No overclocking or tweaking of any kind.

Problem:
Sometimes when playing a 3D game with the Nvidia GPU, there are periods when the game's frame rate drops suddenly to a slideshow. This happens randomly, but on average it occurs approximately once every 30-60 minutes of gameplay. When the problem occurs, the frame rate is terrible for about 30-90 seconds or so (the length of the problem is also random), then miraculously the frame rate goes back to normal. While the problem is occurring the game is essentially unplayable due to the massive amount of control input lag making mouse selections nearly impossible.

This isn't because I've reached a moment in the game where there are extra graphics or draw distance or effects on the screen. To the contrary, the problem occurs completely independently of what I'm doing in the game or how complex the graphics are in the game at the time. For instance, right now I'm playing Legend Of Grimrock 2, and the problem can occur equally whether I'm in an outdoor area with a far draw distance, or staring at a blank wall in a narrow dungeon corridor. In fact, the problem can occur even when I have the game paused. Also, I have noticed that the problem occurs in different games too, as long as they use the Nvidia GPU. Though the degree to which the game is affected by the problem varies. Games which do not use the GPU as heavily (for example, I also noticed it occur during the flat-shaded cartoonish game "The Marvelous Miss Take") are not as problematic when the issue occurs, though, the issue does still occur in those kinds of games, because I can see it happening with the Techpowerup GPU-Z utility.

If I run the Techpowerup GPU-Z utility, I can clearly and unambiguously see that this is caused when there is a PerfCap of reason "16" ("Util") occurring. I have attached a screen shot of this happening in GPU-Z. You can see it very clearly, as if someone has taken a giant bite out of the GPU performance graph, accompanied by a gray bar in the PerfCap Reason graph.



I've done some googling, and from everything I've read, this PerfCap reason occurs because the Nvidia drivers think that the GPU is not being utilized, and therefore is reducing the voltage to the GPU in an attempt to save battery life on the laptop (despite the fact that I'm plugged into AC power at the time). Indeed, when I look at the detailed log file from GPU-Z, there is a brief moment right before the perfcap occurs which says that the GPU and Memory Controller load values are, for just one second, zeroes. This might be the precipitating factor, but I can't imagine why they would be those values, because I'm actively running the game and playing it when the problem occurs.

Also, I don't see the game freeze or pause when the issue occurs, just, a sudden drop in frame rate while I'm playing the game, accompanied by a corresponding input control lag (making the game nearly unplayable). If the game *had* frozen for a moment, I could understand why it would hit PerfCap 16. In fact, if I load up a save game, or perform a quicksave in the game, then, yes, it does briefly (for a very short time during the game save or game load) do a perfcap 16 as expected because the 3D graphics aren't being used during the time that it's loading or saving the game. The problem I'm talking about isn't a save/load perfcap, it's an actual perfcap happening while I'm playing and the GPU is getting actively used. Also note that if I pause the game (for example, if I press the ESC key in Grimrock 2), then the GPU is still getting used to draw the rendered game world (even though it's not moving/changing) and the GPU utilization is still in the 50 percent range. I can let the system sit there on the pause screen as well, and the problem still occurs randomly, as seen in the GPU-Z graph.

Here are some things I have tried, in order to diagnose it:

- Attempted to find out if it was excessive temperature or GPU load causing the issue. It's not. As you can see in the screen shot, the GPU and memory controller load is only in the 50 percent range, and the GPU temperature is in the tepid Mid-50c range. I can run graphics demo programs which bring the memory controller load and GPU load up to the 99-100% range and heat the GPU up to about 66c, but no perfcap occurs during those tests. So it's not excessive temp or GPU load.

- Attempted to find out if it was CPU temperature or CPU usage related. It's not. When the problem happens in Grimrock 2, for example, the CPU is only at about 20-30 percent usage, the task manager actually shows "System Idle Process" to be something like 70-80 percent or so, and using CPUID HWMonitor shows the CPU temp to be in the mid-50c range, ie., not very hot. Again, I can run graphics demos to get these things to run much harder and hotter, and those do not induce the problem to occur.

- Attempted to find out if it was related to the power management or optimization features of the Nvidia driver. It's not. I tried changing the power management settings in the Nvidia driver to each of the four possible settings ("Prefer Maximum Performance", "Prefer Consistent Performance", "Adaptive", and "NVidia Driver Controlled"), and the problem occurred equally in all cases. Also tried changing the "Mutiple Displays optimization" settings in the Nvidia driver and those also had no effect.

- Attempted to find out if it was related to the power management features of the laptop itself. I had already made sure that any power optimizations were turned off when the laptop was on AC power, but just to be sure, I created a brand new power profile from scratch, based on "Maximum Performance", with every setting cranked up regardless of whether the laptop was on AC or battery power. This had no effect.

- Attempted to find out if it's some other program on the system that's interfering, perhaps a scheduled task or a virus scan or something like that. It's not. At least, not as far as I can tell. I ran the Task Manager, and also used the Systinternals pslist program and compared before/during/after lists of running processes. There is no difference between the lists in terms of which programs are running on the system. I tried disabling certain services (for a while I was suspecting the print spooler and the Windows Search indexer for example), and those did not solve the problem either. I tried using Task Manager to actively kill other processes while the game was running and the problem was occurring (at least, processes which aren't required for the game or the system to run), and those did not solve the problem. As far as virus scanners go, I'm only using the built-in Windows Defender that comes with Windows 8, and it's not set to run automatic scheduled scans. But just to be sure, I actively loaded up Windows Defender and ran both a Quick Scan and a Full Scan while the game was running, and Windows Defender did not cause the problem to occur.

- Corollary to the finding out if it's another program on the system: I tried using the Task Manager to set the game's priority to "High", just in case it was another program sapping the game's resources. This had no effect, the problem still occurred.

- Attempted to find out if it was related to game resolution. It's not. The problem occurs no matter what screen size or resolution I choose for the game.

- Attempted to find out if it was related to memory garbage collection in the game itself. This is hard to do, but I don't think it's related to that, since it happens in other games. But I tried to watch the memory usage of the game, and that usage did not change significantly before, during, or after the problem occurred.

- Attempted to find out if it was related to the Nvidia drivers. There's not much I can do here except update to the latest ones, which I did. The ones I'm running are from approx November 18th, which were the latest ones as of a few days ago when I did this step. No effect.

- Attempted to find out if it was related to disk usage. Looking at the Windows Resource Monitor, I see nothing special about the disk usage when the problem happens. Disk usage goes up and down all the time, and nothing unusual happens when the problem occurs.

- Looked through Task Scheduler to see if I could find anything to see that might run periodically which might cause this. I couldn't find anything. Though it's hard to search through that for that kind of information; most of the tasks say "Multiple Triggers Defined" and it's painfully time consuming to drill down into every one. The Task Scheduler doesn't make it easy to search for this information.

- Tried asking the people on the forum for the game I'm playing (in this case, Grimrock 2), and though they offered many good suggestions (many of which resulted in the diagnostic tests listed above), they haven't been able to solve the issue for me.

- Tried to determine if the problem is related to network connectivity. There might be a vague correlation where being connected to the internet seems to slightly increase the frequency of the problem. If I am disconnected from the internet, or if I bring the laptop to work and connected to my company network, then the issue does not seem to occur as often. This is only a vague impression, I don't have any statistics to back this up. And the problem still happens anyway, even if the PC is completely disconnected from all networks. If this is even true (I'm not sure that it is), then this seems to hint that the issue is another program or service running, but all of my attempts at identifying which service it could be have been fruitless.

- Tried disabling the Sony BatteryCare feature (which limits battery charging level to 50 percent capacity when the laptop is plugged in for long periods of its life to extend battery life). Had no effect.

- Tried a few different games. It affects some games worse than others, but it happens in them all, as long as the games are using the NVIDIA GPU. If I play the game "Crysis", the problem is particularly bad because once the problem starts happening, it doesn't stop and I must exit and restart the game to get the problem to go away. Whereas with some other games I only have to wait a minute or two for the problem to go away.

In total, I've tried disabling the following services which I thought might be related, to no effect:
Bonjour
Apple Mobile Device
Bluetooth OBEX service
Bluetooth Device Monitor
Bluetooth Support Service
Google Update Service (gupdate)
Google Update Service (gupdatem)
HomeGroup Listener
HomeGroup Provider
iPod service
NVidia Network Service
All services with NVidia in the name
All services with Intel in the name such as Pro/Set Wireless and such.
Services related to my DisplayLink dock (note: problem occurs whether docked or not).
Windows Search
Print Spooler


I have been googling for solutions to this issue, and it seems I'm not the only one with this problem. Many of the google search results are showing people in the Techpowerup forums reporting similar things, but most of them are getting responses which indicate a temperature problem, an overclocking problem, or a basic system issue, none of which apply to me here.

Can anyone help suggest a possible solution? I've posted this to several different forums including the Nvidia forums, and I've sent this as a tech support request to Nvidia (no answer). Any ideas?


Attachments
Util.gif


_________________________
Tony Fabris

Top
#363139 - 15/12/2014 20:00 Re: Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!) [Re: tfabris]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Looks like that system uses NVidia Optimus tech. It's a newer attempt at gluing an integrated graphics solution with a more powerful discreet GPU, without the hardware multiplexor to redirect video output.

Can you run GPU-Z against the integrated graphics at the same time, and see if those stalls are from the NVidia GPU trying to hand over processing to the IGP?

Or, you can also look to disable the Optimus feature, and try and force everything to the NVidia GPU at all times and see if the problem persists.

Top
#363140 - 15/12/2014 20:13 Re: Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!) [Re: drakino]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
The Nvidia driver has a screen which allows me to select, for a given executable, whether the NVidia chip or the Intel chip is used to play that game. I've tried setting that to "High Performance NVidia GPU" instead of "Automatic" for each game where I've encountered the issue, and it had no effect; the problem still happened.

However, I haven't tried setting that globally for the system (i.e., setting the global system to Nvidia instead of automatic). That might be worth a try. I'll give that a shot!

I'm not sure how to disable the Optimus feature, but maybe that's the equivalent?
_________________________
Tony Fabris

Top
#363141 - 15/12/2014 21:07 Re: Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!) [Re: tfabris]
jmwking
old hand

Registered: 27/02/2003
Posts: 777
Loc: Washington, DC metro
Can you put a second display on and put some real-time perf monitors on the second screen? Any other I/O could overwhelm the system...

-jk

Top
#363142 - 15/12/2014 21:12 Re: Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!) [Re: jmwking]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
That's possible to do, but I don't need to. I'm able to run the game in a window and have the perf monitors run alongside the game. Nothing I've seen when running any kind of performance monitoring indicates that there's anything unusual happening when the problem occurs.

In fact, I have deliberately tried to do I/O bound things like run a full virus scan while the game is running, and that does *not* induce the problem.
_________________________
Tony Fabris

Top
#363143 - 16/12/2014 03:23 Re: Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!) [Re: drakino]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Originally Posted By: drakino
Or, you can also look to disable the Optimus feature, and try and force everything to the NVidia GPU at all times and see if the problem persists.


Is this the sort of thing you meant? If so, that didn't fix it. Do you think there might be some other way to disable the Optimus feature?


Attachments
Capture.PNG


_________________________
Tony Fabris

Top
#363145 - 16/12/2014 05:17 Re: Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!) [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Actually, you know what, I don't think it's the Optimus feature now that I think about it.

If it was the Optimus feature handing-off to the Intel GPU mid-game, then not only would I notice a drop in frame rate, I would also notice a change in the graphics themselves, because the Intel GPU would handle certain 3D rendering features differently. Things like dynamic lighting and shadows would change if the game went from Nvidia to Intel mid-game. But that's not happening. The on-screen image in the game looks identical when the problem occurs, the only change is that the frame rate goes down noticeably.

Besides, I don't think games or DirectX could even support the GPU changing out from under them mid-game like that. Could they?

Looking at GPU-Z, I can see that the Nvidia GPU is still the chip that's being used when the problem occurs... it's just that the voltage to the chip has been throttled to increase the battery life of the laptop.
_________________________
Tony Fabris

Top
#363147 - 16/12/2014 10:59 Re: Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!) [Re: tfabris]
BartDG
carpal tunnel

Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
Maybe you can try disabling the non-nVidia display adapter (intel?) in the device manager? That way, the nVidia display adapter won't be interfered by the other adapter. I've had to do this in the past to get some things to work.

It's a bit of a dirty hack, but very easy to enable/disable, so the annoyance is minimal.
_________________________
Riocar 80gig S/N : 010101580 red
Riocar 80gig (010102106) - backup

Top
#363152 - 16/12/2014 17:19 Re: Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!) [Re: BartDG]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
When I'm googling for a way to disable the Optimus technology, what I find is threads on forums where people make that exact same suggestion: Disable the Intel device driver so that it forces it to use the Nvidia device driver.

All those forum threads end the same way: It doesn't work. The most common result is that the Nvidia card won't work at all because it doesn't have the intel's framebuffer to write its images to, and/or the whole OS won't work with anything but basic low-rez low-color video because it doesn't have any drivers for the main display adapter.

And anyway, that's not the issue here. I'm not getting a situation where the OS is trying to switch to the Intel display. It's still using the Nvidia display, it's just throttled its voltage because it thinks I don't need it for some reason.
_________________________
Tony Fabris

Top
#363160 - 17/12/2014 18:01 Re: Shot in the dark - Gaming graphics slow down due to "Perfcap". (Long!) [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
I'm currently in a conversation with Nvidia tech support. They supplied me a slightly newer "hotfix" version of the driver (dated only two days newer than the one I was using), asked me to do a "clean install" of that driver which I did, and... it didn't fix the problem. Now they're walking me through other setting changes that I've already tried, though I'm humoring them and trying them again anyway under the new driver, just to be sure.
_________________________
Tony Fabris

Top