Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HP Elitebook 850 G6 brightness keys
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
CyberMuz
n00b
n00b


Joined: 03 Jan 2012
Posts: 49

PostPosted: Sun Apr 05, 2020 9:45 pm    Post subject: HP Elitebook 850 G6 brightness keys Reply with quote

Hi!

I have a (minor) problem with getting the screen brightness keys to work on my HP 850 G6. I would like to use Fn + F3/F4 should increase or decrease screen brightness but I have problem with getting the keycodes for this keys.
First I tryed to use xev bit it doesn't see the Fn + F3 / F4 at all. It's like I haven't pressed any keys at all.
Then I used showkey --keycode this produces the following output:
Code:

ghp ~ # showkey --keycode
kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]
....
keycode 465 press       >>>>>> When I press Fn + F3
keycode 465 release
keycode 465 press       >>>>>>   When I press Fn + F3
keycode 465 release


So both actions have the same keycode reported?! I noticed that there are also other combinations that produce the same 465 keycode: Fn + F8 (should be Mute Microphone) also has this code.
I tryed also with evtest I get the same results, still only 465 is detected. The following is logged when i press Fn + F3 and then Fn + F4

Code:
Event: time 1586121560.405756, type 4 (EV_MSC), code 4 (MSC_SCAN), value 81
Event: time 1586121560.405756, type 1 (EV_KEY), code 465 (KEY_FN_ESC), value 1
Event: time 1586121560.405756, -------------- SYN_REPORT ------------
Event: time 1586121560.412758, type 4 (EV_MSC), code 4 (MSC_SCAN), value 81
Event: time 1586121560.412758, type 1 (EV_KEY), code 465 (KEY_FN_ESC), value 0
Event: time 1586121560.412758, -------------- SYN_REPORT ------------
Event: time 1586121561.264836, type 4 (EV_MSC), code 4 (MSC_SCAN), value 81
Event: time 1586121561.264836, type 1 (EV_KEY), code 465 (KEY_FN_ESC), value 1
Event: time 1586121561.264836, -------------- SYN_REPORT ------------
Event: time 1586121561.271890, type 4 (EV_MSC), code 4 (MSC_SCAN), value 81
Event: time 1586121561.271890, type 1 (EV_KEY), code 465 (KEY_FN_ESC), value 0
Event: time 1586121561.271890, -------------- SYN_REPORT ------------


Can someone explain to me what is happening here? Why I have same keycodes for three different keys? On this wiki author states that his brightness keys are working fine. I compared his setup (from lspci) with mine and I don't see any significant difference.

I'm using the i3wm and I map all the actions manually, I got Mute, Volume up Volume down (Fn + F5, F6 and F6) working without a problem.
Back to top
View user's profile Send private message
elinosk96
n00b
n00b


Joined: 13 Nov 2019
Posts: 2

PostPosted: Mon Apr 06, 2020 10:41 pm    Post subject: Reply with quote

Hey,

I was just working on the exact same issue with my laptop earlier today. The issue for me had nothing at all to do with the keycodes. I just had to create the correct shortcuts to increase or decrease the brightness.

For the brightness keys, I had to use XF86MonBrightnessDown for the key to lower the brightness and XF86MonBrightnessUp to raise the brightness. I had to do this in a .cfg file that includes all the shortcuts for my WM because if I used any GUI program to do it, it recognized the keys when pressed as MonBrightnessDown and MonBrightnessUp.

I just simply created keyboard shortcuts that executed commands to lower or raise the brightness.

I hope you can use that solution as well to solve your issue with the keys.

Regardigng the keycodes, I simply have no idea why Fn + F3 and Fn + F4 have the same keycode. It should be different keycodes..
Back to top
View user's profile Send private message
CyberMuz
n00b
n00b


Joined: 03 Jan 2012
Posts: 49

PostPosted: Wed Apr 08, 2020 7:56 am    Post subject: Reply with quote

Hi!
I already have mapping because for XF86MonBrightnessDown but it's not triggered probably because of keycode issue. I think that the issue might be caused by the fact that I don't have 'clean' install because I migrated (copied) Gentoo from my older laptop. On the (not much) older laptop HP Probook 650 G4 keyboard woks fine and there are different keycodes returned by brightness keys (224 and 225).

It seems that this is keyboard driver issue. Can you please run this two commands on your machine:

Code:
dmesg -T | grep -i keyboard

and (from x11-apps/xinput package)
Code:
xinput list


Mine is:
Code:
 # dmesg -T | grep -i keyboard
[Tue Apr  7 20:43:27 2020] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input5

 # xinput list
