stefanpartheym / archlinux-ipu6-webcam

Easy installation for patched Intel IPU6 camera drivers
133 stars 14 forks source link

Hibernate workaround breaks camera on wake up #31

Closed zemen closed 4 months ago

zemen commented 11 months ago

I tried to install the driver with ./install.sh -as on Thinkpad carbon X1 gen 10. The workaround indeed helps to wake up without freeze after hibernation, then driver loads and there are no errors in journal. However neither gstreamer nor v4l2-relayd doesn't work until next reboot.

Another issue I found is that suspend(which is triggered on my laptop on lid close) is not supported in workaround.

alvinpeters commented 11 months ago

that's odd. that worked fine for me. prolly because Intel pushed some new stuff. checking this morning.

alvinpeters commented 11 months ago

seeing that intel has pushed the newer branches into main that has the i2c_ljca fix. I am kinda optimistic that the hibernation hack is no longer needed. Doing some testing then making a PR. Give me around 5 hours lol

Also, if you mean that you can't wake up from just suspend. I don't know what broke it since it always works on s2idle suspend at least.

Edit: They haven't fixed hibernation :(

alvinpeters commented 10 months ago

@zemen can you give me the output of cat /sys/power/mem_sleep? My XPS 13 Plus is suspending as [s2idle] and can't use any other options so wondering what you have.

Also, the camera is working fine after a hibernation for me without modifications to the script. I doubt this will work but can you remove the post stage from the hibernation script? The workaround should look like this:

stage=$1
op=$2

case $stage in
  pre)
    case $op in
      hibernate|hybrid-sleep)
        /usr/bin/modprobe -r i2c_ljca
        ;;
      suspend-then-hibernate)
        [ "$SYSTEMD_SLEEP_ACTION" = "hibernate" ] && /usr/bin/modprobe -r i2c_ljca
        ;;
    esac
    ;;
esac
alvinpeters commented 10 months ago

Wait, I just reread the original issue on ivsc-driver again. It might turn out that you are having the literally same issue as this https://github.com/intel/ivsc-driver/issues/32#issuecomment-1589730406 . Go check it out and see if the logs match or something @zemen

alba4k commented 7 months ago

Works perfectly for me. After waking up, the camera doesn't work for a couple of seconds (which is expected as the modules are still being loaded by the workaround). Then the led flashes for about half a second and the camera starts working again.

stefanpartheym commented 4 months ago

I'll close this one now du to inactivity and it seems to work for other people. @zemen Please consider reopening, if necessary.