Intel uhd 620은 OpenGL 4, Ubuntu 18.04를 지원하지 않습니다.

Intel uhd 620은 OpenGL 4, Ubuntu 18.04를 지원하지 않습니다.

저는 최근에 Intel i5 8250u와 iGPU Intel UHD 620이 포함된 버전인 Dell Inspiron 15" 5570을 구입했습니다. Ubuntu를 설치한 후 화면이 깜박이는 현상이 발생하여 다음을 사용하여 관리했습니다.Joakim의 해결 방법하지만 지금은 내가 이해할 수 없는 또 다른 문제에 직면해 있습니다. 통합 GPU를 지원하는 OpenGL 4가 필요하지만 "활성화"하는 방법을 모르겠습니다. 결과는 다음 과 같습니다 glxinfo | grep -i opengl.

glxinfo | grep -i opengl
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.2.0-devel
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.2.0-devel
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.2.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

그리고 이것은 유용할 수 있는 또 다른 glxinfo 부분입니다:

Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)  (0x5917)
    Version: 18.2.0
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2

그리고 이것은 OpenGL 4가 필요한 프로그램을 시작하려고 할 때 발생하는 출력 오류입니다.

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  40
  Current serial number in output stream:  39

내 CPU용 알파 드라이버를 활성화하는 알파 부팅 옵션에 대해 들었지만 그 부분이 그리워서 미리 도움을 주셔서 감사합니다.

--업데이트-- 실제로 오류를 "관리"했습니다. openGL 4 기능, openGL 4.5 컨텍스트가 필요한 다른 프로그램을 시도했고 문제 없이 작동했지만 4.5 컨텍스트가 필요한 이 "레거시" OpenGL 프로그램을 사용하고 싶을 때

#include <cstdlib>
#include <cmath>
#include <iostream>

#ifdef __APPLE__
#  include <GL/glew.h>
#  include <GL/freeglut.h>
#  include <OpenGL/glext.h>
#else
#  include <GL/glew.h>
#  include <GL/freeglut.h>
#  include <GL/glext.h>
#pragma comment(lib, "glew32.lib")
#endif

#define PI 3.14159265358979324

using namespace std;

// Globals.
static float R = 40.0; // Radius of circle.
static float X = 50.0; // X-coordinate of center of circle.
static float Y = 50.0; // Y-coordinate of center of circle.
static int numVertices = 10; // Number of vertices on circle.

// Drawing routine.
void drawScene(void)
{
   float t = 0; // Angle parameter.

   glClear(GL_COLOR_BUFFER_BIT);

   glColor3f(0.0, 0.0, 0.0);

   // Draw a line loop with vertices at equal angles apart on a circle
   // with center at (X, Y) and radius R, The vertices are colored randomly.
   /* Funzione seno esercizio pag56 2.27
   glBegin(GL_LINE_STRIP);
      for(float i = -PI; i <= PI; i+=PI/20.0)
      {
     glColor3f((float)rand()/(float)RAND_MAX, (float)rand()/(float)RAND_MAX, (float)rand()/(float)RAND_MAX);
     glVertex3f(i, sin(i), 0.0);
     //cout<<"x="<<i<<";y="<<sin(i);
     //t += 2 * PI / numVertices;
      }
   glEnd();*/
   //Ellisse esercizio pag56 2.28
   //x = X + A*cos(t), y = Y + B*sin(t), z=0,  0<=t<=2PI
   glBegin(GL_LINE_LOOP);
      for(int i = 0; i < numVertices; i++)
   {
     glColor3f((float)rand()/(float)RAND_MAX, (float)rand()/(float)RAND_MAX, (float)rand()/(float)RAND_MAX);
     glVertex3f((R+10)*cos(t), (R-10)*sin(t), 0.0);
     //cout<<"x="<<i<<";y="<<sin(i);
     t += 2 * PI / numVertices;
   }
   glEnd();

   glFlush();
}

// Initialization routine.
void setup(void)
{
   glClearColor(1.0, 1.0, 1.0, 0.0);
}

// OpenGL window reshape routine.
void resize(int w, int h)
{
   glViewport(0, 0, w, h);
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
   glOrtho(-50, 50, -50, 50, -1.0, 1.0);
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
}

// Keyboard input processing routine.
void keyInput(unsigned char key, int x, int y)
{
   switch(key)
   {
      case 27:
     exit(0);
     break;
      case '+':
     numVertices++;
     glutPostRedisplay();
     break;
      case '-':
     if (numVertices > 3) numVertices--;
     glutPostRedisplay();
     break;
      default:
     break;
   }
}

// Routine to output interaction instructions to the C++ window.
void printInteraction(void)
{
   cout << "Interaction:" << endl;
   cout << "Press +/- to increase/decrease the number of vertices on the circle." << endl;
}

// Main routine.
int main(int argc, char **argv)
{
   printInteraction();
   glutInit(&argc, argv);

   glutInitContextVersion(4,5);
   glutInitContextProfile(GLUT_COMPATIBILITY_PROFILE);

   glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA);
   glutInitWindowSize(500, 500);
   glutInitWindowPosition(100, 100);
   glutCreateWindow("circle.cpp");
   glutDisplayFunc(drawScene);
   glutReshapeFunc(resize);
   glutKeyboardFunc(keyInput);

   glewExperimental = GL_TRUE;
   glewInit();

   setup();

   glutMainLoop();
}

오류가 발생합니다.

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  40

하지만 실제로는 다음과 같이 시작하여 사용할 수 있습니다.

MESA_GL_VERSION_OVERRIDE=4.5 ./circle 

왜 이것이 버그인지는 모르겠습니다. MESA.. 접두사 없이 작동하는 다른 프로그램을 컴파일하려고 할 때 다음을 사용하기 때문입니다: gluInitContextVersion(4, 6); 대신: gluInitContextVersion(4, 5); GLXBadFBConfig와 동일한 오류가 발생하므로 프로그램 자체에는 OpenGL 잘못된 컨텍스트 설정 완화가 없습니다.

관련 정보