Skip to content

GPU desktop: GTK's Vulkan renderer, and zram of twice the RAM - #148

Merged
henrikklee merged 2 commits into
OrchardLinux:mainfrom
ricktav:a7/gtk-vulkan-zram
Dec 1, 2026
Merged

henrikklee merged 2 commits into
OrchardLinux:mainfrom
ricktav:a7/gtk-vulkan-zram

Conversation

@ricktav

@ricktav ricktav commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Two session settings that the A7 GPU desktop (iPad Air, J71) needs, found while getting Web and Firefox to render on its GPU (OrchardLinux/mesa#25).

GSK_RENDERER=vulkan on the GPU desktop

GTK 4.24 takes its Vulkan renderer only when the Vulkan driver offers a dma-buf modifier other than LINEAR. The A7's driver offers LINEAR alone, so GTK fell back to its GL renderer on Zink, which on the A7 draws text twice and WebKit's pages not at all: Web showed an empty window. With GSK_RENDERER=vulkan Web renders Wikipedia on the GPU.

login-session puts it in the GPU desktop's environment on every board (orchard's rule: untested is no reason for an opt-in). Where a driver offers other modifiers, GTK takes Vulkan already, so nothing changes there; the software desktop leaves GTK's choice. A new test in tests/test_gpu_video_session.py checks both; it fails without the change.

zram: twice the RAM, at most 4 GB

zram-size = ram becomes min(ram * 2, 4096). On the 1 GB iPad Air, Firefox filled a RAM-sized zram (zstd keeps about 5:1 there) and systemd-oomd killed it at its 80% swap limit. With twice the RAM it runs; that was tested on the J71 with a second RAM-sized zram device. zram-generator sizes it 1864 MB on 1 GB, 3818 MB on 2 GB and 4096 MB on 4 GB (checked with the generator against a fake root). A 4 GB tablet keeps what it had.

Testing

Changelog (proposed, not added)

Under Unreleased: "iPad Air: Web and Firefox draw on the GPU, and Firefox no longer gets closed for lack of memory."

🤖 Generated with Claude Code

https://claude.ai/code/session_01SFMaVcR5gEPcdDR8wQfiDP

On the iPad Air (A7) the GPU desktop ran Web with an empty window. GTK 4
takes its Vulkan renderer only when the driver offers a dma-buf modifier
other than LINEAR; the A7's Vulkan driver offers LINEAR alone, so GTK fell
back to its GL renderer on Zink, which draws text twice and WebKit's pages
not at all. With GSK_RENDERER=vulkan Web renders on the GPU. The session
sets it on the A7 only (its GPU's device-tree compatible), where it was
tested; other GPUs keep GTK's own choice.

zram goes from the RAM's size to twice it, at most 4 GB. On the 1 GB iPad
Air, Firefox filled a RAM-sized zram (zstd keeps about 5:1) and
systemd-oomd killed it at 80% swap use; with twice the RAM it runs.
zram-generator sizes it 1864 MB on 1 GB, 3818 MB on 2 GB, 4096 MB on 4 GB.

Assisted-by: LLM
GSK_RENDERER=vulkan was set on the A7 only, as the board it was tested
on; untested is no reason for an opt-in. Set it in the GPU desktop's
environment for every board: where the Vulkan driver offers a modifier
other than LINEAR, GTK takes its Vulkan renderer already; where it
offers LINEAR alone, as on the A7, GTK's GL renderer on Zink drew text
twice and WebKit's pages not at all. The software desktop leaves GTK's
choice.

Assisted-by: LLM
@ricktav ricktav changed the title A7: GTK's Vulkan renderer, and zram of twice the RAM GPU desktop: GTK's Vulkan renderer, and zram of twice the RAM Nov 30, 2026
@ricktav
ricktav marked this pull request as ready for review December 1, 2026 10:46
@henrikklee
henrikklee merged commit 6598098 into OrchardLinux:main Dec 1, 2026
10 checks passed
@henrikklee

Copy link
Copy Markdown
Contributor

Merged, thank you! GTK on Vulkan and the larger zram go out with the next nightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants