Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkgbuilds/nvidia-open-dkms/.omarchy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"source": "local",
"channels": [
"edge"
]
}
37 changes: 37 additions & 0 deletions pkgbuilds/nvidia-open-dkms/0001-allow-unplugged-dp-detach.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From bd5d6119ca1ed030ad26d06d1b3e980873ff0336 Mon Sep 17 00:00:00 2001
From: Martin Stark <901824+martinstark@users.noreply.github.com>
Date: Sun, 13 Sep 2026 22:32:38 +0200
Subject: [PATCH 1/2] fix(displayport): allow detach when sink is unplugged

The HPD check in dpPreModeset() rejects detach-only requests after unplug. This skips DP library cleanup while NVKMS advances its head bookkeeping, leaving stale attached groups that can block subsequent link training.

Allow detach-only requests when HPD is low. Reject requests with an attachment target on any selected head, preserving the connector/discovery guards and forced-connected and dynamic-mux exceptions.
---
src/common/displayport/src/dp_connectorimpl.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/common/displayport/src/dp_connectorimpl.cpp b/src/common/displayport/src/dp_connectorimpl.cpp
index 99e0e97..7451e6c 100644
--- a/src/common/displayport/src/dp_connectorimpl.cpp
+++ b/src/common/displayport/src/dp_connectorimpl.cpp
@@ -3861,11 +3861,17 @@ void ConnectorImpl::dpPreModeset(const DpPreModesetParams &params)
return;
}

- // Skip gating modeset on HPD for DDS panels
+ // Allow detach bookkeeping even when HPD is low.
if(!previousPlugged && !bClientForcedConnected && !main->isInternalPanelDynamicMuxCapable())
{
- DP_ASSERT(0 && "DPCONN> dpPreModeset called when Plugged State is false!");
- return;
+ for (NvU32 i = 0; i < NV_MAX_HEADS; i++)
+ {
+ if ((params.headMask & NVBIT(i)) && params.head[i].pTarget != NULL)
+ {
+ DP_ASSERT(0 && "DPCONN> dpPreModeset attach called when Plugged State is false!");
+ return;
+ }
+ }
}

this->bFECEnable |= this->needToEnableFEC(params);
23 changes: 23 additions & 0 deletions pkgbuilds/nvidia-open-dkms/0002-clarify-unplugged-dp-detach.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From a2e8b26b20dfb6f2fa3cb8985e3f1126cba38aae Mon Sep 17 00:00:00 2001
From: Martin Stark <901824+martinstark@users.noreply.github.com>
Date: Mon, 14 Sep 2026 10:43:16 +0200
Subject: [PATCH 2/2] Clarify DDS exception and unplugged detach bookkeeping

---
src/common/displayport/src/dp_connectorimpl.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/common/displayport/src/dp_connectorimpl.cpp b/src/common/displayport/src/dp_connectorimpl.cpp
index 7451e6c..0e81070 100644
--- a/src/common/displayport/src/dp_connectorimpl.cpp
+++ b/src/common/displayport/src/dp_connectorimpl.cpp
@@ -3861,7 +3861,8 @@ void ConnectorImpl::dpPreModeset(const DpPreModesetParams &params)
return;
}

