Solved Xorg/udev: KDE keyboard shortcuts using Meta key don't work anymore

guidok

Member

Reaction score: 8
Messages: 28

I have upgraded all my packages (using the latest repo) on my FreeBSD 12.1 running laptop to pull in Xorg 1.20 with udev support. This has been a massive improvement for the usability of the touchpad on my Thinkpad T480. However none of the KDE keyboard shortcuts that use the Meta key (windows key or command key on apple external keyboards) work anymore. Eg. Meta+E (start Dolphin), Meta+L (Lock Screen) do not work.
It does not matter whether I use kern.evdev.rcpt_mask=12 or kern.evdev.rcpt_mask=6.

Running xev does show the Meta key is still recognized by Xorg. Hence my suspicion this is a KDE issue.

With kern.evdev.rcpt_mask=12
Code:
KeyPress event, serial 40, synthetic NO, window 0x7a00001,
    root 0x189, subw 0x0, time 268983, (-792,581), root:(785,753),
    state 0x10, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x7a00001,
    root 0x189, subw 0x0, time 269150, (-792,581), root:(785,753),
    state 0x50, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
With kern.evdev.rcpt_mask=6
Code:
KeyPress event, serial 40, synthetic NO, window 0x7a00001,
    root 0x189, subw 0x0, time 451913, (-445,470), root:(674,773),
    state 0x10, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x7a00001,
    root 0x189, subw 0x0, time 452015, (-445,470), root:(674,773),
    state 0x50, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
Although I'm using Dvorak keyboard layout, the problem also occurs if I use a regular QWERTY layout:

setxkbmap -print -verbose
Code:
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us(dvorak)+us:2+inet(evdev)+terminate(ctrl_alt_bksp)
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us(dvorak)+us:2+inet(evdev)+terminate(ctrl_alt_bksp)"       };
        xkb_geometry  { include "pc(pc105)"     };
};
I'm running two things compiled from ports, but I don't think they are of influence:

pkg lock -l
Code:
drm-fbsd12.0-kmod-4.16.g20200221
gpu-firmware-kmod-g20200130
Any suggestions on how to troubleshoot this further?
 
OP
guidok

guidok

Member

Reaction score: 8
Messages: 28

The above was an issue for the past two days. Just now, over lunch, I installed plasma5-sddm-kcm-5.18.1 to muck around with SDDM and I noticed the Meta keyboard shortcuts suddenly worked again.

Can't imagine how this might have 'fixed' it. But fixed it is.
 

DusTech

Member

Reaction score: 1
Messages: 24

I'm having the same issue... meta+e does not run dolphin... I'll try install sddm
 

Menelkir

Member

Reaction score: 41
Messages: 48

I have all of them installed (dolphin, sddm, sddm-kcm) and meta doesn't work at all. I did every tip I could read, like deleting the shortcut and remapping again to ALT+F1, etc. None of them seems to work, not sure whats happening.

Update: I had to reinstall, this time with iichid and stuff, it works now so I'm not sure what was the problem anymore.
 
Last edited:
OP
guidok

guidok

Member

Reaction score: 8
Messages: 28

Disclaimer: I still don't know what caused the issue for me to apparently solved itself.

However I think after updating to Xorg 1.20 you need to update your Xorg config files to take advantage of the new udev/evdev backend. Currently I have only one config file in /usr/local/etc/X11/xorg.conf.d, namely 44-my-libinput.conf with the following contents:

Code:
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "XkbLayout" "us"
        Option "XkbVariant" "dvorak"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection
Don't simply copy and paste this unless you know how to use Dvorak keyboard layout ;-) Anyway this file was a copy from /usr/local/share/X11/xorg.conf.d/40-libinput.conf and editted for my needs (touchscreen section removed, Dvorak added). You might need to do something similar.

Edit: Oh, and my kern.evdev.rcpt_mask is currently set to 6
 

mickey

Aspiring Daemon

Reaction score: 189
Messages: 578

However I think after updating to Xorg 1.20 you need to update your Xorg config files to take advantage of the new udev/evdev backend. Currently I have only one config file in /usr/local/etc/X11/xorg.conf.d, namely 44-my-libinput.conf with the following contents:

Code:
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "XkbLayout" "us"
        Option "XkbVariant" "dvorak"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection
Don't simply copy and paste this unless you know how to use Dvorak keyboard layout ;-) Anyway this file was a copy from /usr/local/share/X11/xorg.conf.d/40-libinput.conf and editted for my needs (touchscreen section removed, Dvorak added). You might need to do something similar.
Most of that stuff is superfluous, the first and last sections effectively accomplish nothing. You only need to complement/override settings made by the system configuration files that are installed by the port/pkg. In your case, changing the keyboard layout and variant should be sufficient:
Code:
Section "InputClass"
    Identifier "Dvorak Keyboard"
    MatchIsKeyboard "on"
    Option "XkbLayout" "us"
    Option "XkbVariant" "dvorak"
EndSection
 
OP
guidok

guidok

Member

Reaction score: 8
Messages: 28

Most of that stuff is superfluous, the first and last sections effectively accomplish nothing. You only need to complement/override settings made by the system configuration files that are installed by the port/pkg. In your case, changing the keyboard layout and variant should be sufficient:
Code:
Section "InputClass"
    Identifier "Dvorak Keyboard"
    MatchIsKeyboard "on"
    Option "XkbLayout" "us"
    Option "XkbVariant" "dvorak"
EndSection
Seems logical, though when I tried doing exactly that my trackpad stopped working. Haven't had time to troubleshoot yet. For now I'll stick to my three section long config.
 

arrowd

New Member
Developer


Messages: 1

I also bumped into this problem. Installing `sddm` things did not help.
 

Crocodillian

New Member


Messages: 3

I just ran into this problem on a fresh 12.1-STABLE install, but I found a solution that works for me:

Change your default session in sddm from `plasma.desktop` to `xinitrc.desktop`.

Then in your `~/.xinitrc` put something like this:

Bash:
#!/bin/sh

setxkbmap -option ctrl:nocaps

exec ck-launch-session dbus-launch --exit-with-session startplasma-x11
and

chmod +x ~/.xinitrc # for good measure

This is the better way to manage your xorg startup anyway.
 
Top