mesa-progs
Learn how to use mesa-progs on Gentoo Linux to verify OpenGL rendering, confirm Intel Iris GPU acceleration, detect llvmpipe CPU fallback, and validate Mesa driver configuration
Basic Usage
Install mesa and mesa-progs
echo ">=x11-libs/libdrm-2.4.131 video_cards_intel" >> /etc/portage/package.use/libdrm
emerge -1av x11-libs/libdrm media-libs/mesa x11-apps/mesa-progs x11-base/xorg-server
Print values in VIDEO_CARDS from /etc/portage/make.conf
portageq envvar VIDEO_CARDS
Check permissions
$ getfacl /dev/dri/card0
getfacl: Removing leading '/' from absolute path names
# file: dev/dri/card0
# owner: root
# group: video
user::rw-
user:wuseman:rw-
group::rw-
mask::rw-
other::---
A broader solution is to add the user(s) needing access the video card to the video group
gpasswd -a $(whoami) video
Print default info
glxinfo
Force an indirect rendering context
glxinfo -i
Brief output, print only the basics
glxinfo -B
Print visuals info in verbose form
glxinfo -v
Print verbose visual information table
glxinfo -t
Find the best visual and print its number
glxinfo -b
Print interesting OpenGL limits
glxinfo -l
Print a single extension per line
glxinfo -s
Advanced Usage
Show active OpenGL vendor and renderer (intel is what we want for HP EliteDesk 800 G3 DM 65W)
$ glxinfo -B | grep -E "OpenGL renderer|OpenGL vendor"
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 530 (SKL GT2)
Verify which OpenGL driver is actually in use
glxinfo -B | grep -E 'OpenGL vendor|OpenGL renderer|OpenGL version'
Here is an example correct loading Intel driver
glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel (0x8086)
Device: Mesa Intel(R) HD Graphics 530 (SKL GT2) (0x1912)
Version: 25.3.3
Accelerated: yes
Video memory: 23443MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 530 (SKL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 25.3.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 25.3.3
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 25.3.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
When open vendor is set to Mesa we are failing, in this example we are failing to load intel and iris drivers
glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa (0xffffffff)
Device: llvmpipe (LLVM 21.1.8, 256 bits) (0xffffffff)
Version: 25.3.3
Accelerated: no
Video memory: 23443MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 4.5
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 31 MB, largest block: 31 MB
VBO free aux. memory - total: 11743 MB, largest block: 11743 MB
Texture free memory - total: 31 MB, largest block: 31 MB
Texture free aux. memory - total: 11743 MB, largest block: 11743 MB
Renderbuffer free memory - total: 31 MB, largest block: 31 MB
Renderbuffer free aux. memory - total: 11743 MB, largest block: 11743 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 4293913726 MB
Total available memory: 4293937170 MB
Currently available dedicated video memory: 31 MB
OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 21.1.8, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 25.3.3
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.5 (Compatibility Profile) Mesa 25.3.3
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 25.3.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
Test Intel Iris Mesa driver explicitly
MESA_LOADER_DRIVER_OVERRIDE=iris glxinfo -B | grep -i "OpenGL renderer"
Configure Gentoo Linux to use Intel Iris only (Skylake cpu or newer is required)
VIDEO_CARDS="iris"
Verify that our cpu really is a skylake cpu
find /sys -name pmu_name -exec cat {} + 2>/dev/null
Check so hardware acceralator is available
if glxinfo -B 2>/dev/null | grep -qi llvmpipe; then
echo "CPU rendering (bad)"
else
echo "HW acceleration OK"
fi
Force Intel Iris driver for full OpenGL output
MESA_LOADER_DRIVER_OVERRIDE=iris glxinfo -B
Testing i965 video drier
MESA_LOADER_DRIVER_OVERRIDE=i965 glxinfo -B | grep -i "OpenGL renderer"
Verifying installed Mesa DRI drivers
ls -1 /usr/lib64/dri | grep -E '^(iris|crocus|i965)_dri\.so$'
Checking merge time and eta
Best POSIX, clean, robust solution (recommended)
genlop -c 2>&1 | tr '\r' '\n' | grep -e 'current merge time' -e 'ETA'
POSIX + extensible (best if you may format later)
genlop -c 2>&1 | tr '\r' '\n' | awk '/current merge time/ || /ETA/'
Minimal and sufficient (when output already has newlines)
genlop -c | grep -e 'current merge time' -e '^ *ETA'
Equivalent methods to extract merge time and ETA from genlop output
genlop -c 2>&1 | grep -e 'current merge time' -e 'ETA'
current merge time: 1 minute and 39 seconds.
ETA: 16 minutes and 5 seconds.
(09:27:37)-[root@localhost] /home/wuseman $ genlop -c 2>&1 | tr '\r' '\n' | grep -e 'current merge time' -e 'ETA'
current merge time: 1 minute and 44 seconds.
ETA: 16 minutes.
(09:27:37)-[root@localhost] /home/wuseman $ genlop -c 2>&1 | tr '\r' '\n' | awk '/current merge time/ || /ETA/'
current merge time: 1 minute and 50 seconds.
ETA: 15 minutes and 54 seconds.
(09:27:37)-[root@localhost] /home/wuseman $ genlop -c | tr '\r' '\n' | grep -E 'current merge time|ETA'
current merge time: 2 minutes.
ETA: 15 minutes and 44 seconds.
(09:27:37)-[root@localhost] /home/wuseman $ genlop -c | grep -e 'current merge time' -e '^ *ETA'
current merge time: 2 minutes and 5 seconds.
ETA: 15 minutes and 39 seconds.
(09:27:37)-[root@localhost] /home/wuseman $ genlop -c | grep -E --line-buffered 'current merge time|ETA'
current merge time: 2 minutes and 10 seconds.
ETA: 15 minutes and 34 seconds.
(09:27:37)-[root@localhost] /home/wuseman $ genlop -c | sed 's/\r/\n/g' | grep -E 'current merge time|ETA'
current merge time: 2 minutes and 16 seconds.
ETA: 15 minutes and 28 seconds.
(09:27:37)-[root@localhost] /home/wuseman $ genlop -c | tr '\r' '\n' | grep -E 'current merge time|ETA'
current merge time: 2 minutes and 21 seconds.
ETA: 15 minutes and 23 seconds.
(09:27:37)-[root@localhost] /home/wuseman $ genlop -c | grep -e 'current merge time' -e '^ *ETA'
current merge time: 2 minutes and 32 seconds.
ETA: 15 minutes and 12 seconds.
Tips and Tricks
Add genlop-status as an alias and we can simple check compile status
alias genlop-status='genlop -c 2>&1 | tr "\r" "\n" | grep -e "current merge time" -e "ETA"'