⎡ Virtual core pointer                       id=2   [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                 id=4   [slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                         id=11   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                 id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                      id=3   [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                id=5   [slave  keyboard (3)]
    ↳ Power Button                               id=6   [slave  keyboard (3)]
    ↳ Video Bus                                  id=7   [slave  keyboard (3)]
    ↳ Power Button                               id=8   [slave  keyboard (3)]
    ↳ Sleep Button                               id=9   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard               id=10   [slave  keyboard (3)]
Back to top
View user's profile Send private message
elinosk96
n00b
n00b


Joined: 13 Nov 2019
Posts: 2

PostPosted: Wed Apr 08, 2020 12:27 pm    Post subject: Reply with quote

Hey!

Those are my output:
Code:

$ dmesg -T | grep -i keyboard
[Tue Apr  7 23:40:49 2020] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input16


and:
Code:

$ xinput list
⎡ Virtual core pointer                       id=2   [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                 id=4   [slave  pointer  (2)]
⎜   ↳ Elan Touchpad                              id=8   [slave  pointer  (2)]
⎣ Virtual core keyboard                      id=3   [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                id=5   [slave  keyboard (3)]
    ↳ Video Bus                                  id=6   [slave  keyboard (3)]
    ↳ Power Button                               id=7   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard               id=9   [slave  keyboard (3)]


I also am going to put here the contents of the file where all of the keyboard shortcuts are:
Code:

$ cat ./.e16/bindings.cfg
Aclass BUTTONBINDINGS normal
MouseDown      A 1 wop * mo ptr
MouseDown     SA 1 wop = mo ptr
MouseDouble    A 1 wop * shade
MouseDown      A 2 wop * sz ptr
MouseDouble    A 2 wop * th available
MouseDown      A 3 menus show winops.menu
Aclass DESKBINDINGS normal
Tooltip Clicking your mouse on the desktop will perform
Tooltip the following actions
MouseDown      - 1 menus show file.menu
Tooltip Display User Menus
MouseDown      C 1 menus show enlightenment.menu
Tooltip Display Enlightenment Menu
MouseDown      4 1 menus show settings.menu
Tooltip Display Settings Menu
MouseDown      - 2 menus show enlightenment.menu
Tooltip Display Enlightenment Menu
MouseDown      A 2 menus show windowlist
Tooltip Display Task List Menu
MouseDown      C 2 menus show deskmenu
Tooltip Display Desktop Menu
MouseDown      S 2 menus show groupmenu
Tooltip Display Group Menu
MouseDown      - 3 menus show settings.menu
Tooltip Display Settings Menu
MouseDown      * 4 desk prev
Tooltip Go Back a Desktop
MouseDown      * 5 desk next
Tooltip Go Forward a Desktop
Aclass KEYBINDINGS global
KeyDown   CA     Home desk arrange size
KeyDown   CA   Insert exec Eterm
KeyDown   CA   Delete exit logout
KeyDown   CA      End exit restart
KeyDown   CA    Right desk next
KeyDown   CA     Left desk prev
KeyDown   CA   Return desk this
KeyDown   SA     Down area move 0 1
KeyDown   SA       Up area move 0 -1
KeyDown   SA     Left area move -1 0
KeyDown   SA    Right area move 1 0
KeyDown    A       F1 desk goto 0
KeyDown    A       F2 desk goto 1
KeyDown    A       F3 desk goto 2
KeyDown    A       F4 desk goto 3
KeyDown    A       F5 desk goto 4
KeyDown    A       F6 desk goto 5
KeyDown    A       F7 desk goto 6
KeyDown    A       F8 desk goto 7
KeyDown    A      Tab focus next
KeyDown   CA       Up wop * raise
KeyDown   CA     Down wop * lower
KeyDown   CA        x wop * close
KeyDown   CA        k wop * kill
KeyDown   CA        s wop * stick
KeyDown   CA        i wop * iconify
KeyDown   CA        r wop * shade
KeyDown   CA        f wop * fullscreen
KeyDown   CA        m wop * ts conservative
KeyDown   CA        w menus show winops.menu
KeyDown    A   Return wop * zoom
KeyDown   CS       F1 menus show file.menu
KeyDown   CS       F2 menus show enlightenment.menu
KeyDown   CS       F3 menus show settings.menu
KeyDown   CS       F4 menus show windowlist
KeyDown   CA        a button_show all
KeyDown   CA        b button_show
KeyDown    - XF86MonBrightnessDown exec xbacklight -dec 5
KeyDown    - XF86MonBrightnessUp exec xbacklight -inc 5
KeyDown    - XF86AudioMute exec amixer get Master | grep off > /dev/null && amixer -q set Master unmute || amixer -q set Master mute
KeyDown    - XF86AudioLowerVolume exec amixer set Master 5%-
KeyDown    - XF86AudioRaiseVolume exec amixer set Master 5%+

Please don't judge if some of the commands are too complicated and other easier commands are available. I am no expert.

I am using Englightenment on my computer which created this file. I just added to it.
This says that when I press the button labelled with XF86MonBrightnessDown, the computer will execute tha following command
Code:
exec xbacklight -dec 5


I hope any of this helps you. If not, I'm happy to post the output of anything else to help you fixing this issue.

Hope you're well <3
Back to top
View user's profile Send private message
CyberMuz
n00b
n00b


Joined: 03 Jan 2012
Posts: 49

PostPosted: Tue Apr 14, 2020 8:08 pm    Post subject: Reply with quote

Good news, I made an upgrade of the system (emerge -DuNav @world) and now brightness keys. Unfortunately I don't know what package was problematic since I updated some ~100 packages this week.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum