2

Shortly after trading a tablet for a Toshiba Satellite Click 2 (Hybrid touchscreen laptop) I installed Linux. I soon found out that there is a bug in the kernel that results in Linux intermittently crashing on BayTrail integrated graphics devices. So to make sure it wasnt an installation problem I tried out different Ubuntu desktop environments distros and other Linux distros like Manjaro. Same problem. I installed Android x86 and the same problem occurs. It will be running fine and then it shuts off without any warning as if the battery were yanked from the device or the power plug was pulled. Dead. I then have to boot it back up. I installed Windows 10 and it doesnt crash so it is for sure that bug. I googled and found the "intel_idle.max_cstate=1" kernel boot flag. As well as the boot flag "intel_pstate=disable".

I applied these boot flags both from the GRUB menu at boot and then in the /etc/default/grub file. I still get random crashes. They are not isolated to any action or application either. Any way to fix this?

Any help is appreciated thanks!

kyaustad
  • 103
  • 1
  • 1
  • 8

1 Answers1

2

I read the link Zanna provided in comments but there is something else you should look at: Bay Trail Freezing. There are over 500 messages here from Bay Trail users (plus a few other Intel CPUs).

The messages start in December 2015 so scroll down 3rd from the end (as of October 24, 2016) and you will see this post:

Justin 2016-10-22 21:58:34 UTC
One week so far no crashes.  4.8.0-rc8-amd64

Options

GRUB_CMDLINE_LINUX_DEFAULT=intel_idle.max_cstate=5

In rc.local this script is run at boot...

 ----- 

#!/bin/bash
echo 1 > /sys/devices/system/cpu/cpu0/cpuidle/state3/disable
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo


thanks

I've read hundreds of these posts and some users can report "success" one day and the report back with "failed again!" a few days later. Above the author recommends Kernel version 4.8.0-rc8 but I would recommend using stable kernel version 4.8.4 instead. A summary for doing this is:

cd /tmp
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.4/linux-headers-4.8.4-040804_4.8.4-040804.201610220733_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.4/linux-headers-4.8.4-040804-generic_4.8.4-040804.201610220733_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.4/linux-image-4.8.4-040804-generic_4.8.4-040804.201610220733_amd64.deb
sudo dpkg -i *.deb
sudo reboot

Note: Version 4.8.4 is the most current stable kernel as of October 24, 2016.

October 30, 2016 update

From today's bug mail the following solution was proposed:

thorsten: Try the commands below, and report back. These eliminate hang ups on
my N2930 with kernel 4.7 (Gentoo).

First start kernel with: intel_idle.max_cstate=0

Then give these commands as root:

echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
echo 1 > /sys/devices/system/cpu/cpu0/cpuidle/state3/disable
echo 1 > /sys/devices/system/cpu/cpu1/cpuidle/state3/disable
echo 1 > /sys/devices/system/cpu/cpu2/cpuidle/state3/disable
echo 1 > /sys/devices/system/cpu/cpu3/cpuidle/state3/disable
WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401
  • Awesome! So I add "intel_idle.max_cstate=5" to my parameters at /etc/default/grub and then run the echo commands in terminal? I just want to make sure i understand that comment right. And thanks again – kyaustad Oct 25 '16 at 03:55
  • Of course after updating `/etc/default/grub` you need to do `sudo update grub`. Also he was using 4.8.0 and I think 4.8.4 would be better. Additionally those `echo` commands are probably for the current session and should be put into `rc.local` for persistence. – WinEunuuchs2Unix Oct 25 '16 at 04:09
  • Ok thanks for the help! I've done these steps and will leave my tablet/laptop running for awhile and get back to everyone whether that solved it. Time will tell. Ill let you know. Thanks a million! – kyaustad Oct 25 '16 at 05:46
  • Please edit the answer to clarify what a user exactly needs to do. – Anwar Oct 25 '16 at 06:13
  • 1
    the boot parameter should be in "quotes". Also, if =1 does not work, then =5 will not work - that means allow 5 c-states. =1 is just a bigger hammer. @kyaustad if the echo commands work for you, better to use sysfsutils than rc.local for that... – Zanna Oct 25 '16 at 06:48
  • @Zanna Thanks for the suggestions. `sysfutils` is especially helpful as in some systems `rc.local`services aren't even started by default now days. – WinEunuuchs2Unix Oct 25 '16 at 10:08
  • @Anwar I'm directing OP to link that contains 500+ things that work and don't work, ie bug report. I've merely included one sample to highlight what can be found there. The bug has been around since December 2015, but I will update the Answer. – WinEunuuchs2Unix Oct 25 '16 at 10:11
  • I will update the question. Unfortunately these did not solve my problem. It lasted a day instead of thirty minutes this time but u still get crashes as if power outages. Thank you for your help though! I don't know if this can be fixed then huh? – kyaustad Oct 25 '16 at 18:33
  • Actually its getting better all the time. Just a few days ago Arch released a whole new kernel to address BayTrail48 and RTL WiFi. – WinEunuuchs2Unix Oct 25 '16 at 21:48
  • Ok @Zanna you got me... how do i add those echo commands to sysfutils? – kyaustad Oct 26 '16 at 04:27
  • @kyaustad see my answer here [Adjust Brightness 16.04](//askubuntu.com/a/772497) you would add the line `devices/system/cpu/cpu0/cpuidle/state3/disable = 1` and another one `devices/system/cpu/intel_pstate/no_turbo = 1` to the conf file as described there – Zanna Oct 26 '16 at 12:51
  • Thank you Everyone for your help! So grateful to have such helpful people in the Linux community! – kyaustad Oct 26 '16 at 16:37