This repository has been archived on 2026-10-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
omarchy-pkgs/pkgbuilds/edge/intel-ipu7-camera/camera-sleep-hook
T
GaggeryandGitHub e3ed6931a0 Merge pull request #67 from TsaiGaggery/fix-camera-v4l2-relayd-v2
intel-ipu7-camera: v4l2-relayd with OBS and Zoom fixes
2026-04-01 14:18:47 +02:00

24 lines
709 B
Bash

#!/bin/bash
# Handle camera service around suspend/resume.
#
# v4l2-relayd must be stopped before suspend to avoid GStreamer crashes,
# then restarted after resume once the camera hardware is ready.
#
# The post-resume restart uses systemd-run to avoid blocking the
# password prompt while waiting for the camera to initialize.
case "$1" in
pre)
systemctl stop v4l2-relayd@ipu7.service 2>/dev/null || true
;;
post)
systemd-run --no-block --unit=camera-resume bash -c '
systemctl restart camera-init.service 2>/dev/null
systemctl reset-failed v4l2-relayd@ipu7.service 2>/dev/null || true
systemctl start v4l2-relayd@ipu7.service 2>/dev/null || true
'
;;
esac
exit 0