Skip to content

Motion not working after firmware upgrade. #1055

Closed

Description

@ifermon

This release (d4945b3b77d29cc5bb3777734422c048c1f1d003 ) broke motion for me. Got kernel panics. Motion stated in the grey screen (video served on 8080) that it was unable to open device (/dev/video0). Validated that device existed and motion log did not mention issues with device, it said that it was unable to use the video format (8). Running rasbian on an un-overclocked (non-overclocked?) rPi v2. Everything updated / upgraded. Using the pi camera module. Rolled back and everything worked fine, but I'm happy to roll back forward to break it again and do some debugging, just let me know if I can help. Rolled back to 19debde. Apologies if this is the wrong place to put this.

Activity

  1. 6by9 commented on Jul 10, 2015

    @6by9
    Contributor

    Please provide logs of the kernel panic text.
    Motion can be a pain to set up, so it would be useful to avoid wasting time having to try to get it running before getting anything useful.

  2. 6by9 commented on Jul 11, 2015

    @6by9
    Contributor

    @pelwell This is likely to be linked to the VCHIQ changes :-(

  3. popcornmix commented on Jul 11, 2015

    @popcornmix
    Collaborator

    @ifermon I believe this update included vchiq changes to both kernel and firmware.
    Can you test with latest kernel, but previous firmware?
    (e.g. update to latest firmware, then overwrite start*.elf and fixup*.dat from the previous firmware)
    That will narrow down the issue to gpu firmware or kernel.

  4. ifermon commented on Jul 11, 2015

    @ifermon
    Author

    I will do that. It will have to wait until Monday.
    On Sat, Jul 11, 2015 at 11:04 AM popcornmix notifications-at-github.com
    |github-ifermon| 3zaiib4g4t@sneakemail.com wrote:

    @ifermon https://github.com/ifermon I believe this update included
    vchiq changes to both kernel and firmware.
    Can you test with latest kernel, but previous firmware?
    (e.g. update to latest firmware, then overwrite start_.elf and fixup_.dat
    from the previous firmware)
    That will narrow down the issue to gpu firmware or kernel.

    —
    Reply to this email directly or view it on GitHub
    #1055 (comment)..

  5. 6by9 commented on Jul 12, 2015

    @6by9
    Contributor

    I'm not sure whether reverting just the firmware will help too much. Phil's commit text on 5d5a5ce says that the firmware added a DT entry to say that it supported the new mechanism, and the kernel changes only activated if it found this.
    It might exclude a silly error, but not sure it will really narrow down the issue.

    The V4L2 driver does some flushing itself, so it's possible that is interfering with the new flushing. Not convinced though as the logs quoted on https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=62364&start=350#p787559 appear to show it being the setup phase failing (no reports of kernel panics).
    I'll try to do some testing this afternoon/evening. Seeing whether the steps in the first entry of https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=62364 work for basic capturing would be a start.

  6. 6by9 commented on Jul 13, 2015

    @6by9
    Contributor

    Just reproduced. HEAD/d4945b3 fails, but 19debde is OK, so it does look like the VCHIQ change.

    Setting up the driver with v4l2-ctl -v width=1280,height=720,pixelformat=YU12 works fine, but starting streaming with v4l2-ctl --stream-mmap=3 --stream-count=100 --stream-to=/dev/null has caused a kernel oops due to a paging request. Call stack is showing it in ieee80211_phy0: rt2x00usb_vendor_request (yes, I'm using wifi), but I suspect it's a memory trample.
    The system does recover though on ctrl-C, though throws the videobuf2_core warning due to not cleaning up all buffers properly (issue already logged, but not had a chance to investigate).

    I will try with the previous firmware and current kernel, but as I commented above, I think that will just disable the kernel changes.
    Testing raspistillyuv may also be useful as that will start throwing around large buffers via bulk receives, so I'll give that a go.

    edit: MMAL is wedged after the kernel oops. Will check with the debugger what has happened there.

  7. popcornmix commented on Jul 13, 2015

    @popcornmix
    Collaborator

    There were actual vchiq changes to firmware, as well as the DT changes.
    So using latest firmware without latest kernel may be a valid test.

  8. 6by9 commented on Jul 13, 2015

    @6by9
    Contributor

    Yup. I'm just looking at the diffs to see what changed and how messy latest firmware with old kernel could be.
    Sounds like a rogue memcpy at the moment though, at a guess on fully aligned transfers (original issue was with H264 which are random length transfers. YU12 will be nicely aligned)

  9. 6by9 commented on Jul 13, 2015

    @6by9
    Contributor

    Not got any further in testing this, and need to work on something else again now.
    raspiyuv seems happy at 640x480, so alignment may be a red herring.

  10. pelwell commented on Jul 13, 2015

    @pelwell
    Contributor

    I'm just finishing up another issue, so I can pick this up.

  11. ifermon commented on Jul 13, 2015

    @ifermon
    Author

    At this point, is there anything I can do to help? It sounds like you've already been able to recreate the issue. I'd like to help, but my C skills are weak at best. No way could I find a memory leak in a driver. But if you want me to do some other tests or get some logs then please let me know. I'd also be happy to test a fix - I can do builds.

  12. pelwell commented on Jul 13, 2015

    @pelwell
    Contributor

    Thanks for the offer, but with a reliable way to reproduce this (6by9's v4l2-ctl command) it shouldn't take long to fix.

  13. 162 remaining items

  14. added a commit that references this issue on Feb 6, 2017
  15. added a commit that references this issue on Feb 15, 2017
  16. added a commit that references this issue on Mar 23, 2017
  17. added a commit that references this issue on Sep 20, 2017
  18. added a commit that references this issue on Oct 19, 2017
  19. added a commit that references this issue on Nov 6, 2017
  20. added a commit that references this issue on Feb 6, 2018
  21. added a commit that references this issue on Oct 11, 2018
  22. added a commit that references this issue on Jun 26, 2020
  23. added a commit that references this issue on May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions