Lenovo Y720-15IKB, Xorg and "multimedia keys"

Hello,

I have Lenovo Y720 laptop which runs FreeBSD 14 stable, and I run Xorg.

The laptop in question has "Fn" key on the keyboard, which should work with other keys for producing something else. It did work in Windows. My current situation, as I see it in xev:

Fn + F1 to Fn + F4 ("mute", "volume down", "volume up", "microphone off") -- no reaction at all.
Fn + F5 -- produces F5
Fn + F6 -- produces, as it should XF86TouchpadOff. There is a separate key for XF86TouchpadOn, and it works
Fn + F7 ("airplane mode") -- no reaction at all
Fn + F8 ("camera off") -- no reaction at all
Fn + F9 ("lock") -- Super_L + n
Fn + F10 ("switch displays") -- Super_L + l
Fn + F1{1,2} (brightness control) -- no reaction at all

This laptop does not have PgUp/PgDown/Home/End keys, instead using Fn + arrow keys, and it works, producing Prior/Next/Home/End.

I do not have any xmodmap, if it matters.

Here is my xorg.conf (I need it as the laptop has both intel integrated video card, and NVidia separate one, and Xorg gets confused):

Code:
Section "ServerLayout"
    Identifier    "Layout0"
    Screen         0    "Screen0"
    InputDevice     "Keyboard0"    "CoreKeyboard"
    InputDevice     "Mouse0"     "CorePointer"
EndSection

Section "Files"
    ModulePath   "/usr/local/lib/xorg/modules"
    FontPath     "/usr/local/share/fonts/misc/"
    FontPath     "/usr/local/share/fonts/TTF/"
    FontPath     "/usr/local/share/fonts/OTF/"
    FontPath     "/usr/local/share/fonts/Type1/"
    FontPath     "/usr/local/share/fonts/100dpi/"
    FontPath     "/usr/local/share/fonts/75dpi/"
    FontPath     "catalogue:/usr/local/etc/X11/fontpath.d"
EndSection

Section "Module"
    Load  "dbe"
    Load  "extmod"
    Load  "type1"
    Load  "freetype"
    Load  "glx"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/sysmouse"
    Option        "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Unknown"
    ModelName    "Unknown"
EndSection

Section "Device"
    Identifier  "Card0"
    Driver      "modesetting"
    VendorName  "Intel"
    BusID       "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    DefaultDepth     24
    SubSection "Display"
        Depth     24
    EndSubSection
EndSection

I have tried specifying different XkbModels, without success. Is there any chance to get the keys working?
 
You can try xev(1) to find keycodes for some Fn-keys and add it manually to ~/.Xmodmap:
Code:
keycode 140 = XF86_AudioMute
keycode 174 = XF86_AudioLowerVolume
keycode 176 = XF86_AudioRaiseVolume
keycode 144 = XF86_AudioPrev
keycode 162 = XF86_AudioPlay
keycode 153 = XF86_AudioNext
keycode 152 = XF86_Search
keycode 161 = XF86_Launch0
keycode 235 = XF86_Launch1
keycode 148 = XF86_Calculator
For some keys you can define devd hooks, in my case for example thinkpad with acpi_ibm(4):
Code:
% cat /usr/local/etc/devd/thinkpad.conf
     notify 100 {
match "system"                  "ACPI";
match "subsystem"               "ACAD";
match "notify"                  "0x00";
action "/usr/bin/backlight 20; service power_profile $notify";
};

notify 100 {
match "system"                  "ACPI";
match "subsystem"               "ACAD";
match "notify"                  "0x01";
action "/usr/bin/backlight 50; service power_profile $notify";
};

notify 100 {
match "system"                  "ACPI";
match "subsystem"               "IBM";
match "notify"                  "0x10";
action "/usr/bin/backlight + 3";
};

notify 100 {
match "system"                  "ACPI";
match "subsystem"               "IBM";
match "notify"                  "0x11";
action "/usr/bin/backlight - 3";
};
 
Not sure if your keyboard is usb (some notebooks still uses PS/2 for internal keyboards) but you can try using uhidd.
 
I am in another place now and that notebook is not with me. I will check on Monday, thanks!
 
Does the following mean my keyboard is not USB?

Code:
root@barad-dur:~ # usbconfig list
ugen0.1: <Intel XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] Edimax Technology Co., Ltd> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen0.3: <Chicony Electronics Co.,Ltd. EasyCamera> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen0.4: <Microsoft Inc. Xbox Embedded Wireless> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (20mA)
ugen0.5: <ITE Tech. Inc. ITE Device(8910)> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen0.6: <QCA61x4 Bluetooth 4.0 Qualcomm Atheros Communications> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
root@barad-dur:~ #
 
Ok, it seems that ITE is actually a keyboard. However, if I attach uhidd there I lose keyboard at all, even in console.
 
