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.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

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

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply