From 09ef472bcb66266be949055dc2c4ad320579bbba Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 25 Sep 2026 19:44:33 -0400 Subject: [PATCH 1/4] Detect Hyprland software rendering from the GL renderer Carry a v0.56.2 backport of hyprwm/Hyprland#16343 so display-only KMS drivers paired with llvmpipe are classified as software rendering. Co-Authored-By: Claude Opus 5.5 (1M context) --- pkgbuilds/hyprland/PKGBUILD | 10 +++-- pkgbuilds/hyprland/software-renderer.patch | 49 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 pkgbuilds/hyprland/software-renderer.patch diff --git a/pkgbuilds/hyprland/PKGBUILD b/pkgbuilds/hyprland/PKGBUILD index cbb70ed..884e606 100644 --- a/pkgbuilds/hyprland/PKGBUILD +++ b/pkgbuilds/hyprland/PKGBUILD @@ -5,7 +5,7 @@ pkgname=(hyprland hyprpm) pkgver=0.56.2 -pkgrel=3 +pkgrel=4 pkgdesc='a highly customizable dynamic tiling Wayland compositor' arch=(aarch64) url="https://github.com/hyprwm/${pkgname^}" @@ -65,12 +65,16 @@ optdepends=('hyprpm: build and install plugins' 'xdg-desktop-portal-hyprland: xdg-desktop-portal backend for hyprland') provides=(wayland-compositor) _archive="${pkgname^}-$pkgver" -source=("$_archive.tar.gz::$url/releases/download/v$pkgver/source-v$pkgver.tar.gz") -sha256sums=('03ad3f5ef152ff44116ffd56fcf808486211ecabf4f0ba567108ee746ba5cd2e') +source=("$_archive.tar.gz::$url/releases/download/v$pkgver/source-v$pkgver.tar.gz" + software-renderer.patch) +sha256sums=('03ad3f5ef152ff44116ffd56fcf808486211ecabf4f0ba567108ee746ba5cd2e' + 'a703e36333087efdcd1ff9e077e039ba9020d26d20c8cfacc07192f3e7505f9e') prepare() { ln -sf hyprland-source "$_archive" cd "$_archive" + # Backport of hyprwm/Hyprland#16343; drop once the packaged release includes it + patch -Np1 --fuzz=0 -i "$srcdir/software-renderer.patch" sed -i -e '/^release:/{n;s/-D/-DCMAKE_SKIP_RPATH=ON -D/}' Makefile sed -i -e '/find_package.glaze/s/7...<8 //' {.,hyprpm,start}/CMakeLists.txt } diff --git a/pkgbuilds/hyprland/software-renderer.patch b/pkgbuilds/hyprland/software-renderer.patch new file mode 100644 index 0000000..fbb8d32 --- /dev/null +++ b/pkgbuilds/hyprland/software-renderer.patch @@ -0,0 +1,49 @@ +From: Scott Jones +Subject: [PATCH] render: detect software rendering from the GL renderer (0.56.2 backport) + +Backport-of: 61d0ff60a7547d49229714a68b7ca9c0b6658727 +Upstream-PR: https://github.com/hyprwm/Hyprland/pull/16343 +Co-authored-by: Eryk Wieliczko <44800858+erykwieliczko@users.noreply.github.com> + +Adapt constructor and logger-context differences against v0.56.2 while +preserving the original GL classification behavior. Remove this backport +once the packaged upstream version includes this behavior. + +--- a/src/render/GLRenderer.cpp ++++ b/src/render/GLRenderer.cpp +@@ -36,7 +36,14 @@ + #include + } + +-CHyprGLRenderer::CHyprGLRenderer() : IHyprRenderer(), m_elementRenderer(makeUnique()) {} ++CHyprGLRenderer::CHyprGLRenderer() : IHyprRenderer(), m_elementRenderer(makeUnique()) { ++ // KMS can be display-only; classify the active GL renderer instead of the DRM driver. ++ g_pHyprOpenGL->makeEGLCurrent(); ++ if (const auto* renderer = rc(glGetString(GL_RENDERER))) { ++ const std::string name{renderer}; ++ m_software = name.contains("llvmpipe") || name.contains("softpipe") || name.contains("Software Rasterizer"); ++ } ++} + + IHyprRenderer::eType CHyprGLRenderer::type() { + return RT_GL; +--- a/src/render/Renderer.cpp ++++ b/src/render/Renderer.cpp +@@ -104,8 +104,6 @@ + m_nvidia = true; + else if (name.contains("i915")) + m_intel = true; +- else if (name.contains("softpipe") || name.contains("Software Rasterizer") || name.contains("llvmpipe")) +- m_software = true; + + Log::logger->log(Log::DEBUG, "DRM driver information: {} v{}.{}.{} from {} description {}", name, DRMV->version_major, DRMV->version_minor, DRMV->version_patchlevel, + std::string{DRMV->date, DRMV->date_len}, std::string{DRMV->desc, DRMV->desc_len}); +@@ -126,8 +124,6 @@ + m_nvidia = true; + else if (name.contains("i915")) + m_intel = true; +- else if (name.contains("softpipe") || name.contains("Software Rasterizer") || name.contains("llvmpipe")) +- m_software = true; + + Log::logger->log(Log::DEBUG, "Primary DRM driver information: {} v{}.{}.{} from {} description {}", name, DRMV->version_major, DRMV->version_minor, + DRMV->version_patchlevel, std::string{DRMV->date, DRMV->date_len}, std::string{DRMV->desc, DRMV->desc_len}); From f7d4e94540a45b9046a88b7b9614ec982d2b492e Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 25 Sep 2026 21:31:24 -0400 Subject: [PATCH 2/4] Hold Hyprland upstream updates while carrying the #16343 backport Co-Authored-By: Claude Opus 5.5 (1M context) --- pkgbuilds/hyprland/.omarchy/package.json | 1 + pkgbuilds/hyprland/README.md | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 pkgbuilds/hyprland/README.md diff --git a/pkgbuilds/hyprland/.omarchy/package.json b/pkgbuilds/hyprland/.omarchy/package.json index 9dd9745..5ee99df 100644 --- a/pkgbuilds/hyprland/.omarchy/package.json +++ b/pkgbuilds/hyprland/.omarchy/package.json @@ -1,5 +1,6 @@ { "source": "local", + "sync": false, "release_ring": "fast", "upstream": { "git_tags": "https://github.com/hyprwm/Hyprland.git", diff --git a/pkgbuilds/hyprland/README.md b/pkgbuilds/hyprland/README.md new file mode 100644 index 0000000..7a252d8 --- /dev/null +++ b/pkgbuilds/hyprland/README.md @@ -0,0 +1,5 @@ +# Hyprland software-rendering backport + +Upstream version bumps are held (`sync: false`) while v0.56.2 carries [Hyprland #16343](https://github.com/hyprwm/Hyprland/pull/16343) as `software-renderer.patch`. `prepare()` applies that patch with `--fuzz=0`. Hyprland's `release_ring: fast` builds edge, rc, and stable from this recipe, so the version stays pinned until the backport is removed on purpose. Aquamarine changes still rebuild the package through `rebuild_on`. + +Remove `sync: false` and `software-renderer.patch` in the same change once the selected upstream release includes the #16343 behavior. Set `pkgver` to that release, then test software rendering and accelerated rendering before publishing. From 88629b46b5f91cbe2327ffc49a9fc57a0b607b87 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Sat, 26 Sep 2026 10:44:18 -0400 Subject: [PATCH 3/4] Match Hyprland software renderer names case-insensitively Refresh the #16343 backport to carry the upstream follow-up that matches llvmpipe/softpipe/Software Rasterizer with ASCII case-insensitive, string_view-based matching. Co-Authored-By: Claude Opus 5.5 (1M context) --- pkgbuilds/hyprland/PKGBUILD | 2 +- pkgbuilds/hyprland/software-renderer.patch | 41 ++++++++++++++++++---- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/pkgbuilds/hyprland/PKGBUILD b/pkgbuilds/hyprland/PKGBUILD index 884e606..c03e578 100644 --- a/pkgbuilds/hyprland/PKGBUILD +++ b/pkgbuilds/hyprland/PKGBUILD @@ -68,7 +68,7 @@ _archive="${pkgname^}-$pkgver" source=("$_archive.tar.gz::$url/releases/download/v$pkgver/source-v$pkgver.tar.gz" software-renderer.patch) sha256sums=('03ad3f5ef152ff44116ffd56fcf808486211ecabf4f0ba567108ee746ba5cd2e' - 'a703e36333087efdcd1ff9e077e039ba9020d26d20c8cfacc07192f3e7505f9e') + '380bb6d61c36d6c68bcccf242131f5b259734e8570ea39b3bc519b9ed137eddd') prepare() { ln -sf hyprland-source "$_archive" diff --git a/pkgbuilds/hyprland/software-renderer.patch b/pkgbuilds/hyprland/software-renderer.patch index fbb8d32..2b800de 100644 --- a/pkgbuilds/hyprland/software-renderer.patch +++ b/pkgbuilds/hyprland/software-renderer.patch @@ -2,26 +2,53 @@ From: Scott Jones Subject: [PATCH] render: detect software rendering from the GL renderer (0.56.2 backport) Backport-of: 61d0ff60a7547d49229714a68b7ca9c0b6658727 +Backport-of: c3dcabc15ba7b71bd1bcd880e9f543909dd9372d Upstream-PR: https://github.com/hyprwm/Hyprland/pull/16343 Co-authored-by: Eryk Wieliczko <44800858+erykwieliczko@users.noreply.github.com> Adapt constructor and logger-context differences against v0.56.2 while -preserving the original GL classification behavior. Remove this backport -once the packaged upstream version includes this behavior. +preserving the GL classification behavior. v0.56.2 has no +StringUtils.hpp, so the ASCII case-insensitive matcher lives as a +file-local helper in GLRenderer.cpp. Remove this backport once the +packaged upstream version includes this behavior. --- a/src/render/GLRenderer.cpp +++ b/src/render/GLRenderer.cpp -@@ -36,7 +36,14 @@ +@@ -22,6 +22,7 @@ + #include "./gl/GLTexture.hpp" + + #include ++#include + #include + #include + #include +@@ -36,7 +37,30 @@ extern "C" { #include } -CHyprGLRenderer::CHyprGLRenderer() : IHyprRenderer(), m_elementRenderer(makeUnique()) {} ++// Whether haystack contains needle, ignoring ASCII case only; all other bytes must match exactly. ++static bool containsCaseInsensitive(const std::string_view haystack, const std::string_view needle) { ++ const auto lower = [](const unsigned char c) { return c >= 'A' && c <= 'Z' ? c + ('a' - 'A') : c; }; ++ ++ for (size_t i = 0; i + needle.size() <= haystack.size(); ++i) { ++ size_t j = 0; ++ while (j < needle.size() && lower(haystack[i + j]) == lower(needle[j])) ++ ++j; ++ ++ if (j == needle.size()) ++ return true; ++ } ++ ++ return false; ++} ++ +CHyprGLRenderer::CHyprGLRenderer() : IHyprRenderer(), m_elementRenderer(makeUnique()) { + // KMS can be display-only; classify the active GL renderer instead of the DRM driver. + g_pHyprOpenGL->makeEGLCurrent(); + if (const auto* renderer = rc(glGetString(GL_RENDERER))) { -+ const std::string name{renderer}; -+ m_software = name.contains("llvmpipe") || name.contains("softpipe") || name.contains("Software Rasterizer"); ++ const std::string_view name{renderer}; ++ m_software = containsCaseInsensitive(name, "llvmpipe") || containsCaseInsensitive(name, "softpipe") || containsCaseInsensitive(name, "Software Rasterizer"); + } +} @@ -29,7 +56,7 @@ once the packaged upstream version includes this behavior. return RT_GL; --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp -@@ -104,8 +104,6 @@ +@@ -104,8 +104,6 @@ IHyprRenderer::IHyprRenderer() { m_nvidia = true; else if (name.contains("i915")) m_intel = true; @@ -38,7 +65,7 @@ once the packaged upstream version includes this behavior. Log::logger->log(Log::DEBUG, "DRM driver information: {} v{}.{}.{} from {} description {}", name, DRMV->version_major, DRMV->version_minor, DRMV->version_patchlevel, std::string{DRMV->date, DRMV->date_len}, std::string{DRMV->desc, DRMV->desc_len}); -@@ -126,8 +124,6 @@ +@@ -126,8 +124,6 @@ IHyprRenderer::IHyprRenderer() { m_nvidia = true; else if (name.contains("i915")) m_intel = true; From f6f0da2a9850790a185ba1392551bdf400a36a85 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Sat, 26 Sep 2026 23:44:18 -0400 Subject: [PATCH 4/4] Clarify Hyprland backport updates and rebuild scheduling --- pkgbuilds/hyprland/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgbuilds/hyprland/README.md b/pkgbuilds/hyprland/README.md index 7a252d8..a6a81c3 100644 --- a/pkgbuilds/hyprland/README.md +++ b/pkgbuilds/hyprland/README.md @@ -1,5 +1,7 @@ # Hyprland software-rendering backport -Upstream version bumps are held (`sync: false`) while v0.56.2 carries [Hyprland #16343](https://github.com/hyprwm/Hyprland/pull/16343) as `software-renderer.patch`. `prepare()` applies that patch with `--fuzz=0`. Hyprland's `release_ring: fast` builds edge, rc, and stable from this recipe, so the version stays pinned until the backport is removed on purpose. Aquamarine changes still rebuild the package through `rebuild_on`. +Automatic upstream version bumps are held (`sync: false`) while the packaged release carries [Hyprland #16343](https://github.com/hyprwm/Hyprland/pull/16343) as `software-renderer.patch`. `prepare()` applies that patch with `--fuzz=0`. Hyprland's `release_ring: fast` builds edge, rc, and stable from this recipe. Aquamarine changes in the official/ALARM repositories are checked by the separate six-hour `sync-rebuilds` job through `rebuild_on`, which proposes a package release bump for rebuilding. + +The hold does not require staying on v0.56.2 until #16343 lands. If a newer upstream release does not yet include the fix, update `pkgver`, rebase the patch and refresh its checksum, and test software rendering and accelerated rendering before publishing. Keep `sync: false` while the backport is needed. Remove `sync: false` and `software-renderer.patch` in the same change once the selected upstream release includes the #16343 behavior. Set `pkgver` to that release, then test software rendering and accelerated rendering before publishing.