Fix the resume-from-sleep case
Was broken on Omarchy 3.8
This commit is contained in:
1 parent
2bca7a3f91
commit
07f52317a4
2 files changed
+21
-6
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
pkgname=intel-ipu7-camera
|
pkgname=intel-ipu7-camera
|
||||||
pkgver=1.0.3
|
pkgver=1.0.3
|
||||||
pkgrel=2
|
pkgrel=4
|
||||||
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,11 +2,21 @@
|
|||||||
|
|
||||||
# Handle camera service around suspend/resume.
|
# Handle camera service around suspend/resume.
|
||||||
#
|
#
|
||||||
# v4l2-relayd must be stopped before suspend to avoid GStreamer crashes,
|
# On resume the IPU7 firmware re-authenticates (CSE authenticate_run),
|
||||||
# then restarted after resume once the camera hardware is ready.
|
# but the ov08x40 sensor is not re-bound to the media-controller graph.
|
||||||
|
# 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.
|
||||||
#
|
#
|
||||||
# The post-resume restart uses systemd-run to avoid blocking the
|
# Workaround: after resume, unload + reload ov08x40 and intel_ipu7_isys
|
||||||
# password prompt while waiting for the camera to initialize.
|
# so isys re-probes the sensor via ipu_bridge.
|
||||||
|
#
|
||||||
|
# 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)
|
||||||
@@ -14,7 +24,12 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
post)
|
post)
|
||||||
systemd-run --no-block --unit=camera-resume bash -c '
|
systemd-run --no-block --unit=camera-resume bash -c '
|
||||||
systemctl restart camera-init.service 2>/dev/null
|
rmmod ov08x40 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
|
||||||
'
|
'
|
||||||
|
|||||||
Reference in new issue
Block a user