Skip to content

RPi 2b & RPi 3b crash after a while with kernel 5.10.31+ #4319

Description

@henkv1

Describe the bug
Since the upgrade to linux-raspberrypi version 5.10.31 and also 5.10.32 and 5.10.33, my Raspberry Pi 3b crashes after a while. I do not have this problem with kernel 5.10.27. I've also tried a Raspberry Pi 2b with the same config and it also crashes.
Sometimes the system crashes after an hour, sometimes after a day. It seems that the crashes occur randomly.

System

  • Which model of Raspberry Pi? Pi 2b and Pi 3b
  • Which OS and version: Arch Linux Arm, latest version
  • Which firmware version: version a48d332c35ee1c1c1ab433228e23317f62dcc5fb
  • Which kernel version: 5.10.31 and up

The system is connected to a TV (1920x1080) using HDMI. The TV is switched off most of the time.
The system is used as an wireless access point and sometimes Kodi is started.

Logs
I do not see anything in the logs. Also, when the system crashes, the TV output gives no signal.

Activity

  1. henkv1 commented on May 5, 2021

    @henkv1
    Author

    The crashes are caused by the new vc4 code.
    I've compiled kernel 5.10.33 with the old vc4 code from 5.10.27 and it is running stable now.

  2. popcornmix commented on May 5, 2021

    @popcornmix
    Collaborator

    What are the symptoms of the crash? Just display going blank? Does an ssh connection still work? Anything in dmesg?
    Are you saying it is this #4302 that causes the issue?

  3. henkv1 commented on May 5, 2021

    @henkv1
    Author

    The system stalls completely. The display goes blank and ssh is not working anymore. There is also nothing in the journald logs that relates to the crash.
    I will rebuild my kernel with #4302 to see if that causes the crashes.

  4. mripard commented on May 7, 2021

    @mripard
    Contributor

    I was seeing something similar due to a patch in #4302 that I fixed in #4313 , maybe it can help?

  5. henkv1 commented on May 7, 2021

    @henkv1
    Author

    It looks like #4302 indeed causes the crashes. I've compiled d62dee4 and experienced no crashes. After that I patched the source with #4302 and the system crashed after I turned on the tv (not every time though).
    I see that #4313 is merged, so I will try with the latest source.

  6. henkv1 commented on May 8, 2021

    @henkv1
    Author

    Unfortunately #4313 did not fix the issue.

  7. henkv1 commented on May 10, 2021

    @henkv1
    Author

    I also tried 5.12.1, but it has the same issue. The system crashed when I switched on the TV.

  8. mripard commented on May 10, 2021

    @mripard
    Contributor

    I'm sorry it didn't fix it, and thanks for testing. So if I understand well, it sits idle with a TV connected to it through HDMI. The TV is off most of the time, and the hang occurs when you turn the TV on?

  9. henkv1 commented on May 10, 2021

    @henkv1
    Author

    Yes, the TV is off most of the time while the RPi is on (it is used as an access point as well). The TV is switched on a couple of times a day.
    The system crashes sometimes when I turn on the TV, but not always. Normally, the system crashes within a day.
    Unfortunately the system is not accessible via SSH after the crash and the screen gives no signal. Is there any other way to debug this?

  10. mripard commented on May 11, 2021

    @mripard
    Contributor

    5.12.1 is weird too, since it doesn't have the content of #4302. I tried all afternoon to reproduce it on my TV with a 3B and 3B+ and couldn't reproduce it. Are you sure of the branch you tested with?

  11. henkv1 commented on May 11, 2021

    @henkv1
    Author

    I tried the rpi-5.12.y branch, which includes #4302 . For instance the 'drm/vc4: hdmi: Prevent clock unbalance' patch is committed in rpi-5.12.y in 482543f and in rpi-5.10.y in 981adc5

    Is there a specific patch in #4302 that could cause this issue, so I can try to revert it?

  12. henkv1 commented on May 13, 2021

    @henkv1
    Author

    I am pretty sure this commit causes the crashes: e259821
    I reverted it and haven't seen any crashes for two days now.

  13. henkv1 commented on May 18, 2021

    @henkv1
    Author

    I experienced another crash yesterday. So the issue is not fixed. It only occurs less frequent.

  14. henkv1 commented on Jun 3, 2021

    @henkv1
    Author

    @mripard , @popcornmix
    After some extensive testing I found out that the crashes were caused by this commit: 3cf3d39 (drm/vc4: Rework the encoder retrieval code)
    This commit is reverted in cbf1a95, so cbf1a95 does not have this issue.

    Unfortunately, the issue is re-introduced in 7416691 (drm/vc4: crtc: Fix vc4_get_crtc_encoder logic)

  15. mripard commented on Jun 4, 2021

    @mripard
    Contributor

    755b2c8 fixes a similar crash. Did you have it in your tree when you tested?

  16. 16 remaining items

  17. henkv1 commented on Jun 30, 2021

    @henkv1
    Author

    I compiled mripard@126af69
    But both my Pi2b and Pi3b crash when the vc4 module is loaded.

  18. henkv1 commented on Jul 1, 2021

    @henkv1
    Author

    After I reverted #4418 , the module loads fine. So the patch breaks something.

  19. mripard commented on Jul 2, 2021

    @mripard
    Contributor

    I just pushed a new version of #4418 that should fix both issues you were seeing

  20. henkv1 commented on Jul 3, 2021

    @henkv1
    Author

    @pelwell: please re-open this issue. The new version only makes it worse. The system now crashes as soon as I modprobe the vc4 module.

  21. pelwell commented on Jul 3, 2021

    @pelwell
    Contributor

    Sure - the close was automatic because of the Fixes tag in the PR.

  22. reopened this on Jul 3, 2021
  23. henkv1 commented on Jul 4, 2021

    @henkv1
    Author

    I found out what causes the crash: I had video=HDMI-A-1:1920x1080@60e in cmdline.txt. With this option, the system crashes as soon as the vc4 module is loaded. Without this option, the system works fine and the CEC issue is also solved.

  24. 6by9 commented on Jul 4, 2021

    @6by9
    Contributor

    Does your display not give you an EDID, or is 1920x1080@60 missing from it?

    If it isn't there, then adding your video= entry to cmdline.txt will add the GTF mode for 1920x1080@60 which is

    Modeline "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
    

    The maximum supported pixel clock for Pi0-3 is 162MHz, therefore that mode is invalid and pruned. Slightly annoyingly should that happen DRM doesn't discard the command line mode and just fails to set up the display. (It shouldn't actually crash, just doesn't enable the display).

    If you add the 'M' option to use CVT timings then it still exceeds the limit:

    Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    

    You need to select the CEA or DMT timings to support 1920x1080@60 with a pixel clock under 162MHz (CEA/DMT uses 148.5MHz), but AFAIK that can only be done via an EDID and not via the command line.

  25. henkv1 commented on Jul 4, 2021

    @henkv1
    Author

    The display gives an EDID, so the video= entry is not necessary. I used it to set the screen offset, but I removed that part some time ago. The entry worked before #4418 was merged and now the system crashes with it, so there must be some regression here.

  26. mripard commented on Jul 5, 2021

    @mripard
    Contributor

    The PR #4431 I just sent should address this

  27. henkv1 commented on Jul 5, 2021

    @henkv1
    Author

    Thank you, it looks like this fixes the issue

  28. mripard commented on Jul 6, 2021

    @mripard
    Contributor

    Thanks for testing, and for your persistence, it's been very helpful :)

  29. pelwell commented on Jul 6, 2021

    @pelwell
    Contributor

    Yes, thank you @henkv1. The fixing patch (#4431) is in the latest rpi-update firmware release.

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