flathub / flathub/io.github.unknownskl.greenlight
GPU acceleration completely disabled on AMD: bundled amd-patched-mesa shadows the runtime's Mesa
- Dominant language
- No language data
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
> **Note on authorship:** this issue was investigated and written by **Claude**,
> Anthropic's AI coding assistant, and filed on my behalf. The diagnosis,
> measurements and the workaround below were produced and verified by Claude on
> my Steam Deck, and I am posting it under my account with my approval.
> Happy to run any follow-up test you want on real hardware.
**App:** Greenlight 2.4.2 (Flathub, `io.github.unknownskl.greenlight`, commit `ac4ded5c`)
**Runtime:** `org.freedesktop.Platform 25.08` with `GL.default` at **Mesa 26.1.6**
**Hardware:** Steam Deck LCD (AMD Custom GPU 0932, Van Gogh), SteamOS, host Mesa 25.3.0
## Summary
Greenlight runs with **all GPU acceleration disabled, including `video_decode`**,
so the xCloud/xHome stream is decoded on the CPU. The cause is in the packaging:
`/app/bin/run.sh` puts the bundled `amd-patched-mesa` driver directory first in
`LIBGL_DRIVERS_PATH`, and that Mesa is older than the runtime's. On a runtime
with Mesa >= 24.1 the driver fails to load and the GPU process exits at startup.
## Evidence
Defined in [`io.github.unknownskl.greenlight.yml`](https://github.com/flathub/io.github.unknownskl.greenlight/blob/master/io.github.unknownskl.greenlight.yml)
**line 69** (installed as `/app/bin/run.sh`):
```sh
export LIBGL_DRIVERS_PATH=/app/extralib/dri:/usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver:/usr/lib/x86_64-linux-gnu/GL/default/lib/dri/:${LIBGL_DRIVERS_PATH}
export LD_LIBRARY_PATH=/app/extralib:${LD_LIBRARY_PATH}
```
`/app/extralib` comes from [`Originalimoc/amd-patched-mesa`](https://github.com/Originalimoc/amd-patched-mesa)
(manifest line 56, commit `a70058baf35f`) and ships `libLLVM-16.0.6.so`
(manifest line 35), i.e. roughly Mesa 23.x, against `runtime-version: '25.08'`
(line 3). The runtime's
loader is Mesa 26.1.6 and requires the `DRI_Mesa` driver interface introduced in
Mesa 24.1, which the bundled `radeonsi_dri.so` does not export. Startup log
(only visible with `--log-level=3` removed):
```
did not find extension DRI_IMAGE_DRIVER version 1
did not find extension DRI_Mesa version 1
failed to load driver: radeonsi
did not find extension DRI_Mesa version 1
failed to load driver: swrast
ERROR:ui/gl/egl_util.cc:92] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
ERROR:ui/gl/gl_display.cc:673] Initialization of all (2) EGL display types failed.
ERROR:ui/ozone/common/gl_ozone_egl.cc:26] GLDisplayEGL::Initialize failed.
ERROR:components/viz/service/main/viz_main_impl.cc:190] Exiting GPU process due to errors during initialization
```
Note the bundled `swrast` fails too, so there is no software-GL fallback either.
Resulting state, via CDP `SystemInfo.getInfo`:
```
glRenderer = Disabled glVendor = Disabled vendorId = 0 deviceId = 0
2d_canvas disabled_software rasterization disabled_software
gpu_compositing disabled_software video_decode disabled_software
webgl disabled_off webgpu disabled_off
```
`chrome://gpu` reports this as "GPU access is disabled due to frequent crashes",
which is misleading: **nothing crashes.** The GPU process ran 589 s without a
restart in one observed session; it fails *initialisation* on every launch and
Chromium reports that the same way.
## Reproduction
1. Install from Flathub on an AMD system with a Mesa >= 24.1 runtime.
2. Launch without `--log-level=3` (the default `run.sh` path is enough to
reproduce the state; the flag only hides the log lines).
3. Open Settings -> Debug. It errors, because `debug()` in `background.js` does
`await app.getGPUInfo("complete")` and then reads `e.auxAttributes.glRenderer`,
which cannot be satisfied while GPU access is off.
4. Or attach to `--remote-debugging-port` and call `SystemInfo.getInfo`.
## Workaround (verified)
Bypass `run.sh` and let the runtime's Mesa provide the drivers:
```sh
exec /usr/bin/flatpak run --branch=stable --arch=x86_64 \
--command=zypak-wrapper.sh \
--env=LIBGL_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/GL/default/lib/dri \
--env=LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/GL/default/lib/dri \
io.github.unknownskl.greenlight /app/main/greenlight-desktop "$@"
```
After:
```
glRenderer ANGLE (AMD, AMD Custom GPU 0932 (radeonsi vangogh ACO), Mesa 26.1.6)
vendorId 4098 (0x1002) deviceId 5173
video_decode enabled gpu_compositing / rasterization / webgl / webgpu enabled
driver errors in the launch log: 0
```
`LD_LIBRARY_PATH=/app/extralib` must also be dropped — it contains the matching
old `libEGL_mesa`/`libGLX_mesa`, which reintroduce the mismatch.
Setting `LIBGL_DRIVERS_PATH` externally does **not** work as a user-side
workaround, because `run.sh` appends `${LIBGL_DRIVERS_PATH}` at the end, so the
bundled directory always wins.
## Suggested fix
Put the runtime's driver directory before `/app/extralib/dri` in `run.sh`, or
gate the bundled Mesa on the runtime's Mesa version.
**Question for the maintainer:** `amd-patched-mesa` is clearly deliberate, so
presumably it fixes something specific on AMD. Is it still needed against Mesa
26.x? If it is, it likely needs a rebase, since as shipped it disables GPU
acceleration entirely on this runtime rather than improving it.
---
*Investigated and drafted by Claude (Anthropic) on a Steam Deck LCD running
SteamOS, and filed on behalf of @burninater69. All before/after figures above
were measured on that device via the Chrome DevTools Protocol
(`SystemInfo.getInfo`) against Greenlight 2.4.2 from Flathub.*
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with io.github.unknownskl.greenlight.yml, especially manifest lines 3, 35, 56, and 69, and inspect the generated /app/bin/run.sh environment. Reproduce on an AMD system with the documented Mesa runtime and compare the launch logs and CDP SystemInfo.getInfo output. Done means the packaged app initializes its GPU process and reports enabled acceleration, including video_decode, without driver errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- build-system, desktop, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100