If it matters: I am getting very similar results in console with kbdscan. When I have no reaction from xev, I have no reaction from kbdscan.
 
My UEFI setup has an option for multimedia keys and Fn keys(F1 to F12). an option for use keys as multimedia keys when pressing them without Fn(Key) and Fn(Keys) when pressing them with Fn(Key), another choice is reversing its functions.

BTW, are you tested multimedia keys functionality with a WM or DE?
You can look at windows for which interface it using. or use dmesg:
Code:
dmesg | grep kbd
 
I have nothing in UEFI setup (looking there was my first thought), I am getting the same result in xev both in LXQt run through x11/lightdm and in plain start with twm(1). Here is dmesg output:

Code:
❯ dmesg | grep kbd
kbd1 at kbdmux0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
ukbd0 on uhub0
ukbd0: <ITE Tech. Inc. ITE Device(8910), class 0/0, rev 2.00/0.04, addr 4> on usbus0
kbd2 at ukbd0
 
Last edited:
Maybe also relevant: selection from Xorg log

Code:
❯ grep -i keyb /var/log/Xorg.0.log
[  5951.808] (**) |-->Input Device "Keyboard0"
[  5951.808] (WW) Disabling Keyboard0
[  5952.058] (II) Initializing extension XKEYBOARD
[  5952.169] (II) config/udev: Adding input device System keyboard multiplexer (/dev/input/event0)
[  5952.169] (**) System keyboard multiplexer: Applying InputClass "Evdev keyboard"
[  5952.169] (**) System keyboard multiplexer: Applying InputClass "libinput keyboard catchall"
[  5952.171] (II) Using input driver 'libinput' for 'System keyboard multiplexer'
[  5952.171] (**) System keyboard multiplexer: always reports core events
[  5952.173] (II) event0  - System keyboard multiplexer: is tagged by udev as: Keyboard
[  5952.174] (II) event0  - System keyboard multiplexer: device is a keyboard
[  5952.175] (II) event0  - System keyboard multiplexer: device removed
[  5952.175] (II) XINPUT: Adding extended input device "System keyboard multiplexer" (type: KEYBOARD, id 6)
[  5952.197] (II) event0  - System keyboard multiplexer: is tagged by udev as: Keyboard
[  5952.197] (II) event0  - System keyboard multiplexer: device is a keyboard
[  5952.204] (**) Power Button: Applying InputClass "Evdev keyboard"
[  5952.204] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[  5952.205] (II) event3  - Power Button: is tagged by udev as: Keyboard
[  5952.206] (II) event3  - Power Button: device is a keyboard
[  5952.207] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 8)
[  5952.208] (II) event3  - Power Button: is tagged by udev as: Keyboard
[  5952.208] (II) event3  - Power Button: device is a keyboard
[  5952.209] (II) config/udev: Adding input device AT keyboard (/dev/input/event4)
[  5952.209] (**) AT keyboard: Applying InputClass "Evdev keyboard"
[  5952.209] (**) AT keyboard: Applying InputClass "libinput keyboard catchall"
[  5952.209] (II) Using input driver 'libinput' for 'AT keyboard'
[  5952.209] (**) AT keyboard: always reports core events
[  5952.210] (II) event4  - AT keyboard: is tagged by udev as: Keyboard
[  5952.211] (II) event4  - AT keyboard: device is a keyboard
[  5952.213] (II) event4  - AT keyboard: device removed
[  5952.213] (II) XINPUT: Adding extended input device "AT keyboard" (type: KEYBOARD, id 9)
[  5952.214] (II) event4  - AT keyboard: is tagged by udev as: Keyboard
[  5952.214] (II) event4  - AT keyboard: device is a keyboard
[  5952.393] (**) ITE Tech. Inc. ITE Device(8910): Applying InputClass "Evdev keyboard"
[  5952.393] (**) ITE Tech. Inc. ITE Device(8910): Applying InputClass "libinput keyboard catchall"
[  5952.394] (II) event6  - ITE Tech. Inc. ITE Device(8910), class 0/0, rev 2.00/0.04, addr 4: is tagged by udev as: Keyboard
[  5952.394] (II) event6  - ITE Tech. Inc. ITE Device(8910), class 0/0, rev 2.00/0.04, addr 4: device is a keyboard
[  5952.398] (II) XINPUT: Adding extended input device "ITE Tech. Inc. ITE Device(8910)" (type: KEYBOARD, id 11)
[  5952.399] (II) event6  - ITE Tech. Inc. ITE Device(8910), class 0/0, rev 2.00/0.04, addr 4: is tagged by udev as: Keyboard
[  5952.400] (II) event6  - ITE Tech. Inc. ITE Device(8910), class 0/0, rev 2.00/0.04, addr 4: device is a keyboard
 
Back
Top