prevent Linux from changing the screen brightness of your laptop when you plug it in.
The Problem With Linux Screen Brightness Adjustment
I use Ubuntu, and on my Acer Nitro 5, whenever I plug the laptop to power the brightness gets lowered to 10%. This is wrong since I want the brightness not to be lowered when the laptop is charging. It looks like a bug related to the Linux drivers that many users have.
In a nutshell, the solution is to enable the vendor drivers instead of the ones that come with Linux, or so I understood from this post. Here is what I had to do:
edited the grub file which is at
acpi_backlight=vendorto the end of
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash", so the result looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
update-grubcommand in the terminal and restarted the machine.