Random system halt/crash with Ubuntu 20.04 on Raspberry Pi 4

I installed Ubuntu 20.04 with Xfce4 DE (xubuntu-desktop) on a Raspberry Pi 4 4GB.

System runs good but randomly it shutdowns/halts, I don't known exactly what happens because I use it as headless server and connect via SSH or VNC. When I can't connect to it, I go where the Pi is and I find it with both leds (activity and power) off. There is a little fan connected to +3.3 V pin of GPIO for cooling and it is on...

I'm sure there aren't hardware failure because the Pi runs like a charm with Raspbian Buster OS!


I have put some more time into this problem. After running stable for 24h hours now I am quite certain the issue is related to the suspend feature offered by the hardware and several desktop environments. The Raspberry Pi either fails to wake from suspend or fails to suspend.

What solved the issue for me was turning off Auto-suspend. For example, Gnome allows you to set suspend under System Settings -> Power. The Auto-suspend setting there is enabled by default. If you change that setting to Never, the Raspberry will run stable.

On a somewhat related note, it would be very nice to have kdump/kexec work on the Pi. Did someone ever figure out an initramfs/cmdline that works?


I replaced Gnome with XFCE and it works without crashing. I made this decision because with the remote access via ssh it still worked, unfortunately a BUG in Gnome causes this to crash, even disabling the items with reference to power did not solve the problem.