Intel Bay Trail Freezes & The Linux Kernel

kernel
hardware
intel

#1

This could just as easily gone into the ‘kernel’ section … but its also hardware-specific.
If you are running kernel version 3.16 or greater and have an intel baytrail processor you might experience random freezes. Some have found that the 4.1 or 4.6 branches are less problematic … while for others the only viable work-around is to add intel_idle.max_cstate=1 as a boot parameter.
You can follow this bug and possible solutions here:
https://bugzilla.kernel.org/show_bug.cgi?id=109051
Hope this helps anyone who happens to have one of these cpus.


Manjaro XFCE 16.06.1 freezes after a time
Manjaro freezes randomly
Manjaro Cinnamon freezing "randomly" :-(
How to install intel graphics
Manjaro keeps freezing randomlly
Please help me with troubleshooting my crashing problem
Laptop freezing after sleep
#4

4.1 without max_cstate=1?


#9

Thanks to Wolfgang M. Reimer we might have a fix for this issue!
This fix should work with the following processors :

J2850, J1850, J1750, N3510, N2810, N2805, N2910, N3520, N2920, N2820, N2806, N2815, J2900, J1900, J1800, N3530, N2930, N2830, N2807, N3540, N2940, N2840, N2808

I am currently testing out the script on my N3540. No problems so far.

cstateInfo.sh is to verify the script has worked. The “Disabled” Column will show a “1” for disabled states (or you take a look before running the script and after to check whether the offending C6* states have not been used [ie no change in ‘time’])
c6off+c7on.sh is the script which will actually disable the C6* states. And enable C7

This will not work if you have booted with any cstate parameters. (remove intel_idle.max_cstate=1)
The script should be run at boot. If it works, make the change permanent by adding it to startup.

If all is well, you should probably also benefit from better power savings than originally. :smiley:


#10

A quick walkthrough here - on systemd you’re gonna want to create a service.

Drop the script at “/usr/bin/c6off+c7on.sh

Make sure it can run with following command

sudo chmod 755 /usr/bin/c6off+c7on.sh

Then create a file "/etc/systemd/system/cstatefix.service"
with following contents:

[Unit]
Description=My script

[Service]
ExecStart=/usr/bin/c6off+c7on.sh

[Install]
WantedBy=multi-user.target

Then enable service with command

systemctl enable cstatefix.service

When you restart, use the info script to see if all is well.
You should get output similar to this:

cpu0 State  Name     Disabled  Latency  Residency         Time     Usage
         0  POLL            0        0          0     40996149     15951
         1  C1-BYT          0        1          1  18934852616  17313916
         2  C6N-BYT         1      300        275        75736       138
         3  C6S-BYT         1      500        560       319588       235
         4  C7-BYT          0     1200       4000   4756954535   1000102
         5  C7S-BYT         0    10000      20000   1638046880     82461

…with 1’s in Disabled row for C6*, and the news C7 states available.


#11

Currently 4.7 Branch runs great with no need for script :smiley:

I encourage everyone with baytrail to use 4.7.X or newer and see if it works for you.


#12

Recent freezes reintroduced on 4.7.8-1

-Now-

4.8.X is preferred, and I am seeing no freezes now.

But we wait for 4.9 (which is expected to fix this and other intel quirks)

[Marking this post as solution for easier find, until 4.9 is stable and tested]


#13

4.9 branch seems stable now! :champagne:

[ to clarify take a peak at whats going on - 1.6 gigs of RAM being used, 2 1080p videos (one on drive, one streaming) as well as news video streaming, multiple tabs of FF, music playing, on 4.9 kernel and Testing Branch, running XFCE, with N3540 baytrail and an uptime of 27 hours with no hiccups. Tested on Battery and AC :smiley: ]

I hope some of you others out there with Bay Trail might give 4.9 a shot now and report for confirmation.

Will mark as ‘solved’ for now - I hope we will be keeping it that way!


Manjaro Cinnamon freezing "randomly" :-(
#14

Not completely stable here (using an Intel n2940). Froze up during a file transfer from an external harddrive while simultaneously installing packages using pamac. Overall the periods where it does not freeze have definitely improved, but I am still running with the modified kernel parameters. Will be checking with every point release.


#15

We should get another point release soon.
But thanks for chiming in - lets see what other folks tell us :mask:


#16

Are you and @cscs using intel_idle.max_cstate=1 when testing the 4.9 kernel?


#17

With that kernel parameter 4.9 is rock solid for me, but without it I still experienced the freeze under heavy io, however the length of time it took for it to actually freeze was much greater. Usually with just the quiet splash parameters I would get a maximum of ten minutes before a freeze, 4.9 made it to 45 minutes before running into a brick wall. With the cstate parameter I have no freezes whatsoever.

I will be removing the parameter at each point release and testing it. Hopefully I eventually wont need it.


#18

I am testing without so as to determine whether it is truly fixed.


#19

I have a Z3775 baytrail that is still only stable with …cstate=1. I’ve even had windows freeze the same way a few times (obviously not running 4.9!) The problem is in the microcode for power management. The latest workaround seems to work for many baytrails, just not mine. YMMV.


#20

Yep, and whilst Intel released a fix for this a long time ago, way too many manufacturers don’t care enough to release an updated BIOS.

Yes Lenovo, ASUS, Acer and probably more, I’m looking at you!


#21

Running 4.9.2 without kernel parameter. Now if they could only fix the i2chid reset issue and my accelerometer would finally work correctly.


#22

Hello nadb.
I have a processor of the same model as yours (N2940) and also using Linux (tested up to Kernel 4.8) I have had problems with freezes. I have followed this problem at https://bugzilla.kernel.org/show_bug.cgi?id=109051 and this bug affects various processor models.
Can you confirm that Kernel 4.9.2 is still stable for this processor (N2940)? If the answer is yes, could you tell me how long you are using this version of the Kernel?


#23

4.9.6 with no apparent problems here


#24

Currently running kernel 4.9.6-1 with the parameter in place. I have tried it without and will get sometimes even eight hours out of it but inevitably if I am multi tasking and have too much going on at once it freezes up completely and has to be hard rebooted. With the parameter in place I have no such problems no matter how long I run it. I am still testing it after every update with the same results so far. Usually I find it will run for 45 minutes on average before a freeze. That is not acceptable to me, so I will forego the power savings for stability.


#25

what the h___ is going on with these intel *lake crapola. ?


#26

Well in the case of this series … they pretty much just dont care, since they are considered ‘economy’ models (you know … for the peasants)