Kernel Panic Workaround

I’ve been getting kernel panic boot errors on my Dell Inspiron 3551 Ubuntu Linux laptop. I found a workaround on pastebin. I implemented it, and from my limited testing, it looks as if it has solved the problem (yay!). I’m pasting it here so that it does not disappear from pastebin.

Using intel_pstate instead of acpi-cpufreq to manage cpu frequency seems to prevent kernel panics on the Inspiron 3551 due to a regression in step_wise.c in the default Ubuntu kernel. This is a guide on how to switch to the intel_pstate driver.

Install cpupower:

sudo apt-get install linux-tools-common linux-tools-generic

Edit /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=enable"

sudo update-grub

Reboot and check if the intel_pstate driver is enabled:

cpupower frequency-info

intel_pstate has two frequency governors: performance and powersave, but not ondemand. Switch between the two with:

sudo cpupower frequency-set -g powersave

sudo cpupower frequency-set -g performance

You can check which governor is active with cpupower or with sysfs:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

If you like, Intel Turbo Boost can be disabled with:

echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo

Dell installs tlp so edit /etc/default/tlp changing line 22:

CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave

I made performance default as powersave is slower than ondemand:

60 seconds after login ubuntu executes /etc/init.d/ondemand which changes the cpu frequency scheduler to powersave if intel_pstate is enabled. Edit this file changing the governor in line 40:

*powersave*)
#GOVERNOR="powersave"
GOVERNOR="performance"
break
;;
*)

That's all :)