- // Allow detach bookkeeping even when HPD is low.
+ // Skip gating modeset on HPD for DDS panels.
+ // Allow HPD-low detach bookkeeping; notifyLongPulse() permits detach.
if(!previousPlugged && !bClientForcedConnected && !main->isInternalPanelDynamicMuxCapable())
{
for (NvU32 i = 0; i < NV_MAX_HEADS; i++)
12 changes: 12 additions & 0 deletions pkgbuilds/nvidia-open-dkms/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Copyright Arch Linux Contributors

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
74 changes: 74 additions & 0 deletions pkgbuilds/nvidia-open-dkms/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Maintainer: Peter Jung <ptr1337@archlinux.org>
# Contributor: James Rayner <iphitus@gmail.com>
# Contributor: Vasiliy Stelmachenok <ventureo@yandex.ru>
# Contributor: Thomas Baechler <thomas@archlinux.org>

# ARM-only carry of NVIDIA/open-gpu-kernel-modules#1359 by Martin Stark.
# Remove this overlay after a fixed Arch Linux ARM driver is validated.
pkgname=nvidia-open-dkms
pkgver=615.71.09
pkgrel=1.2
pkgdesc="NVIDIA open kernel modules - module sources"
arch=('aarch64')
url="https://www.nvidia.com/"
license=('MIT AND GPL-2.0-only')
depends=('dkms' "nvidia-utils=$pkgver")
conflicts=('nvidia-open' 'NVIDIA-MODULE')
provides=('nvidia-open' 'NVIDIA-MODULE' 'nvidia-dkms')
replaces=('nvidia-dkms')
options=('!strip')
_pkg_open="NVIDIA-kernel-module-source-${pkgver}"
source=("https://download.nvidia.com/XFree86/NVIDIA-kernel-module-source/${_pkg_open}.tar.xz"
'0001-allow-unplugged-dp-detach.patch'
'0002-clarify-unplugged-dp-detach.patch')
sha512sums=('0b32c1aaa5ed261bdee7232d5e5d293e53c42ac9896f49c4be4e6b9b6bce1370cb69a7f7fde5531a7537d5e925d651c36bcb512a2f827c2d2cb26ede33f7c057'
'48f802423399ce84a430b7accf10ea50847ea3fafcfe251e3bad2f741af9ca2162408a3109eb3c9fcdbe35ec35154a3dbcc8fe457ed617487c009abf2c9fc89a'
'a3ff65cb58d72815b272726c38d45148dfba73ea2a0d88672960d8f706c74e7c2b40ec599783acec46ba18433af45f38547a09b2caa985bd71895a64780c00da')

prepare() {
# Attempt to make builds reproducible
sed -i "s/^ HOSTNAME.*/ HOSTNAME = echo archlinux/" "${srcdir}/${_pkg_open}/utils.mk"
sed -i "s/^WHOAMI.*/WHOAMI = echo archlinux-builder/" "${srcdir}/${_pkg_open}/utils.mk"
sed -i "s/^DATE.*/DATE = date -r version.mk/" "${srcdir}/${_pkg_open}/utils.mk"

for conf in "${srcdir}/${_pkg_open}/kernel-open/dkms.conf"; do
sed -i "s/__VERSION_STRING/${pkgver}/" "$conf"
sed -i 's/__JOBS/`nproc`/' "$conf"
sed -i 's/__EXCLUDE_MODULES//' "$conf"
sed -i 's/__DKMS_MODULES//' "$conf"
sed -i 's/NV_EXCLUDE_BUILD_MODULES/IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES/' "$conf"
sed -i '$i\
BUILT_MODULE_NAME[0]="nvidia"\
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
BUILT_MODULE_NAME[1]="nvidia-uvm"\
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
BUILT_MODULE_NAME[2]="nvidia-modeset"\
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
BUILT_MODULE_NAME[3]="nvidia-drm"\
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"\
BUILT_MODULE_NAME[4]="nvidia-peermem"\
DEST_MODULE_LOCATION[4]="/kernel/drivers/video"' "$conf"
done

# Additional parameters for open kernel modules
cat <<EOF >>"${srcdir}/${_pkg_open}/kernel-open/dkms.conf"
BUILT_MODULE_LOCATION[0]="kernel-open"
BUILT_MODULE_LOCATION[1]="kernel-open"
BUILT_MODULE_LOCATION[2]="kernel-open"
BUILT_MODULE_LOCATION[3]="kernel-open"
BUILT_MODULE_LOCATION[4]="kernel-open"
EOF

# Exact PR head a2e8b26b20dfb6f2fa3cb8985e3f1126cba38aae.
cd "${srcdir}/${_pkg_open}"
patch --batch --fuzz=0 -p1 < "$srcdir/0001-allow-unplugged-dp-detach.patch"
patch --batch --fuzz=0 -p1 < "$srcdir/0002-clarify-unplugged-dp-detach.patch"
}

package() {
install -dm755 "$pkgdir/usr/src"
cp -dr --no-preserve=ownership "$srcdir/$_pkg_open" "$pkgdir/usr/src/nvidia-$pkgver"
mv "$pkgdir/usr/src/nvidia-$pkgver/kernel-open/dkms.conf" "$pkgdir/usr/src/nvidia-$pkgver/dkms.conf"
install -Dm644 "$srcdir/$_pkg_open/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
13 changes: 13 additions & 0 deletions pkgbuilds/nvidia-open-dkms/README.package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# NVIDIA ARM DisplayPort detach fix

ARM-only edge package carrying Martin Stark's pending
[NVIDIA PR #1359](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/1359)
to fix DisplayPort disconnect cleanup in 615.71.09. Based on
[Arch's DKMS recipe](https://gitlab.archlinux.org/archlinux/packaging/packages/nvidia-utils/-/commit/f9ae10b379f8b1d0832ec92bca1c12072aa123e9).

Requires `[omarchy]` before `[extra]` and matching `nvidia-utils=615.71.09`.
Update both NVIDIA packages together; automatic version tracking is disabled.

Remove this recipe and the published package/database entry once a fixed
Arch Linux ARM driver is validated. A stale package in the earlier repository
can block driver updates.
Loading