Fix: intl-ipu7-camera resume hook (#110)
* Fix IPU7 camera resume hook * Fix v4l2-relayd optional splash source * Bump version to 1.0.4 and reset pkgrel --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
co-authored by
David Heinemeier Hansson
parent
af1f1dff80
commit
792206539a
@@ -1,8 +1,8 @@
|
|||||||
# Maintainer: Omarchy <packages@omarchy.org>
|
# Maintainer: Omarchy <packages@omarchy.org>
|
||||||
|
|
||||||
pkgname=intel-ipu7-camera
|
pkgname=intel-ipu7-camera
|
||||||
pkgver=1.0.3
|
pkgver=1.0.4
|
||||||
pkgrel=4
|
pkgrel=1
|
||||||
pkgdesc="Intel IPU7 MIPI camera stack for Hurrican/Performance (OV08X40 + hardware ISP)"
|
pkgdesc="Intel IPU7 MIPI camera stack for Hurrican/Performance (OV08X40 + hardware ISP)"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://github.com/TsaiGaggery/hurrican_omarchy_enabling"
|
url="https://github.com/TsaiGaggery/hurrican_omarchy_enabling"
|
||||||
|
|||||||
@@ -2,21 +2,12 @@
|
|||||||
|
|
||||||
# Handle camera service around suspend/resume.
|
# Handle camera service around suspend/resume.
|
||||||
#
|
#
|
||||||
# On resume the IPU7 firmware re-authenticates (CSE authenticate_run),
|
# v4l2-relayd must be stopped before suspend to avoid GStreamer crashes,
|
||||||
# but the ov08x40 sensor is not re-bound to the media-controller graph.
|
# then restarted after resume once the camera hardware is ready.
|
||||||
# libcamhal then reports "No sensors available", icamerasrc fails to
|
|
||||||
# register properties, and /dev/video50 stays empty — the camera looks
|
|
||||||
# dead to every app until reboot.
|
|
||||||
#
|
#
|
||||||
# Workaround: after resume, unload + reload ov08x40 and intel_ipu7_isys
|
# Avoid unloading/reloading IPU7 kernel modules from the sleep hook. Module
|
||||||
# so isys re-probes the sensor via ipu_bridge.
|
# reprobe during resume can hit fragile kernel PM paths and make wake less
|
||||||
#
|
# reliable than a recoverable camera failure.
|
||||||
# DO NOT unload intel_ipu7_isys pre-suspend: s2idle wake requires the
|
|
||||||
# IPU7 driver to be attached, and unloading it before suspend hangs the
|
|
||||||
# machine on wake.
|
|
||||||
#
|
|
||||||
# The post-resume work runs via systemd-run so it doesn't block the
|
|
||||||
# lock-screen password prompt while modules settle.
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
pre)
|
pre)
|
||||||
@@ -24,12 +15,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
post)
|
post)
|
||||||
systemd-run --no-block --unit=camera-resume bash -c '
|
systemd-run --no-block --unit=camera-resume bash -c '
|
||||||
rmmod ov08x40 2>/dev/null || true
|
systemctl restart camera-init.service 2>/dev/null || true
|
||||||
rmmod intel_ipu7_isys 2>/dev/null || true
|
|
||||||
sleep 1
|
|
||||||
modprobe intel_ipu7_isys 2>/dev/null
|
|
||||||
sleep 1
|
|
||||||
modprobe ov08x40 2>/dev/null
|
|
||||||
systemctl reset-failed v4l2-relayd@ipu7.service 2>/dev/null || true
|
systemctl reset-failed v4l2-relayd@ipu7.service 2>/dev/null || true
|
||||||
systemctl start v4l2-relayd@ipu7.service 2>/dev/null || true
|
systemctl start v4l2-relayd@ipu7.service 2>/dev/null || true
|
||||||
'
|
'
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- data/systemd/v4l2-relayd@.service.orig 2026-06-15 12:00:00.000000000 -0500
|
||||||
|
+++ data/systemd/v4l2-relayd@.service 2026-06-15 12:00:00.000000000 -0500
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
ExecCondition=/usr/bin/test -n "$HEIGHT"
|
||||||
|
ExecCondition=/usr/bin/test -n "$FRAMERATE"
|
||||||
|
ExecCondition=/usr/bin/test -n "${CARD_LABEL}"
|
||||||
|
-ExecStart=/bin/sh -c 'DEVICE=$(grep -l -m1 -E "^${CARD_LABEL}$" /sys/devices/virtual/video4linux/*/name | cut -d/ -f6); exec /usr/bin/v4l2-relayd -i "${VIDEOSRC}" $${SPLASHSRC:+-s "${SPLASHSRC}"} -o "appsrc name=appsrc caps=video/x-raw,format=${FORMAT},width=${WIDTH},height=${HEIGHT},framerate=${FRAMERATE} ! videoconvert ! v4l2sink name=v4l2sink device=/dev/$${DEVICE}" $EXTRA_OPTS'
|
||||||
|
+ExecStart=/bin/sh -c 'DEVICE=$(grep -l -m1 -E "^${CARD_LABEL}$" /sys/devices/virtual/video4linux/*/name | cut -d/ -f6); exec /usr/bin/v4l2-relayd -i "${VIDEOSRC}" $${SPLASHSRC:+-s "$${SPLASHSRC}"} -o "appsrc name=appsrc caps=video/x-raw,format=${FORMAT},width=${WIDTH},height=${HEIGHT},framerate=${FRAMERATE} ! videoconvert ! v4l2sink name=v4l2sink device=/dev/$${DEVICE}" $EXTRA_OPTS'
|
||||||
|
Restart=always
|
||||||
|
PrivateNetwork=yes
|
||||||
|
PrivateTmp=yes
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
pkgname=v4l2-relayd
|
pkgname=v4l2-relayd
|
||||||
pkgver=0.2.0
|
pkgver=0.2.0
|
||||||
pkgrel=2.1
|
pkgrel=2.2
|
||||||
pkgdesc="Plays gstreamer sources into v4l2loopback devices."
|
pkgdesc="Plays gstreamer sources into v4l2loopback devices."
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://gitlab.com/vicamo/v4l2-relayd"
|
url="https://gitlab.com/vicamo/v4l2-relayd"
|
||||||
@@ -16,13 +16,16 @@ depends=(
|
|||||||
)
|
)
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
source=("https://gitlab.com/vicamo/v4l2-relayd/-/archive/upstream/${pkgver}/v4l2-relayd-upstream-${pkgver}.tar.gz"
|
source=("https://gitlab.com/vicamo/v4l2-relayd/-/archive/upstream/${pkgver}/v4l2-relayd-upstream-${pkgver}.tar.gz"
|
||||||
"0001-reset-output-on-idle.patch")
|
"0001-reset-output-on-idle.patch"
|
||||||
|
"0002-escape-optional-splashsrc-expansion.patch")
|
||||||
sha256sums=('0c063edf18dcc6edcdef46e695128cfc2b2d60964ea8538c7e79a2454310c53d'
|
sha256sums=('0c063edf18dcc6edcdef46e695128cfc2b2d60964ea8538c7e79a2454310c53d'
|
||||||
|
'SKIP'
|
||||||
'SKIP')
|
'SKIP')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "$srcdir/${pkgname}-upstream-${pkgver}"
|
cd "$srcdir/${pkgname}-upstream-${pkgver}"
|
||||||
patch -p0 < "$srcdir/0001-reset-output-on-idle.patch"
|
patch -p0 < "$srcdir/0001-reset-output-on-idle.patch"
|
||||||
|
patch -p0 < "$srcdir/0002-escape-optional-splashsrc-expansion.patch"
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|||||||
Reference in New Issue
Block a user