random event changes screen brightness automatically

Solution 1:

You can try this: Brightness randomly up and down on MSI laptop

You can add the following to /usr/share/X11/xorg.conf.d/10-quirks.conf:

  Section "InputClass"
  Identifier "Spooky Ghosts"
  MatchProduct "Video Bus"
  Option "Ignore" "on"
  EndSection

This basically ignores messages from the Video Bus, which seems to be sending pseudo fn+up fn+down messages randomly.

Also to add on, the brightness changing correlates to CPU voltage changes. MSI laptops seem to have a weird mobo setup, and Ubuntu may misinterpret some of the messages sent by the BIOS as brightness up/down messages

Note that this fix is not permanent, and some OS updates may overwrite 10-quirks.conf. as it is used to fix hardware bugs such as these. But if you see your screen brightness changing again, you can simply redo this step.