Using brightness keys on keyboard changes screen brightness twice

Whenever I change the screen brightness using the brightness controls on my keyboard the screen brightness changes twice, effectively giving me half the brightness steps. I previously used KDE and didn't have the issue there, it is only on Gnome where this issue occurs. Using journalctl -fe I was already able to figure out that the brightness event is sent twice but I can't seem to figure out what would cause this. I also already tried all different options for the acpi_backlight kernel parameter but that also didn't solve the issue. Does anyone have an idea what could be causing this?

Apr 13 22:06:30 manjaro pkexec[1883]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Apr 13 22:06:30 manjaro pkexec[1883]: manjaro: Executing command [USER=root] [TTY=unknown] [CWD=/home/manjaro] [COMMAND=/usr/lib/gsd-backlight-helper /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight 255]
Apr 13 22:06:30 manjaro pkexec[1887]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Apr 13 22:06:30 manjaro pkexec[1887]: manjaro: Executing command [USER=root] [TTY=unknown] [CWD=/home/manjaro] [COMMAND=/usr/lib/gsd-backlight-helper /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight 209]


System:    Host: manjaro Kernel: 4.19.32-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.1 Desktop: Gnome 3.32.0 
           Distro: Manjaro Linux 
Machine:   Type: Convertible System: HP product: HP Pavilion x360 Convertible v: Type1ProductConfigId serial: <filter> 
           Mobo: HP model: 81A7 v: 52.28 serial: <filter> UEFI: Insyde v: F.34 date: 02/26/2018 
Battery:   ID-1: BAT0 charge: 24.3 Wh condition: 24.3/24.3 Wh (100%) model: 313-54-41 BI03041XL status: Full 
CPU:       Topology: Dual Core model: Intel Core i5-6200U bits: 64 type: MT MCP arch: Skylake rev: 3 L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19204 
           Speed: 500 MHz min/max: 400/2800 MHz Core speeds (MHz): 1: 540 2: 577 3: 537 4: 588 
Graphics:  Device-1: Intel Skylake GT2 [HD Graphics 520] vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.org 1.20.4 driver: i915 resolution: <xdpyinfo missing> 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 520 (Skylake GT2) v: 4.5 Mesa 19.0.1 direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Sound Server: ALSA v: k4.19.32-1-MANJARO 
Network:   Device-1: Realtek RTL8723BE PCIe Wireless Network Adapter vendor: Hewlett-Packard driver: rtl8723be v: kernel 
           port: 3000 bus ID: 01:00.0 
           IF: wlo1 state: up mac: <filter> 
