You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RPi 2b & RPi 3b crash after a while with kernel 5.10.31+ #4319
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.
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?
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.
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.
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?
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?
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?
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?
@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)
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.
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:
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.
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.
Activity
henkv1 commentedon May 5, 2021
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.
popcornmix commentedon May 5, 2021
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?
henkv1 commentedon May 5, 2021
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.
mripard commentedon May 7, 2021
I was seeing something similar due to a patch in #4302 that I fixed in #4313 , maybe it can help?
henkv1 commentedon May 7, 2021
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.
henkv1 commentedon May 8, 2021
Unfortunately #4313 did not fix the issue.
henkv1 commentedon May 10, 2021
I also tried 5.12.1, but it has the same issue. The system crashed when I switched on the TV.
mripard commentedon May 10, 2021
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?
henkv1 commentedon May 10, 2021
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?
mripard commentedon May 11, 2021
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?
henkv1 commentedon May 11, 2021
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?
henkv1 commentedon May 13, 2021
I am pretty sure this commit causes the crashes: e259821
I reverted it and haven't seen any crashes for two days now.
henkv1 commentedon May 18, 2021
I experienced another crash yesterday. So the issue is not fixed. It only occurs less frequent.
henkv1 commentedon Jun 3, 2021
@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)
mripard commentedon Jun 4, 2021
755b2c8 fixes a similar crash. Did you have it in your tree when you tested?
16 remaining items
henkv1 commentedon Jun 30, 2021
I compiled mripard@126af69
But both my Pi2b and Pi3b crash when the vc4 module is loaded.
henkv1 commentedon Jul 1, 2021
After I reverted #4418 , the module loads fine. So the patch breaks something.
mripard commentedon Jul 2, 2021
I just pushed a new version of #4418 that should fix both issues you were seeing
henkv1 commentedon Jul 3, 2021
@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.
pelwell commentedon Jul 3, 2021
Sure - the close was automatic because of the Fixes tag in the PR.
henkv1 commentedon Jul 4, 2021
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.
6by9 commentedon Jul 4, 2021
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
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:
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.
henkv1 commentedon Jul 4, 2021
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.
mripard commentedon Jul 5, 2021
The PR #4431 I just sent should address this
henkv1 commentedon Jul 5, 2021
Thank you, it looks like this fixes the issue
mripard commentedon Jul 6, 2021
Thanks for testing, and for your persistence, it's been very helpful :)
pelwell commentedon Jul 6, 2021
Yes, thank you @henkv1. The fixing patch (#4431) is in the latest rpi-update firmware release.