What is the difference between GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub

I'm troubleshooting a fn-key brightness control problem on my laptop, so I'm wading through a lot of config options in /etc/default/grub, as you can imagine. However, it's raised a question for me:

What's the difference between the lines marked GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT?

For example, does GRUB_CMDLINE_LINUX="acpi_backlight=vendor"

behave any differently than GRUB_CMDLINE_LINUX_DEFAULT="acpi_backlight=vendor"?

As an unrelated question, what do any of them have to do with mapping the use of my fn keys? The brightness is already adjustable in System Settings due to some xorg.conf.d/ magic. I just wanna make the keys work.


Solution 1:

The difference in short black'n'white text:

  • Options in GRUB_CMDLINE_LINUX are always effective.

  • Options in GRUB_CMDLINE_LINUX_DEFAULT are effective ONLY during normal boot (NOT during recovery mode).


Sources: help.ubuntu.com/.../Grub2 and g-p's answer

Solution 2:

GRUB_CMDLINE_LINUX

Entries on this line are added to the end of the 'linux' command line (GRUB legacy's "kernel" line) for both normal and recovery modes. It is used to pass options to the kernel.


GRUB_CMDLINE_LINUX_DEFAULT

This line imports any entries to the end of the 'linux' line (GRUB legacy's "kernel" line). The entries are appended to the end of the normal mode only.

what do any of them have to do with mapping the use of my Fn keys?

In some cases the ACPI BIOS provides the interfaces required to control the backlight through the generic ACPI interface, but the actual methods are not implemented. So the ACPI driver registers with the hardware and prevents any laptop specific drivers from doing so. In those cases it is possible to prevent the ACPI backlight driver from starting by adding the following line to the kernel boot parameters:

acpi_backlight=vendor

  1. Source regarding GRUB_CMDLINE_...
  2. Source regarding backlight