System freezes completely with Intel Bay Trail

Solution 1:

Your processor is affected by the c-state bug

This causes total freezes when the CPU tries to enter an unsupported sleep state. It's a problem for many Bay Trail devices especially with newer (4.*) kernels.

Affected processors AFAIK:

Atom Z3735F (Asus X205TA, Acer Aspire Switch 10, Lenovo MIIX 3 1030) 
Atom Z3735G
Celeron J1900 (Asus ET2325IUK, shuttle XS35V4)
Celeron N2940 (Acer Aspire ES1-711, Chromebook)
Celeron N2840 (Acer Aspire ES1-311)
Celeron N2930 (Jetway JBC311U93, Zotac Nano CI320)
Pentium N3520 
Pentium N3530 (Acer V3-111P)
Pentium N3540 (Dell Inspiron 15 3000, Lenovo G50, ASUS X550MJ)

(please (suggest an) edit to add your own device if affected)

Complete list of Bay Trail processors may be found here

There is a simple workaround for this until it gets properly fixed upstream.

You just need to pass a kernel boot parameter and the random freezing stops completely. The parameter may increase battery consumption slightly, but it will give you a usable system.

You do this by editing the configuration file for GRUB:

Boot Ubuntu and open a terminal by pressing Ctrl+Alt+T then type

sudo nano /etc/default/grub

Find the line that starts GRUB_CMDLINE_LINUX_DEFAULT=

This needs to be changed to include intel_idle.max_cstate=1

So after your edit it reads something like

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"

quiet and splash are default parameters for Ubuntu Desktop - no need to change them, or any other pre-existing parameters

Now save the file by pressing ctrl+o then enter and exit by pressing ctrl+x

Now run

sudo update-grub

Then reboot.


What to do if you don't have enough time to do this before the system hangs

No problem. As explained on the help page I linked to earlier, you can add the parameter to GRUB before booting. Note that this only passes the parameter for the current boot, so you still have to edit /etc/default/grub once you have booted to make the change permanent.

You need to get to the GRUB menu. If you are dual booting this will appear anyway, if not you have to press and hold (or tap) shift after pressing the power button to turn on.

When you get to this screen select Advanced Options for Ubuntu. You can move the cursor to a different kernel, or leave it in place to edit options for the default. Instead of pressing enter, press e and you will go into edit mode, looking vaguely like this.

Move the cursor down to where it says quiet splash, put a space after splash and carefully type intel_idle.max_cstate=1 making sure there is a space after it as well.

Now press F10 or Ctrl+x to boot.

Solution 2:

Linux on Bay Trail and Braswell processors randomly freezes with built-in video devices.

The problem is with temperature control. Just remove the thermald module:

sudo apt-get remove thermald 

Solution 3:

For people following this bug here is an update. Go to: Bug 109051 - intel_idle.max_cstate=1 required on baytrail to prevent crashes and press the End key. If necessary press Page Up to message #1013.

According to comment# 1013 it is now fixed in recent kernels:

I haven't checked this thread in a long time, but I thought I should post my findings just in case it is of any use to anyone.

A low end computer powered with an Intel N2807 which never worked more than 30 mn without crashing when I didn't set ...max_cstates=1 now works perfectly well with a stock kernel v. 5.3.1 or 4.19.75. I ran it for a couple of days with each version without any issues. The average power consumption was also down by a little over 10%.

It has taken about four years to fix this bug first reported December 8, 2015.