3

I am experiencing this issue on my MSI GS60. It starts happening as soon as I use an Fn Key for the first time while running Ubuntu (I have also tested the issue on Arch and it's even worse there).

Ubuntu seems to think there was a brightness up / down keypress randomly (Fn + Up arrow or Fn + Down arrow) even when I am not touching the laptop's keyboard. When I turn the laptop off it shows as if a key was pressed.

I would not mind not being able to use any Fn Key (even though it'd be preferable if they were enabled) as long as I can stop this brightness issue.

vagaerg
  • 637

4 Answers4

4

This seems to be a common problem on most MSI laptops, including my own GP62 6QF Leopard Pro. Supposedly, one way to fix it would be to update your BIOS, however, this didn't work for me.

I managed to fix this by adding this 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 psuedo fn+up fn+down messages randomly.

Source: https://ubuntuforums.org/showthread.php?t=2314161&page=2

EDIT: Note that this is not a permanent fix as 10-quirks.conf is a file frequently overwritten by OS updates. The most recent update at this time of writing, released on the 7th of August, had overwritten this file and the above-mentioned script was not retained. To fix it back again, you'll just have to type it back in again, or submit a bug report informing them about this fix.

FYI, the 10-quirks.conf file is used for exactly this cause -- to fix bugs caused by hardware incompatibilities.

euwbah
  • 206
  • That solved the issue. You're right in the 10-quirks.conf file being replaced frequently, but it's still better than having brightness going up and down. Thanks! :) – vagaerg Aug 11 '16 at 11:42
  • 5
    Seeing as I'm unable to add a comment to euwbah's suggestion... Place this in /etc/X11/xorg.conf.d/10-quirks.conf, as opposed to under /usr/share, to prevent it ever being overwritten :) – ahmad Dec 29 '16 at 12:24
  • Just for note: After config change you need to restart X Window Server – andrew May 30 '20 at 19:01
  • This did not work for me AND it stopped me from using the FN brightness keys. After restart those keys did not work anymore and I had to change brightness via the settings. – dejoma Feb 27 '21 at 10:12
0

I recently switched to SwayWM/Wayland, and the config provided by a different answer no longer worked for me (since it only applies to X11). I asked around and was notified of a fix for SwayWM, specifically disabling input events from the "Video Bus".

First, one must run swaymsg -t get_inputs to get the identifier for the "Video Bus". Example output for the part in question looks like this:

...
Input device: Video Bus
  Type: Keyboard
  Identifier: 0:6:Video_Bus
  Product ID: 6
  Vendor ID: 0
  Active Keyboard Layout: English (US)
  Libinput Send Events: enabled
...

You have to get the "Identifier" entry, which will be used in .config/sway/config to disable input from the "Video Bus". In my case, it was 0:6:Video_Bus.

The final thing to do is to add the following line to your .config/sway/config:

input 0:6:Video_Bus events disabled

So if your identifier is different, you would replace 0:6:Video_Bus with yours.

All that's left is to reload sway's config with $mod+Shift+c or restart sway, and sway should have disabled input from the "Video Bus".

0

If you're using KDE Plasma with wayland, you need to use D-Bus to disable Video Bus input.

First you need to find which events correspond to Video Bus, run this command and look at the handlers

cat /proc/bus/input/devices | grep "Video Bus" -A 5

Example output, in this example it's event3:

N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/LNXVIDEO:00/input/input4
U: Uniq=
H: Handlers=kbd event3 
B: PROP=0

Then call the D-Bus to disable it, (replace event3 with the correct event on your laptop)

qdbus org.kde.KWin /org/kde/KWin/InputDevice/event3 org.kde.KWin.InputDevice.enabled false
0

I want to add my solution for Wayland using the device quirks of libinput, see https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html#device-quirks. I have Fedora 38 with the default GNOME environment, laptop MSI Modern 14 C7M-081CZ.

The previous answers inspired it, so just to be complete, you can list your devices using sudo libinput list-devices whose output will output something containing

Device:           Video Bus
Kernel:           /dev/input/event7
Group:            1
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

You can also watch all events using sudo libinput debug-events. The actual brightness buttons will output as

 event2   KEYBOARD_KEY            +13.879s  KEY_BRIGHTNESSDOWN (224) pressed
 event2   KEYBOARD_KEY            +13.925s  KEY_BRIGHTNESSDOWN (224) released
 event2   KEYBOARD_KEY            +14.324s  KEY_BRIGHTNESSUP (225) pressed
 event2   KEYBOARD_KEY            +14.368s  KEY_BRIGHTNESSUP (225) released

The 'fake' ones would look similar but have a different event number.

I have the libinput quirks files in /usr/share/libinput/ so I have created a new one:

[tomtom@fedora libinput]$ cat 10-generic-keyboard_video.quirks 
[Video Bus Spooky Ghost]
MatchName=*Video Bus*
AttrEventCode=-EV_KEY:0xE0;-EV_KEY:0xE1;

Not sure if a restart is needed or how to make it work immediately.

If set up correctly, the quirks associated with the specific event will be printed using libinput quirks list /dev/input/event<number>:

[tomtom@fedora libinput]$ libinput quirks list /dev/input/event3
AttrEventCode=-KEY_BRIGHTNESSDOWN;-KEY_BRIGHTNESSUP;

In the opposite case, sudo libinput list-devices would print a warning/error at the beginning of its output.

tomtom
  • 1