简体   繁体   中英

How to make make Nvidia as the default graphics card?

March 27 2020: The question boils down to how to run applications in Nvidia graphics card. If Intel Graphics card is enabled, OpenGL version is 4.6 for both Nvidia and Intel GPU's according to GPU-Z software. But, if disable Intel, to run the application using Nvidia, the application crashes; GPU-Z shows OpenGL version 1.1. So, how can I run the application with Nvidia graphics cards?

Notes: 1. I tried adding the application in the graphics settings to use high performance GPU, but the application uses Intel GPU. 2. Also, tried adding the application in Nvidia Control Panel to no luck.

March 16 2020: I was executing the example1 code in NanoGUI in Windows 10. The program is working when I connect my display using HDMI cable(connected to motherboard), but crashes without any errors using DP cable(connected to NVIDIA graphics card). I have Intel UHD Graphics 630 and NVIDIA GeForce GT 730 in my system. The driver version of NVIDIA is 26.21.14.4250.

I ran a simple OpenGL code in debug mode, and the program crashes at glfwInit() function. The error is at

libEGL!eglDestroyImageKHR

Here is a sample code that crashes with DP port and works with the HDMI port.

// #include <glad/glad.h>
#include <GLFW/glfw3.h>

#include <iostream>

void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow *window);

// settings
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;

int main()
{
    // glfw: initialize and configure
    // ------------------------------
    glfwInit();

    // glfw window creation
    // --------------------
    GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL", NULL, NULL);
    if (window == NULL)
    {
        std::cout << "Failed to create GLFW window" << std::endl;
        glfwTerminate();
        return -1;
    }
    glfwMakeContextCurrent(window);

    // render loop
    // -----------
    while (!glfwWindowShouldClose(window))
    {

        // glfw: swap buffers and poll IO events (keys pressed/released, mouse moved etc.)
        // -------------------------------------------------------------------------------
        glfwSwapBuffers(window);
        glfwPollEvents();
    }

    // glfw: terminate, clearing all previously allocated GLFW resources.
    // ------------------------------------------------------------------
    glfwTerminate();
    return 0;
}

The issue was solved in another update of the Nvidia drivers to 445.75 standard.

Also, I found that remote desktop has issues with Nvidia drivers. Remote software programs sometimes install their own display drivers. More can be found here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM