11-14-2023, 02:25 AM
(11-13-2023, 11:01 AM)DrYak Wrote: Some people might be affected by some driver bug where the camera:
e.g.: that's the case when using application Shutter on SailfishOS.
- does works right after boot of the PinePhone Pro.
- But after suspend, the camera stops working.
The following trick forces reinitialising the hardware (as if the kernel is populating from device tree during a boot):
Code:echo ff920000.isp1 | sudo tee /sys/bus/platform/drivers/rkisp1/{unbind,bind}
Thank you.
I added script
/lib/systemd/system-sleep/90-restore-cam.sleep
on mobian. It seems to work well.
Code:
#!/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
case "$1" in
pre)
#code execution BEFORE sleeping/hibernating/suspending
;;
post)
#code execution AFTER resuming
echo ff920000.isp1 > /sys/bus/platform/drivers/rkisp1/unbind
echo ff920000.isp1 > /sys/bus/platform/drivers/rkisp1/bind
;;
esac
exit 0