<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/quick-hack-performance-debugging-linux-graphics-on-mesa-hg1g3edfd" -->

---
title: Quick hack: Performance debugging Linux graphics on Mesa
description: GALLIUM_HUD is a Mesa feature that overlays real-time performance graphs (FPS, CPU usage, pixels rendered, primitives generated) on OpenGL/EGL applications. It...
canonical: https://daily.dev/posts/quick-hack-performance-debugging-linux-graphics-on-mesa-hg1g3edfd
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Quick hack: Performance debugging Linux graphics on Mesa | daily.dev
og:description: GALLIUM_HUD is a Mesa feature that overlays real-time performance graphs (FPS, CPU usage, pixels rendered, primitives generated) on OpenGL/EGL applications. It...
og:url: https://daily.dev/posts/quick-hack-performance-debugging-linux-graphics-on-mesa-hg1g3edfd
og:image: https://api.daily.dev/og/posts/Hg1G3EdFd.png
og:image:alt: Quick hack: Performance debugging Linux graphics on Mesa
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick hack: Performance debugging Linux graphics on Mesa

**[Collabora Blog](https://daily.dev/sources/collabora)** · 2 min read · 0 upvotes · 0 comments

## Summary

GALLIUM_HUD is a Mesa feature that overlays real-time performance graphs (FPS, CPU usage, pixels rendered, primitives generated) on OpenGL/EGL applications. It works with all Gallium-based Mesa drivers and is enabled via the GALLIUM_HUD environment variable. The post shows how to enable it system-wide on Android (via init.rc) and standard Linux distros (via /etc/environment), with example metric combinations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.collabora.com/news-and-blog/blog/2017/06/29/quick-hack-performance-debugging-linux-graphics-on-mesa>

## Questions this post answers

### How do I enable GALLIUM_HUD to show FPS and CPU usage overlay in Mesa on Linux?

Set the GALLIUM_HUD environment variable before launching your GL/EGL application. For example, add 'export GALLIUM_HUD=cpu,cpu0+cpu1+cpu2+cpu3;pixels-rendered,fps,primitives-generated' to /etc/environment for system-wide effect on standard Linux distros. It works on all Gallium-based Mesa drivers (most drivers, with the notable exception of some Intel drivers). Run 'export GALLIUM_HUD=help glxgears' to see all available options.

_Developers tuning Linux graphics pipelines share Mesa tips and driver findings on daily.dev._

### How do I enable GALLIUM_HUD system-wide on Android for Mesa graphics debugging?

Add an export statement to the init.rc file of your Android device. Navigate to your Android source checkout, open the device-specific init.rc (e.g., device/linaro/generic/init.rc), and add: 'export GALLIUM_HUD cpu,cpu0+cpu1+cpu2+cpu3;pixels-rendered,fps,primitives-generated'. This sets the variable system-wide so all GL/EGL applications will display the performance overlay.

_Android graphics and embedded Linux developers working with Mesa track driver techniques on daily.dev._

## Similar posts on daily.dev

- [Investigating Linux graphics](https://daily.dev/posts/investigating-linux-graphics-pt8vvc5hu) · Lobsters · 0 upvotes · 0 comments
- [New Intel Linux Code For DG2 Graphics Can Improve Performance As Much As "A Whopping 260%"](https://daily.dev/posts/new-intel-linux-code-for-dg2-graphics-can-improve-performance-as-much-as-a-whopping-260--z9cpbzlib) · Phoronix · 0 upvotes · 0 comments
- [Linux gaming's next leap isn't more FPS, it's a working Wayland overlay](https://daily.dev/posts/linux-gaming-s-next-leap-isn-t-more-fps-it-s-a-working-wayland-overlay-1ff6i0kv1) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#mesa](https://daily.dev/tags/mesa)

[View this post on daily.dev](https://daily.dev/posts/quick-hack-performance-debugging-linux-graphics-on-mesa-hg1g3edfd)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Quick hack: Performance debugging Linux graphics on Mesa","url":"https://daily.dev/posts/quick-hack-performance-debugging-linux-graphics-on-mesa-hg1g3edfd","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/quick-hack-performance-debugging-linux-graphics-on-mesa-hg1g3edfd"},"datePublished":"2026-08-11T08:56:29.712Z","dateModified":"2026-08-11T09:33:06.277Z","description":"GALLIUM_HUD is a Mesa feature that overlays real-time performance graphs (FPS, CPU usage, pixels rendered, primitives generated) on OpenGL/EGL applications. It...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8cd6a1a6337bcc454d57212c97b7392a?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8cd6a1a6337bcc454d57212c97b7392a?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collabora Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collabora Blog","logo":"https://media.daily.dev/image/upload/s--ZGZ0FjqS--/f_auto,q_auto/v1786438306/logos/collabora?_a=BAMAMicg0","url":"https://daily.dev/sources/collabora"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/quick-hack-performance-debugging-linux-graphics-on-mesa-hg1g3edfd","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"android,mesa","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collabora Blog","item":"https://daily.dev/sources/collabora"},{"@type":"ListItem","position":3,"name":"Quick hack: Performance debugging Linux graphics on Mesa"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/quick-hack-performance-debugging-linux-graphics-on-mesa-hg1g3edfd#faq","mainEntity":[{"@type":"Question","name":"How do I enable GALLIUM_HUD to show FPS and CPU usage overlay in Mesa on Linux?","acceptedAnswer":{"@type":"Answer","text":"Set the GALLIUM_HUD environment variable before launching your GL/EGL application. For example, add 'export GALLIUM_HUD=cpu,cpu0+cpu1+cpu2+cpu3;pixels-rendered,fps,primitives-generated' to /etc/environment for system-wide effect on standard Linux distros. It works on all Gallium-based Mesa drivers (most drivers, with the notable exception of some Intel drivers). Run 'export GALLIUM_HUD=help glxgears' to see all available options. Developers tuning Linux graphics pipelines share Mesa tips and driver findings on daily.dev."}},{"@type":"Question","name":"How do I enable GALLIUM_HUD system-wide on Android for Mesa graphics debugging?","acceptedAnswer":{"@type":"Answer","text":"Add an export statement to the init.rc file of your Android device. Navigate to your Android source checkout, open the device-specific init.rc (e.g., device/linaro/generic/init.rc), and add: 'export GALLIUM_HUD cpu,cpu0+cpu1+cpu2+cpu3;pixels-rendered,fps,primitives-generated'. This sets the variable system-wide so all GL/EGL applications will display the performance overlay. Android graphics and embedded Linux developers working with Mesa track driver techniques on daily.dev."}}]}
```

