You are not logged in.

#1 2020-05-18 21:04:22

SayantanRC
Member
Registered: 2020-05-18
Posts: 9

Brightness buttons force close Firefox

This is a weird issue.
On first run of Firefox after boot, if I press XF86MonBrightnessUp or XF86MonBrightnessDown, Firefox crashes.
But if I open it again and press the brightness buttons, then it does not crash anymore.
I opened Firefox from terminal and managed to get this output.

[sayantan-rc@archlinux ~]$ firefox
Exiting due to channel error.
Exiting due to channel error.
Terminated

I am running i3wm. I also had the same setup on different distros but did not face this issue. I have also removed keybindings from the i3 config file for the brightness buttons, but still issue is occurring.
Any help will be appreciated. Thanks.

Offline

#2 2020-05-19 20:39:09

SayantanRC
Member
Registered: 2020-05-18
Posts: 9

Re: Brightness buttons force close Firefox

!!!!!!!!! EDIT !!!!!!!!!!
Still closing....
Previous answer:


Found a possible solution. Before going further, I need to describe my setup.
I am running i3wm on vanilla Arch on my HP laptop.

I took reference from: https://wiki.archlinux.org/index.php/Ma … o_keycodes
I went into the file:

/usr/lib/udev/hwdb.d/60-keyboard.hwdb

Since my laptop is from HP, I commented out the brightness keys from the Hewlett Packard section of the file.
(check KEYBOARD_KEY_92 and KEYBOARD_KEY_97)

###########################################################
# Hewlett Packard
###########################################################

evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*:pvr*
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pn*:pvr*
 KEYBOARD_KEY_81=fn_esc
 KEYBOARD_KEY_89=battery                                # Fn+F8
 KEYBOARD_KEY_8a=screenlock                             # Fn+F6
 KEYBOARD_KEY_8b=camera
 KEYBOARD_KEY_8c=media                                  # music
 KEYBOARD_KEY_8e=dvd
 KEYBOARD_KEY_b1=help
 KEYBOARD_KEY_b3=unknown                                # FIXME: Auto brightness
 KEYBOARD_KEY_d7=wlan
 #KEYBOARD_KEY_92=brightnessdown                         # Fn+F7 (Fn+F9 on 6730b)
 #KEYBOARD_KEY_97=brightnessup                           # Fn+F8 (Fn+F10 on 6730b)
 KEYBOARD_KEY_ee=switchvideomode                        # Fn+F4

But this kinda blocks the keys. But again, without keybinding in i3wm config file, the keys were useless anyway.
So I have these keybindings in my i3 config file.

bindsym XF86MonBrightnessUp exec xbacklight -inc 2 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 2 # decrease screen brightness

Now adjusting brightness works, and Firefox does not crash as well.

I will monitor for a few days, if this has any adverse effect, and then mark it as solved.

Last edited by SayantanRC (2020-05-19 23:21:18)

Offline

#3 2020-05-21 16:41:45

SayantanRC
Member
Registered: 2020-05-18
Posts: 9

Re: Brightness buttons force close Firefox

Finally it seems I have fixed the issue.
My ".xinitrc" file was this:

#!/bin/sh

xset -b
exec dbus-launch --exit-with-session i3

This worked perfectly well on my Ubuntu install. This caused the problem.
I have now changed the file to this:

#!/bin/sh

xset -b
exec dbus-run-session i3

Now Firefox doesn't seem to crash on pressing brightness up/down, even on the first launch after a reboot.

Just like my last attempt, I will monitor for a few days and then mark as solved.

Offline

#4 2020-05-21 16:51:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,728

Re: Brightness buttons force close Firefox

Don't use dbus-run-session just run exec i3 and ensure you've set up the necessary includes as stated in https://wiki.archlinux.org/index.php/Xinit#xinitrc

Last edited by V1del (2020-05-21 16:51:46)

Offline

Board footer

Powered by FluxBB