1

My Acer freezes every 10 minutes unless I use the following in Grub defaults:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux intel_idle.max_cstate=0 processor.max_cstate=1"

To avoid having to reenter this at every Grub update, I decided to use the 40_custom option in the /etc/grub.d folder.

However this throws up a question - will 40_custom be also modified with every kernel update version, or am I "frozen in time", forever with the kernel current at time of writing, in my case 4.4.0-15, (at least the xxx-generics)

menuentry "Ubuntu 16.04 (auf /dev/sda3)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0f2bc7b3-8d86-4577-9703-c8113ca3f746' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt3'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  0f2bc7b3-8d86-4577-9703-c8113ca3f746
    else
      search --no-floppy --fs-uuid --set=root 0f2bc7b3-8d86-4577-9703-c8113ca3f746
    fi
    linux   /boot/vmlinuz-4.4.0-15-generic.efi.signed root=UUID=0f2bc7b3-8d86-4577-9703-c8113ca3f746 ro  quiet splash acpi intel_idle.max_cstate=0 processor.max_cstate=1 $vt_handoff
    initrd  /boot/initrd.img-4.4.0-15-generic
}
Panther
  • 102,067
  • you are editing the wrong file, see - http://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter – Panther Mar 25 '16 at 13:12

1 Answers1

2

You are editing the wrong file. 40_custom is for adding a custom menu entry not found by grub2 and will add a single entry.

You need to edit /etc/default/grub

sudo nano /etc/default/grub

and add the kernel optionsacpi_osi=Linux intel_idle.max_cstate=0 processor.max_cstate=1 to the GRUB_CMDLINE_LINUX_DEFAULT="quiet splash line, like so

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux intel_idle.max_cstate=0 processor.max_cstate=1"

Then update grub and those options will be added to existing grub entries as well as all kernels installed via apt-get , updates, or software center.

sudo update-grub

Boot repair will do this graphically if you prefer.

To install, see https://help.ubuntu.com/community/Boot-Repair#A2nd_option_:_install_Boot-Repair_in_Ubuntu

sudo add-apt-repository ppa:yannubuntu/boot-repair 
sudo apt-get update
# The last line will install and run boot-repair
sudo apt-get install -y boot-repair && boot-repair

Use the grub options tab

enter image description here

Panther
  • 102,067
  • ....and that's the problem. Changing /etc/default/grub is not persistent. Every boot-repair overwrites it. – David Walker Mar 26 '16 at 15:11
  • @DavidWalker no need to keep running boot repair, you should only need to run it once. If boot-repair fails, manually edit the file and update grub as described above boot-repair. – Panther Mar 27 '16 at 17:45