Drives:    Local Storage: total: 465.76 GiB used: 8.07 GiB (1.7%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB 
Partition: ID-1: / size: 102.71 GiB used: 8.04 GiB (7.8%) fs: ext4 dev: /dev/sda5 
Sensors:   System Temperatures: cpu: 44.0 C mobo: 41.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 224 Uptime: 15m Memory: 7.68 GiB used: 1.50 GiB (19.5%) Init: systemd Compilers: gcc: N/A Shell: bash 
           v: 5.0.2 inxi: 3.0.32 

Try this command in a terminal

sudo sh -c 'echo -n 0 > /sys/module/video/parameters/brightness_switch_enabled'

if your brightness control is fixed add this kernel parameter to make it permanent

video.brightness_switch_enabled=0
1 Like

I use the kernel parameter video.only_lcd=0 .

Neither of those fixed it sadly

Reading more closely,

which suggests it's a GNOME bug.

Are you using X or Wayland? Have you tried the other? Have you done any web searches? What else have you already tried?

I have tried to do web searches but I couldn't find anything relating to my issue apart from a bug report from 2008 which should be fixed already. I tried switching between Wayland and Xorg and the issue persists on both. I tried changing the kernel parameters but that didn't work either. Apart from that I only did a little bit of investigation to figure out why the event is emitted twice but I can't figure out how that could come. I'm quite stumped as to what to do

The next thing I will probably try now is to switch to another kernel and see if that is the issue

Is the problem present on the login screen?

No, but on the login screen I'm not able to change the screen brightness at all. Neither with the keyboard nor with the brightness slider

I don't know if we have the exact same problem, but for me in addition to the kernel parameter I suggested before I had to eliminate the keymapping of the brightness buttons (inspired by this fedora fix)
If you're gonna go that route, this article would be of help. Good luck.
Here is the file I use (/etc/udev/hwdb.d/70-keyboard-custom.hwdb), you should modify it accordingly

evdev:input:b0011v0001p0001*
 KEYBOARD_KEY_85=unknown  # Brightness Down, also emitted by acpi-video, ignore
 KEYBOARD_KEY_86=unknown  # Brightness Up, also emitted by acpi-video, ignore

Thanks for pointing me to that! Didn't work sadly, but interestingly enough I found even more weird stuff. The key events are not sent over the keyboard or the shortcut devices but the video bus out of all places and every time I press the key, the key input event is already emitted twice, even though I only press the button once. So it seems like this is an insanely weird hardware quirk and I will probably have to build some workaround for it.

[manjaro ~]# evtest /dev/input/event9
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x0 product 0x6 version 0x0
Input device name: "Video Bus"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 224 (KEY_BRIGHTNESSDOWN)
    Event code 225 (KEY_BRIGHTNESSUP)
    Event code 227 (KEY_SWITCHVIDEOMODE)
    Event code 241 (KEY_VIDEO_NEXT)
    Event code 242 (KEY_VIDEO_PREV)
    Event code 243 (KEY_BRIGHTNESS_CYCLE)
    Event code 244 (KEY_BRIGHTNESS_ZERO)
    Event code 245 (KEY_DISPLAY_OFF)
Properties:
Testing ... (interrupt to exit)
Event: time 1555193226.382688, type 1 (EV_KEY), code 224 (KEY_BRIGHTNESSDOWN), value 1
Event: time 1555193226.382688, -------------- SYN_REPORT ------------
Event: time 1555193226.382738, type 1 (EV_KEY), code 224 (KEY_BRIGHTNESSDOWN), value 0
Event: time 1555193226.382738, -------------- SYN_REPORT ------------
Event: time 1555193226.383215, type 1 (EV_KEY), code 224 (KEY_BRIGHTNESSDOWN), value 1
Event: time 1555193226.383215, -------------- SYN_REPORT ------------
Event: time 1555193226.383237, type 1 (EV_KEY), code 224 (KEY_BRIGHTNESSDOWN), value 0
Event: time 1555193226.383237, -------------- SYN_REPORT ------------
Event: time 1555193226.974112, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 1
Event: time 1555193226.974112, -------------- SYN_REPORT ------------
Event: time 1555193226.974128, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 0
Event: time 1555193226.974128, -------------- SYN_REPORT ------------
Event: time 1555193226.974268, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 1
Event: time 1555193226.974268, -------------- SYN_REPORT ------------
Event: time 1555193226.974281, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 0
Event: time 1555193226.974281, -------------- SYN_REPORT ------------

can you be more specific on what you did? seeing the evtest output, it look like the workaround isn't applied
It should output something like this when pressing the brightness button

Event: time 1555188291.508361, type 4 (EV_MSC), code 4 (MSC_SCAN), value 86
Event: time 1555188291.508361, type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 1
Event: time 1555188291.508361, -------------- SYN_REPORT ------------
Event: time 1555188291.508394, type 4 (EV_MSC), code 4 (MSC_SCAN), value 86
Event: time 1555188291.508394, type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 0
Event: time 1555188291.508394, -------------- SYN_REPORT ------------
Event: time 1555188293.641455, type 4 (EV_MSC), code 4 (MSC_SCAN), value 85
Event: time 1555188293.641455, type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 1
Event: time 1555188293.641455, -------------- SYN_REPORT ------------
Event: time 1555188293.641482, type 4 (EV_MSC), code 4 (MSC_SCAN), value 85
Event: time 1555188293.641482, type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 0
Event: time 1555188293.641482, -------------- SYN_REPORT ------------

Also, are you sure /dev/input/event9 is your keyboard

Did you undo the previous kernel parameter changes which "didn't work"? It sound like they did work, just not where you wanted them to. :wink:

maybe ?

As a workaround suggestion, wondering if you could do a global key bind to execute xbacklight.

Yes, that seems to be exactly it. Guess I will just build a workaround then

Edit: So just for the record, the fix suggested in the post doesn't work since in my case the only events are sent via the "Video Bus" device and there are no other key events registered using libinput debug-events. So using the suggested kernel parameter causes me to not be able to change the brightness using the hotkeys at all. But I have the exact bug described in the attached bug report. It seems to be a BIOS issue which causes the key event to be sent twice to the operating system on a single press. I don't know why I didn't notice the issue on other desktop environments but even when booting without any desktop the issue still persists, so I guess it was just less noticeable on KDE

@ddominnik you could try to ignore events sent by Video Bus
Create /etc/X11/xorg.conf.d/10-ignorevideobus.conf

Section "InputClass"
	Identifier "Video Bus blacklist"
	MatchProduct "Video Bus"
	Option "Ignore" "true"
EndSection

But then I can't change the brightness with the hotkeys at all, since they are the only events

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by