x220-gpu-rendering-with-hyprland
Differences
This shows you the differences between two versions of the page.
| x220-gpu-rendering-with-hyprland [May 25, 2026 at 19:22] – created Ivan Janevski | x220-gpu-rendering-with-hyprland [August 26, 2026 at 16:02] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | # GPU Rendering Artifacts | + | # GPU rendering artifacts |
| - | ## Hardware & Software Context | + | ## Hardware & software context |
| | | | | | | | | ||
| Line 20: | Line 20: | ||
| - **Dropdown/ | - **Dropdown/ | ||
| - **Waybar icon artifacts**: | - **Waybar icon artifacts**: | ||
| - | - **VS Code fonts completely garbled**: all text in VS Code is illegible | + | - **VS Code fonts completely garbled**: all text in VS Code is illegible: random pixel patterns instead of glyphs. |
| - **System-wide nature**: the artifacts are not confined to one application; | - **System-wide nature**: the artifacts are not confined to one application; | ||
| --- | --- | ||
| - | ## How to Investigate This Class of Issue | + | ## How to investigate this class of issue |
| The following steps, taken in order, efficiently isolate the cause of system-wide GPU rendering corruption on a Hyprland/ | The following steps, taken in order, efficiently isolate the cause of system-wide GPU rendering corruption on a Hyprland/ | ||
| - | ### Step 1 — Gather | + | ### Step 1 — gather |
| ```bash | ```bash | ||
| Line 37: | Line 37: | ||
| Note the GPU, Mesa version, Hyprland version, and kernel version. On a Sandy Bridge machine: confirm the driver is `crocus` and the DRI path is `/ | Note the GPU, Mesa version, Hyprland version, and kernel version. On a Sandy Bridge machine: confirm the driver is `crocus` and the DRI path is `/ | ||
| - | ### Step 2 — Check recent package updates | + | ### Step 2 — check recent package updates |
| ```bash | ```bash | ||
| Line 45: | Line 45: | ||
| The most relevant packages for Wayland compositor rendering are: `mesa`, `hyprland`, `xorg-xwayland`, | The most relevant packages for Wayland compositor rendering are: `mesa`, `hyprland`, `xorg-xwayland`, | ||
| - | ### Step 3 — Read the live Hyprland | + | ### Step 3 — read the live hyprland |
| ```bash | ```bash | ||
| Line 52: | Line 52: | ||
| Look for: | Look for: | ||
| - | - **EGL context creation errors** | + | - **EGL context creation errors**: `eglCreateContext errored out with EGL_BAD_MATCH`: |
| - | - **GBM buffer format** | + | - **GBM buffer format**: `format XR24 with modifier 0x...`: the modifier field shows whether buffers are `LINEAR` (modifier `0x0`) or tiled (e.g. `X_TILED`, modifier `0x100000000000001`). Tiled formats on Sandy Bridge can corrupt popup surfaces. |
| - | - **DRM commit errors** | + | - **DRM commit errors**: `drm: Cannot commit when a page-flip is awaiting`: frame timing failures; indicates Hyprland is submitting frames faster than the display can flip. |
| - | - **Renderer selected** | + | - **Renderer selected**: confirms which GPU and GLES version are active. |
| - | ### Step 4 — Check Aquamarine | + | ### Step 4 — check aquamarine |
| Hyprland' | Hyprland' | ||
| Line 67: | Line 67: | ||
| Key variables: `AQ_NO_MODIFIERS`, | Key variables: `AQ_NO_MODIFIERS`, | ||
| - | ### Step 5 — Inspect | + | ### Step 5 — inspect |
| ```bash | ```bash | ||
| Line 73: | Line 73: | ||
| file / | file / | ||
| - | # Check for a shared libgallium — if present, ALL Gallium | + | # Check for a shared libgallium — if present, ALL gallium |
| ls -lh / | ls -lh / | ||
| ``` | ``` | ||
| Line 79: | Line 79: | ||
| In Mesa 26.0.x, `crocus_dri.so` was a standalone self-contained shared library. In Mesa 26.1.x, all Gallium3D drivers were consolidated into `libgallium-< | In Mesa 26.0.x, `crocus_dri.so` was a standalone self-contained shared library. In Mesa 26.1.x, all Gallium3D drivers were consolidated into `libgallium-< | ||
| - | ### Step 6 — Check i915 kernel module parameters | + | ### Step 6 — check i915 kernel module parameters |
| ```bash | ```bash | ||
| Line 94: | Line 94: | ||
| | `enable_dc` | `0` | Display power-saving can interfere with DRM commits | | | `enable_dc` | `0` | Display power-saving can interfere with DRM commits | | ||
| - | ### Step 7 — Check Mesa shader cache | + | ### Step 7 — check mesa shader cache |
| ```bash | ```bash | ||
| Line 106: | Line 106: | ||
| ``` | ``` | ||
| - | ### Step 8 — Confirm | + | ### Step 8 — confirm |
| ```bash | ```bash | ||
| Line 116: | Line 116: | ||
| --- | --- | ||
| - | ## Root Causes Found (This System, Mesa 26.1.1 / Hyprland | + | ## Root causes found (this system, mesa 26.1.1 / hyprland |
| - | ### Root Cause 1 — Mesa 26.1.1 crocus regression (primary, system-wide) | + | ### Root cause 1 — mesa 26.1.1 crocus regression (primary, system-wide) |
| **Mesa 26.1.0** introduced a major architectural refactor: all Gallium3D drivers were merged from individual shared libraries into a single `libgallium-< | **Mesa 26.1.0** introduced a major architectural refactor: all Gallium3D drivers were merged from individual shared libraries into a single `libgallium-< | ||
| Line 131: | Line 131: | ||
| This is **confirmed** by: (a) artifacts appearing immediately after the Mesa 26.0.6 → 26.1.1 upgrade, (b) artifacts disappearing after downgrading back to 26.0.6. | This is **confirmed** by: (a) artifacts appearing immediately after the Mesa 26.0.6 → 26.1.1 upgrade, (b) artifacts disappearing after downgrading back to 26.0.6. | ||
| - | ### Root Cause 2 — GBM buffer modifiers not disabled (popup artifacts) | + | ### Root cause 2 — GBM buffer modifiers not disabled (popup artifacts) |
| Hyprland' | Hyprland' | ||
| Line 139: | Line 139: | ||
| **Verification**: | **Verification**: | ||
| - | ### Root Cause 3 — VS Code / Electron | + | ### Root cause 3 — VS code / electron |
| Omarchy sets `ELECTRON_OZONE_PLATFORM_HINT=wayland` globally, causing VS Code (Electron) to run natively on Wayland and use the GPU for font rendering. Combined with the crocus regression and Sandy Bridge' | Omarchy sets `ELECTRON_OZONE_PLATFORM_HINT=wayland` globally, causing VS Code (Electron) to run natively on Wayland and use the GPU for font rendering. Combined with the crocus regression and Sandy Bridge' | ||
| Line 147: | Line 147: | ||
| --- | --- | ||
| - | ## Fix Applied | + | ## Fix applied |
| - | ### 1. Downgrade Mesa 26.1.1 → 26.0.6 | + | ### 1. downgrade mesa 26.1.1 → 26.0.6 |
| The old package was still in the pacman cache: | The old package was still in the pacman cache: | ||
| Line 159: | Line 159: | ||
| ``` | ``` | ||
| - | ### 2. Pin Mesa in pacman.conf | + | ### 2. pin mesa in pacman.conf |
| Add to `/ | Add to `/ | ||
| Line 169: | Line 169: | ||
| This prevents `omarchy update` / `pacman -Syu` from re-upgrading Mesa until a release that fixes the crocus regression is confirmed working. | This prevents `omarchy update` / `pacman -Syu` from re-upgrading Mesa until a release that fixes the crocus regression is confirmed working. | ||
| - | ### 3. Force linear GBM buffer allocation | + | ### 3. force linear GBM buffer allocation |
| In `~/ | In `~/ | ||
| ```ini | ```ini | ||
| - | # Force Aquamarine | + | # Force aquamarine |
| - | # Sandy Bridge | + | # Sandy bridge |
| env = AQ_NO_MODIFIERS, | env = AQ_NO_MODIFIERS, | ||
| - | # Force linear blit path in Aquamarine's renderer (belt-and-suspenders). | + | # Force linear blit path in aquamarine's renderer (belt-and-suspenders). |
| env = AQ_FORCE_LINEAR_BLIT, | env = AQ_FORCE_LINEAR_BLIT, | ||
| ``` | ``` | ||
| - | ### 4. Disable | + | ### 4. disable |
| In `~/ | In `~/ | ||
| Line 194: | Line 194: | ||
| Sandy Bridge' | Sandy Bridge' | ||
| - | ### 5. Disable | + | ### 5. disable |
| Create `~/ | Create `~/ | ||
| Line 202: | Line 202: | ||
| ``` | ``` | ||
| - | ### 6. Kernel | + | ### 6. kernel |
| In `/ | In `/ | ||
| Line 214: | Line 214: | ||
| Requires a reboot to take effect (or `modprobe -r i915 && modprobe i915`, which is only possible when Hyprland is not running). | Requires a reboot to take effect (or `modprobe -r i915 && modprobe i915`, which is only possible when Hyprland is not running). | ||
| - | ### 7. Clear Mesa shader cache | + | ### 7. clear mesa shader cache |
| ```bash | ```bash | ||
| Line 222: | Line 222: | ||
| Run this after any Mesa version change. | Run this after any Mesa version change. | ||
| - | ### 8. Restart Hyprland | + | ### 8. restart hyprland |
| A full session restart (log out → log back in) is required after a Mesa downgrade. Running processes retain the old Mesa shared library (`libgallium-26.1.1.so`) in memory; only a fresh Hyprland process loads the downgraded version. | A full session restart (log out → log back in) is required after a Mesa downgrade. Running processes retain the old Mesa shared library (`libgallium-26.1.1.so`) in memory; only a fresh Hyprland process loads the downgraded version. | ||
| Line 228: | Line 228: | ||
| --- | --- | ||
| - | ## What to Monitor Going Forward | + | ## What to monitor going forward |
| - **Mesa 26.1.x patch releases**: Check the [Mesa changelog](https:// | - **Mesa 26.1.x patch releases**: Check the [Mesa changelog](https:// | ||
| - | - **Mesa bug tracker**: The regression can be reported/ | + | - **Mesa bug tracker**: The regression can be reported/ |
| - **Hyprland 0.55.x atomicity**: | - **Hyprland 0.55.x atomicity**: | ||
| --- | --- | ||
| - | ## Quick Diagnostic Checklist | + | ## Quick diagnostic checklist |
| If you are on a ThinkPad X220 (or any Sandy Bridge machine) with Hyprland and see system-wide rendering artifacts after a system update, run through this in order: | If you are on a ThinkPad X220 (or any Sandy Bridge machine) with Hyprland and see system-wide rendering artifacts after a system update, run through this in order: | ||
x220-gpu-rendering-with-hyprland.1779736963.md.gz · Last modified: by Ivan Janevski
