Jump to content

  • Log In with Google      Sign In   
  • Create Account


Running your OpenGL program on an Nvidia-Optimus enabled laptop


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 web383   Members   -  Reputation: 747

Like
0Likes
Like

Posted 18 September 2012 - 03:20 PM

Running my OpenGL 4.0 programs on my laptop (using nvidia-optimus technology), always defaults to the integrated Intel graphics chip, instead of the dedicated Nvidia GTX 660M that's included. This results in my program failing to initialize because the Intel chip only supports OpenGL 1.4.

Is there anyway to tell the system which graphics card to use without manually setting up a profile for the application? I'd rather not disable optimus altogether, so I can still gain the benefits of power savings while not running high-end applications. How do commercial games handle this?

Sponsor:

#2 Kaptein   Prime Members   -  Reputation: 1953

Like
1Likes
Like

Posted 18 September 2012 - 08:16 PM

to answer your question with a maybe, no Posted Image
this is not something that there is any standard for
anyone that has a double-card laptop needs to change this for themselves
usually with a dedicated keyboard button, or a program that comes with the computer

as for using profiles, i think that is for convinience mostly..
perhaps the most common games out there get a dedicated profile that comes with your drivers

the best source of information i could find:
http://us.download.nvidia.com/XFree86/Linux-x86_64/295.20/README/configlaptop.html

Edited by Kaptein, 18 September 2012 - 08:22 PM.


#3 jouley   Members   -  Reputation: 801

Like
1Likes
Like

Posted 18 September 2012 - 08:26 PM

Usually, the drivers can tell what's a game or application that is supposed to use the discrete GPU based on the profiles/filenames available at the time the driver was delivered. The drivers weren't released with details of applications you develop, though, so you'll probably need to add your executable to the whitelist. There's a video that walks through the process here.

Note: I haven't tried this process for an app under development, so I'm not sure what happens when the file is being constantly deleted/recreated, but it could handle it well!

#4 web383   Members   -  Reputation: 747

Like
0Likes
Like

Posted 18 September 2012 - 09:38 PM

Adding the application to the whitelist did the trick - even when executing the .exe through the Visual Studio debugger, and after deleting using clean. This solution wil work for me, though it's a shame there isn't a more automatic way of doing this. I guess if you're a big time developer/gamestudio you can just call nvidia and have them release a driver with your app on the whitelist.

Thanks for the help

#5 oggs91   Members   -  Reputation: 245

Like
0Likes
Like

Posted 20 September 2012 - 06:09 AM

i have a dell XPS502L laptop with an I7 and a nvidia 540m ... i had the same problem with visual studio and opentk ... mysolution: running visual studio by rightclicking the link to open the context menu and choose "Mit Grafikprozessor ausführen" (sry german, "run by graphicsprocessor"?)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS