You are not logged in.

#1 2017-12-30 20:14:15

newbit
Member
Registered: 2017-12-30
Posts: 3

Some FN hotkeys not working on medion laptop - acpi issue?

(maybe this would fit better in "Laptop issues" subforum, but because I am a noob and there might be an easy fix that I'm just not seeing right now, I'll post it here)
I just installed arch with gnome de on a brand new laptop (Medion Akoya E6436). Everything works well, but I have an annoying issue: some of the fn key combos just won't work!

Working:
FN+F5 -> decrease brightness
FN+F6 -> increase brightness
FN+F7 -> turn screen off
FN+Del -> insert
FN+Num -> scroll lock

Not working:
FN+F1 -> sleep
FN+F2 -> flight mode
FN+F9 -> disable trackpad

Buggy:
FN+F10 -> mute
FN+F11 -> volume down
FN+F12 -> volume up

The volume keys are acting really strange: right after boot and login, feg. if I press the volume up combo once (!), it will turn the volume up all the way, as if I was holding down the keys. The notification showing the volume will stay on screen until I press F12 again. Same for volume down. When pressing mute, it will constantly mute and umute very quickly. After a couple of times, the keys will stop working completely until next reboot...

This is hard to explain, so I recorded it on video:
https://streamable.com/vbaow

I tried to find a solution online, and got a couple of thread suggesting the issue might be related to acpi, feg. here https://bbs.archlinux.org/viewtopic.php?id=61883.
But this source is really old, and I am not sure if it is actually related. Also some other things that I thought depend on acpi work "out of the box": Suspend when closing lid, suspend using power button, setting brightness with FN keys etc.
On the wiki it says multiple daemons interacting with acpi might cause issues. As some acpi functions are working, I assume Gnome has its own mechanism for acpi? That's why I did not just try to enable acpid...

It would be nice if all keys worked, but the volume up/down/mute keys are the ones I actually use very often. Any useful hint appreciated! To begin with: is this even an acpi issue? How could I go on with troubleshooting?

Thanks!

Offline

#2 2017-12-30 20:17:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Some FN hotkeys not working on medion laptop - acpi issue?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-12-30 21:41:09

newbit
Member
Registered: 2017-12-30
Posts: 3

Re: Some FN hotkeys not working on medion laptop - acpi issue?

That was quick, awesome :-) I'm a little bit embarassed I did not find/read through this by myself, sry, I guess I was already focused on acpi...

scancode for...

F10 press: 0x44
F10 release: 0xc4
FN+F10 (mute combo) press: 0xe0
FN+F10 (mute combo) release: 0x20


when I do "showkeys --keycodes" those are the results I get:

F10 press: keycode 68 press
F10 release: keycode 68 release
FN+F10 (mute combo) press: keycode 113 press (why is this 113? Shouldn't it be 224, as this seems to just display the hex value of scancode in decimal?)
FN+F10 (mute combo) release: (none displayed)

I thought this should show keymaps, but it seems like those are scancodes as well? Im doing this after switching to console with ctrl+alt+f3.
when doing "xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'" to display xorg keycodes (like explained in the wiki)...

...pressing F10 gives "76 F10" like it should.
...pressing FN+F10 gives nothing


-> this means the scancode for pressing FN+F10 (0xe0) is not mapped to the correct keymap, and I should map it like explained here: https://wiki.archlinux.org/index.php/Ma … o_keycodes.
Or do I have to actually map the release scancode, 0x20 in this case? Sounds wrong, I am just a little bit confused about "showkeys --keycodes" showing something when pressing the combo, but not when releasing.
Release scancodes don't have to be mapped to keymaps in general, right?

Soo my custom hwdb should contain a line like this:

KEYBOARD_KEY_e0=mute

... right? And of course the same goes for all the other non working keys.

Offline

#4 2017-12-30 22:44:21

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Some FN hotkeys not working on medion laptop - acpi issue?

If you try with xev instead of and press the volume down/up keys (assuming the bios is not screwing things up) you should see something like this (among other messages):

KeyPress event, serial 39, synthetic NO, window 0x4c00001,
    root 0x13a, subw 0x0, time 40915039, (187,-122), root:(1058,338),
    state 0x0, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 39, synthetic NO, window 0x4c00001,
    root 0x13a, subw 0x0, time 40915100, (187,-122), root:(1058,338),
    state 0x0, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 39, synthetic NO, window 0x4c00001,
    root 0x13a, subw 0x0, time 40915991, (187,-122), root:(1058,338),
    state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 39, synthetic NO, window 0x4c00001,
    root 0x13a, subw 0x0, time 40916049, (187,-122), root:(1058,338),
    state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Note that the keys have been correctly recognized as XF86AudioLowerVolume / XF86AudioRaiseVolume and if the DE you use knows how to handle then it should work as you want. In my case the output of the command stated in the wiki is:

122 XF86AudioLowerVolume
123 XF86AudioRaiseVolume

R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2018-01-01 12:01:09

newbit
Member
Registered: 2017-12-30
Posts: 3

Re: Some FN hotkeys not working on medion laptop - acpi issue?

xev doesnt give me any message when pressing any fn+fxx. Not even for the working ones like brightness up/down (FN+F5/F6).
So I will try to map the scancodes to the keycodes now and hope I dont screw up :-) thanks so far!


