yang123vc / open-hardware-monitor

Automatically exported from code.google.com/p/open-hardware-monitor
0 stars 0 forks source link

nVidia Optimus compatiblity? #291

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Short intro: nVidia Optimus is a technology which runs the OS and applications 
on integrated graphics and seamlessly uses discrete graphics only for 3D 
applications, therefore while laptop is running on battery, power usage is low, 
since only integrated graphics is being used and discrete is deactivated.

The problem: When I run Open Hardware Monitor, discrete GPU is activated. When 
using Open Hardware Monitor continuously for tray displays, discrete GPU being 
active almost halves battery life. Note: this behavior happens also in other 
monitoring software showing GPU values (Argus Monitor).

Using: Open Hardware Monitor 0.3.2 Beta, on Windows 7 Professional x64, laptop 
with Intel Core i7 2820QM (built-in integrated graphics) and Quadro 2000M 
(discrete graphics). (In Open Hardware Monitor, only CPU and discrete GPU are 
shown.)

Possible cause/suggested fix: Without deep technical knowledge of the subject, 
I suspect that polling GPU for clocks/temperature/load activates the GPU and 
prevents it from deactivating. Hiding GPU sensors has no effect (are their data 
still collected when they are hidden?).
Would it be possible to include an option to disable polling of GPU altogether? 
I really like display of CPU frequency, temperature and cores load in tray, but 
I would abandon GPU info in favor of twice the battery life.

Thank you.

Original issue reported on code.google.com by martin9l...@gmail.com on 16 Nov 2011 at 11:43

GoogleCodeExporter commented 9 years ago
If I disable the GPU groups, discrete graphics stays off. So I simply added a 
menu option similar to "Read HDD sensors" and this allows monitoring of the 
discrete GPU while on AC and saving power while on battery (automatic switching 
would be ideal, but I did not try that hard :) ).

If anybody is interested, I attached the diff file.

Original comment by martin9l...@gmail.com on 16 Nov 2011 at 8:59

Attachments:

GoogleCodeExporter commented 9 years ago
To answer your question: Yes hidden sensors are still updated with data. The 
hiding is only for the user interface.

I had hopes that the Optimus technology could be easily detected somehow and a 
manual switch for the graphics reading would not be required. But I will add 
that to the official release anyway, because it might be useful for other 
situations as well.

One thing I still wonder: Do all monitoring calls through NVAPI wake the GPU, 
or does it get waked only be a few specific ones? If there is one call (for 
example to read voltage or to read clock) that does not wake the GPU and could 
provide a hint (voltage or clock is zero for example), then one could use this 
to switch polling of the other data on/off automatically. Would be great if 
someone with an Optimus system could investigate this.

Original comment by moel.mich on 9 Jul 2012 at 10:01

GoogleCodeExporter commented 9 years ago
Issue 296 has been merged into this issue.

Original comment by moel.mich on 9 Jul 2012 at 10:02

GoogleCodeExporter commented 9 years ago
I tried some NVAPI calls by using the OpenHardwareMonitor.Hardware.Nvidia in a 
console application.

Reading the clocks or "PStates" (utilization) wakes up the GPU every time a 
call is made. I could not find any call for voltage. I also searched for a way 
to read the power states P0 to P15, which are mentioned in NVAPI documentation 
within a section for NvAPI_GPU_GetDynamicPstatesInfoEx function (this is called 
GetPStates in OHM, same ID), but it looks like these states are not exposed 
anywhere through the NVAPI.

Regarding the clocks - they are not zero and they can be all the same 
regardless whether the GPU was inactive before the monitoring call or whether 
some application was using the GPU.

The utilization could be some indicator. When the GPU is active because of 
external displays connected (regardless of what applications are running, the 
DisplayPort connection is activating the GPU by itself), memory and memory 
controller loads are some semi-constant numbers. However, this can be laptop- 
and connection-specific... Also, in an application with light graphics (such as 
Visual Studio, which also activates the GPU) on battery power, all utilization 
can be zero although the GPU is active. And then there is a question when to 
start the monitoring again, if each monitoring call wakes up the GPU, there 
would be something like probing every X minutes, whether there is a load now...

I was not able to work out any reliable way to detect the GPU activity (and 
alternative ways - based on power source or presence of external displays are 
only partial solutions for specific users). But I have never worked with the 
NVAPI or graphics card monitoring before, so if there are any ideas, I can test 
them.

PS: There has to be some way, since the GPU Activity Icon activated in NVIDIA 
Control Panel can show the status of the GPU, however it belongs to the NVIDIA 
Driver Helper Service and it is beyond me to reverse engineer that.

Original comment by martin9l...@gmail.com on 10 Jul 2012 at 5:10

GoogleCodeExporter commented 9 years ago
Thank you very much for your tests. Since there is no really simple and 
reliable way to detect the Optimus technique (at least none we know of), I have 
added the hardware group switching to the official version.

http://openhardwaremonitor.org/files/openhardwaremonitor-v0.4.0.16-alpha.zip

Original comment by moel.mich on 11 Jul 2012 at 5:42

GoogleCodeExporter commented 9 years ago
Issue 371 has been merged into this issue.

Original comment by moel.mich on 2 Aug 2012 at 7:57