Back/World camera working after suspend
#1
Some people might be affected by some driver bug where the camera:
  • does works right after boot of the PinePhone Pro.
  • But after suspend, the camera stops working.
e.g.: that's the case when using application Shutter on SailfishOS.

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}
  Reply
#2
(11-13-2023, 11:01 AM)DrYak Wrote: Some people might be affected by some driver bug where the camera:
  • does works right after boot of the PinePhone Pro.
  • But after suspend, the camera stops working.
e.g.: that's the case when using application Shutter on SailfishOS.

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
  Reply
#3
(11-14-2023, 02:25 AM)u-kidjp Wrote: I added script
/lib/systemd/system-sleep/90-restore-cam.sleep

That's a very cool solution! ?


(Sadly in the case of SailfishOS that doesn't work. Apparently the solution for suspend used there doesn't run those scripts Undecided ).

@megous : Is there a way that you could do this in a "cannocial" way in the driver code ?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Manjaro as shipped & camera? hambonius 1 809 06-20-2023, 02:26 PM
Last Post: fxc
  Netfilter not working on latest manjaro kernel robocone 1 1,083 12-29-2022, 09:11 PM
Last Post: robocone
  Megapixels - Camera App - Works w. Beta NOT Pro iwm 3 2,801 11-01-2022, 02:13 PM
Last Post: mburns
  Monjaro Plasma Cell Network and Data not working properly maiyuzhe 2 1,438 09-24-2022, 12:15 AM
Last Post: maiyuzhe
  Suspend audio issue kmsgli 4 2,770 08-03-2022, 04:11 PM
Last Post: Subsentient
  Manjaro 5.17.5-1 Keyboard stopped working Yst 7 3,663 06-09-2022, 11:12 AM
Last Post: graphicpanda444
  Plasma Mobile navigation bar scaling is not working Yst 0 761 05-09-2022, 05:10 AM
Last Post: Yst
  Modem turns off on suspend twzorek95 5 2,951 05-06-2022, 01:51 PM
Last Post: ertizpau
  Convergence Working on PPP? joshndroid 3 2,270 04-27-2022, 01:30 PM
Last Post: TheBlindEarthican
  tow-boot: suspend stopped working maltee 3 2,091 03-30-2022, 10:43 AM
Last Post: brb78

Forum Jump:


Users browsing this thread: 1 Guest(s)