EDIT:
OK, I am trying to wrap my head around this, but some parts I just dont get.

1. In Arch wiki it sounds like there should be just one scancode per key, but there are two?

In this article it explains how to bind scancodes to keycodes. But in all examples it sounds like there should be just one scancode per key. However, I get two scancodes per key! One for pressing, and one for releasing it! Example:

$ showkey --scancodes
(if your trying this under x bla bla, press any key)

0x9c               # I always get this one when running "showkey --scancode", seems to be the "enter release" scancode.
0x44 0xc4      # 0x44 is "F10 pressed", 0xc4 is "F10 released"
0x57 0xd7      # 0x57 is "F11 pressed", 0xd7 is "F11 released"
0x58 0xd8      # 0x58 is "F12 pressed", 0xd8 is "F12 released"

Seems like this guy had the same issue but didn't find a solution.



2. When pressing FN+(F10-F12) (-> mute, vol down, vol up), they all got the same scancode for "button pressed"!

Example:

$ showkey --scancodes
(if your trying this under x bla bla, press any key)

0x9c               # "enter release" scancode.
0xe0 0x20      # 0xe0 is "FN+F10 (mute) pressed", 0x20 is "FN+F10 (mute) released"?
0xe0 0x2e      # 0xe0 is "FN+F11 (vol down) pressed", 0x2e is "FN+F11 (vol down) released"?
0xe0 0x30      # 0xe0 is "FN+F12 (vol up) pressed", 0x30 is "FN+F12 (vol up) released"?

Compared to the example at the beginning, it's weird how they all share the same "button pressed" scancode, but have different "button released" scancodes.



3. The volume keys "button pressed" scancodes seem to be mapped to the correct keycode (although they are the same for all three keys?? See above), but the "button released" scancodes are not!

Example:

$ showkey --keycodes
(if your trying this under x bla bla, press any key)

keycode  28 release               # "enter release" keycode.
keycode  68 press                  # "F10 pressed" keycode
keycode  68 release               # "F10 released" keycode
keycode  87 press                  # "F11 pressed" keycode
keycode  87 release               # "F11 released" keycode
keycode  88 press                  # "F12 pressed" keycode
keycode  88 release               # "F12 released" keycode
keycode 113 press                  # "FN+F10 (mute) pressed" keycode
keycode 114 press                  # "FN+F11 (mute) pressed" keycode
keycode 115 press                  # "FN+F12 (mute) pressed" keycode

As you see, the volume keys (key combos) don't show a "released" keycode.

This as well fits the behaviour of gnome de: it recognizes volume keys as being pressed, but never as being released. However, the wiki article about mapping scancodes linked above does not differentiate between "pressed" or "released" mappings, its just one scancode and keycode per button there...




I am really confused now, am I missing an important wiki page again?
Oh and happy new year, of course! big_smile

Last edited by newbit (2018-01-01 13:54:50)

Offline

#6 2018-01-01 16:56:38

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Some FN hotkeys not working on medion laptop - acpi issue?

If you see the example I have posted you see there are KeyPress and KeyRelease events, otherwise how could you distinguish from pressing the key briefly or keeping it pressed for a while?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2018-01-03 14:08:29

blackout
Member
Registered: 2014-05-21
Posts: 38

Re: Some FN hotkeys not working on medion laptop - acpi issue?

you could provide some pullrequest for systemd

https://github.com/systemd/systemd/blob … evdev.hwdb

Offline

Board footer

Powered by FluxBB