4

I am using Linux Mint 18.2 and I have an Intel HD Graphics 4000 from an Intel Core i5-3230M CPU.

I need to program in OpenGL 4.

Intel says that this GPU supports OpenGL 4.

However when i run glxinfo | grep "version" I get the following:

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 3.3
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 12.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

How can I get OpenGL 4 on my system?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Roulbacha
  • 457
  • 7
  • 20

2 Answers2

2

The version of Mesa used by Linux Mint, even in its current release (18.2) is probably just too old to support the current versions of OpenGL (the version, 12.0.6, should, in fact, do OpenGL 4.3, but it still has to play together with the kernel driver, and it probably just doesn't do that well enough in that version).

I'd recommend Mesa 17.0.7 or newer. Mint doesn't ship that, and if you tried to install it, you'd have to recompile X.org / Wayland and a lot of other stuff.

So: Abandoning Mint sounds like your only choice at this point. Mint is a rather conservative distro (based on Ubuntu); go for Fedora 26 or 27; Arch Linux is also known for being pretty close to upstream.

CAVEAT: As @Fla points out below, you can actually circumvent the need to build yourself, as PPAs (external package repositories) exist with pre-compiled packages.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
  • Okay, i will try that! Thank you for your help – Roulbacha Oct 14 '17 at 20:18
  • Wow, not at all. Mint is based on the last Ubuntu LTS, and the kernel and mesa can easily be bumped with a PPA. – Fla Oct 25 '17 at 18:54
  • @Fla sorry, but Ubuntu 16.04 LTS, for me, feels ancient, and if you happen to have that PPA for OP, which doesn't break all libX-linking programs, Roulbacha will probably be grateful (and I surprised). – Marcus Müller Oct 25 '17 at 22:39
  • Well, see my answer below, I do that on every Ubuntu / Mint I used with different configurations (Intel HD Graphics, Radeon...) and never had problems. The part of your answer which made me react was especially the "you'd have to recompile X.org / Wayland". PPA are here to avoid that. – Fla Oct 26 '17 at 14:25
  • Interesting, @Fla! I'm just really surprised because *a lot* of things link against mesa, and that means that either the PPA versions of mesa are ABI-compatible or that the PPA contains a lot of dependent packages, too – Marcus Müller Oct 26 '17 at 20:08
1

To bump your kernel

  • Open the Update Manager
  • Click View -> Linux Kernels
  • Select the most recent one and install it

If it is not recent enough for you, you can manage your kernels with Ukuu Kernel Update Utility.

To install ukuu

  • Open the Update Manager
  • Click Edit -> Software Sources
  • Click PPAs and "Add a new ppa"
  • Enter ppa:teejee2008/ppa
  • Install Ukuu with the software center or in a terminal run sudo apt update && sudo apt install ukuu
  • Use ukuu to manage your kernels

For Mesa, you also need a ppa. Like for ukuu, open the update manager and add a new ppa. The one for Mesa is ubuntu-x-swat/updates. Then search for new updates.

Once you've done that, you need to restart your computer and you will have the last version running.

Fla
  • 536
  • 6
  • 23