Bug 1113

Summary: Force high performance GPU for Nvidia Optimus systems
Product: [JogAmp] Jogl Reporter: Xerxes Rånby <xerxes>
Component: openglAssignee: Sven Gothel <sgothel>
Status: RESOLVED INVALID    
Severity: enhancement CC: gouessej
Priority: ---    
Version: 2.3.2   
Hardware: All   
OS: all   
Type: FEATURE SCM Refs:
Workaround: ---

Description Xerxes Rånby 2014-12-28 22:02:01 CET
"Global Variable NvOptimusEnablement (new in Driver Release 302)

Starting with the Release 302 drivers, application developers can direct the Optimus driver at runtime to use the High Performance Graphics to render any application —- even those applications for which there is no existing application profile. They can do this by exporting a global variable named NvOptimusEnablement. The Optimus driver looks for the existence and value of the export. Only the LSB of the DWORD matters at this time. A value of 0x00000001 indicates that rendering should be performed using High Performance Graphics. A value of 0x00000000 indicates that this method should be ignored.

Example Usage:

    extern "C" {
    _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
    }
    .. _global_profile_settings:

"

[1] http://docs.nvidia.com/gameworks/content/technologies/desktop/optimus.htm
Comment 1 Sven Gothel 2015-04-01 18:48:25 CEST
(In reply to comment #0)
> 
>     extern "C" {
>     _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
>     }
>     .. _global_profile_settings:
> 
> "
> 
> [1] http://docs.nvidia.com/gameworks/content/technologies/desktop/optimus.htm

This seems not to work reliably (as other users in other forums reported)
and IMHO shall be part of an API.

On OSX the system does switch automatically: No issue!

I have no other system.

IMHO this shall be performed either by the user via a control panel thingy,
or by the windowing manager,
or via an explicit API.

I close this bug as invalid for now,
please re-open if you (or anybody) strongly disagrees.
In the latter case, please elucidate the situation:
  - examples
  - proof of work (patch?) w/ info on system