[Solved][Kernel 4.14] Screen backlight randomly change

Currently under 4.14.2-1 my laptop screen backlight randomly goes up or down.
Under both Budgie(gnome) and kde plasma.
Going back to kernel 4.13.16-2 fix it.
I need to change backlight once to trigger it.
"Randomly" means at any time and as long as I don't shut it down.
journalctl -f show the normal output for "fn key backlight shortcut" when it happen:

nov. 28 17:47:00 yo-gs pkexec[15711]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
nov. 28 17:47:00 yo-gs pkexec[15711]: yo: Executing command [USER=root] [TTY=unknown] [CWD=/home/yo] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 0]

inxi:

$ inxi -Fxzc0                
System:    Host: yo-gs Kernel: 4.13.16-2-MANJARO x86_64 bits: 64 gcc: 7.2.0
           Desktop: Budgie 10.4-8-gff09a510 (Gtk 3.22.26) Distro: Manjaro Linux
Machine:   Device: laptop System: Micro-Star product: GS40 6QE Phantom v: REV:0.C serial: N/A
           Mobo: Micro-Star model: MS-14A1 v: REV:0.C serial: N/A
           UEFI [Legacy]: American Megatrends v: E14A1IMS.110 date: 10/13/2016
Battery    BAT1: charge: 58.6 Wh 100.0% condition: 58.6/61.3 Wh (96%) model: MSI BIF0_9 status: Full
CPU:       Quad core Intel Core i5-6300HQ (-MCP-) arch: Skylake-S rev.3 cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 18436
           clock speeds: max: 3200 MHz 1: 2300 MHz 2: 2300 MHz 3: 2300 MHz 4: 2300 MHz
Graphics:  Card-1: Intel HD Graphics 530 bus-ID: 00:02.0
           Card-2: NVIDIA GM204M [GeForce GTX 970M] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.5 ) driver: intel Resolution: 1920x1080@60.02hz, 1920x1080@60.00hz
           OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2)
           version: 4.5 Mesa 17.2.5 Direct Render: Yes
Audio:     Card Intel Sunrise Point-H HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.13.16-2-MANJARO
Network:   Card-1: Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller
           driver: alx port: d000 bus-ID: 3d:00.0
           IF: enp61s0 state: down mac: <filter>
           Card-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter driver: ath10k_pci bus-ID: 3e:00.0
           IF: wlp62s0 state: up mac: <filter>
           Card-3: Qualcomm Atheros usb-ID: 001-004
           IF: null-if-id state: N/A speed: N/A duplex: N/A mac: N/A
Drives:    HDD Total Size: 608.1GB (5.6% used)
           ID-1: /dev/nvme0n1 model: THNSN5128GPU7_TOSHIBA size: 128.0GB
           ID-2: /dev/sda model: Crucial_CT480M50 size: 480.1GB
Partition: ID-1: / size: 117G used: 32G (29%) fs: ext4 dev: /dev/dm-0
           ID-2: /boot size: 488M used: 140M (31%) fs: ext4 dev: /dev/nvme0n1p1
Sensors:   System Temperatures: cpu: 47.0C mobo: 27.8C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 205 Uptime: 4:41 Memory: 2177.3/15928.7MB Init: systemd Gcc sys: 7.2.0
           Client: Shell (zsh 5.4.2) inxi: 2.3.43

File a bug report if there isn't one outstanding, otherwise you have two options...

  • Keep using 4,14 until an iteration fixes the randomness, or
  • Use the lower kernel you installed and stated works.

regards

Just for the record:
The bug is older than 4.14, I did not noticed that I was affected by double event for a single keystroke under kernels 4.13 and 4.9, seems related to : https://bugzilla.kernel.org/show_bug.cgi?id=196703
No bug under kernel 4.4.
Under 4.14 behaviour changed (see first post):

libinput debug-events
-event3   DEVICE_ADDED     Power Button                      seat0 default group1  cap:k
-event4   DEVICE_ADDED     Video Bus                         seat0 default group2  cap:k
-event5   DEVICE_ADDED     Video Bus                         seat0 default group2  cap:k
-event0   DEVICE_ADDED     Lid Switch                        seat0 default group3  cap:S
-event2   DEVICE_ADDED     Power Button                      seat0 default group4  cap:k
-event1   DEVICE_ADDED     Sleep Button                      seat0 default group5  cap:k
-event8   DEVICE_ADDED     BisonCam, NB Pro: BisonCam, NB    seat0 default group6  cap:k
-event10  DEVICE_ADDED     HDA Intel PCH Mic                 seat0 default group7  cap:
-event11  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=3       seat0 default group7  cap:
-event12  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=7       seat0 default group7  cap:
-event13  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=8       seat0 default group7  cap:
-event14  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=9       seat0 default group7  cap:
-event15  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=10      seat0 default group7  cap:
-event6   DEVICE_ADDED     AT Translated Set 2 keyboard      seat0 default group8  cap:k
-event16  DEVICE_ADDED     ETPS/2 Elantech Touchpad          seat0 default group9  cap:pg  size 103x67mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on
-event9   DEVICE_ADDED     MSI WMI hotkeys                   seat0 default group10 cap:k
-event6   KEYBOARD_KEY      +1.37s	KEY_RIGHTMETA (126) pressed
 event6   KEYBOARD_KEY      +1.99s	KEY_UP (103) pressed
 event6   KEYBOARD_KEY      +2.10s	KEY_UP (103) released
 event6   KEYBOARD_KEY      +2.73s	KEY_RIGHTMETA (126) released
 event6   KEYBOARD_KEY      +5.85s	KEY_BRIGHTNESSDOWN (224) pressed
 event6   KEYBOARD_KEY      +5.95s	KEY_BRIGHTNESSDOWN (224) released
 event6   KEYBOARD_KEY      +9.19s	KEY_BRIGHTNESSUP (225) pressed
 event6   KEYBOARD_KEY      +9.27s	KEY_BRIGHTNESSUP (225) released
 ----------------------------------## RANDOM EVENT START ##----------------------------------
-event4   KEYBOARD_KEY     +108.82s	KEY_BRIGHTNESSDOWN (224) pressed
 event4   KEYBOARD_KEY     +108.82s	KEY_BRIGHTNESSDOWN (224) released
  ----------------------------------## RANDOM EVENT END ##----------------------------------
-event6   KEYBOARD_KEY     +352.50s	KEY_BRIGHTNESSUP (225) pressed
 event6   KEYBOARD_KEY     +352.62s	KEY_BRIGHTNESSUP (225) released
 event6   KEYBOARD_KEY     +353.17s	KEY_BRIGHTNESSDOWN (224) pressed
 event6   KEYBOARD_KEY     +353.27s	KEY_BRIGHTNESSDOWN (224) released

Here we can see keystroke (event6), random brightness change (event4), and keystroke again (event6)
What does that mean ?
event4 seems related to "video bus" and event6 to keyboard
Adding kernel parameter video.report_key_events=0 fix the issue by (I think) ignoring event coming from "video bus".

Forum kindly sponsored by