Bug 244129

Summary: x11-servers/xwayland: use evdev xkb rules by default
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: freebsd-x11 mailing list <x11>
Status: Closed FIXED    
Severity: Affects Only Me CC: manu, zeising
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (x11)
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 196678    
Attachments:
Description Flags
v1 none

Description Jan Beich freebsd_committer 2020-02-14 18:18:19 UTC
Created attachment 211654 [details]
v1

Wayland on FreeBSD only supports evdev(4) input devices, so use matching xkb rules. This fixes at least Down (arrow) and Left (arrow) key repeat behavior. Only necessary if using autotools.

configure.ac:
  AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
				     [Keyboard ruleset (default: base/evdev)]),
				  [ XKB_DFLT_RULES="$withval" ],
				  [ XKB_DFLT_RULES="" ])
  if test "x$XKB_DFLT_RULES" = x; then
      case $host_os in
      linux*)
	  dnl doesn't take AutoAddDevices into account, but whatever.
	  XKB_DFLT_RULES="evdev"
	  ;;
      *)
	  XKB_DFLT_RULES="base"
	  ;;
      esac
  fi

meson_options.txt:
  option('xkb_default_rules', type: 'string', value: 'evdev')
Comment 1 Emmanuel Vadot freebsd_committer 2020-02-17 16:46:30 UTC
LGTM
I guess that we don't care about 11.3 for xwayland as it doesn't have evdev(4) enabled in GENERIC (and probably missing drivers too I can't remember).
Comment 2 Jan Beich freebsd_committer 2020-02-17 17:50:21 UTC
(In reply to Emmanuel Vadot from comment #1)
> we don't care about 11.3 for xwayland as it doesn't have evdev(4) enabled in GENERIC

xwayland has just 2 consumers in ports: plasma5-kwin and wlroots (e.g., sway, hikari). Both use libinput. Not sure about the former but wlroots won't work on 11.3 without the following:
https://github.com/FreeBSDDesktop/kms-drm/pull/213 (already required)
https://github.com/FreeBSDDesktop/kms-drm/pull/211 (soon to be required)

swc (not packaged in FreeBSD but exists in PkgSrc) doesn't use evdev/libinput but also no longer supports xwayland, see https://github.com/michaelforney/swc/issues/49
Comment 3 commit-hook freebsd_committer 2020-02-20 21:16:16 UTC
A commit references this bug:

Author: zeising
Date: Thu Feb 20 21:15:59 UTC 2020
New revision: 526589
URL: https://svnweb.freebsd.org/changeset/ports/526589

Log:
  Update xorg x11 servers to 1.20.7

  Update xorg x11 servers to 1.20.7.  This updates x11-servers/xorg-server,
  xephyr, xorg-dmx, xorg-nestserver, xorg-vbserver and xwayland.

  Enable the UDEV backend by default, instead of the DEVD backend, for
  autoconfiguration of input devices on FreeBSD 12 and later.
  FreeBSD 11 lacks the needed support in base and will keep on using the DEVD
  backend.
  Support for the HAL backend is dropped completely, it has been deprecated
  for a long time.
  Update and improve the DEVD backend.
  Add a pkg message about sysctl configuration that might be needed when using
  UDEV.

  Use the upstream fix for glamour issues.

  Use evdev xkb rules by default in xwayland [2]

  Add x11-drivers/xf86-input-libinput to the list installed by default by
  x11-drivers/xorg-drivers.

  Fix net/tigervnc-server and emulators/virtualbox-ose

  Bump portrevision of all x11 drivers, as well as other ports dependent on
  xorg-server.

  This represents work by many people over a long period.  These include
  wulf, ak, dumbbell, hselasky pete AT nomadlogic DOT org, jbeich, manu,
  myself and possibly others (I tried to look through history, but might have
  missed people. If so, I am sorry.)

  PR:             196678 [1], 244129 [2]
  Submitted by:   hselasky, wulf [1], jbeich [2]
  Obtained from:	https://github.com/FreeBSDDesktop/freebsd-ports/tree/feature/xserver-1.20 (in part)

Changes:
  head/deskutils/easystroke/Makefile
  head/emulators/virtualbox-ose/Makefile
  head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_x11_vboxmouse_Makefile.kmk
  head/emulators/virtualbox-ose-additions/Makefile
  head/net/tigervnc-server/Makefile
  head/net/tigervnc-server/Makefile.common.mk
  head/net/tigervnc-server/files/patch-unix_xserver_hw_vnc_xvnc.c
  head/x11/nvidia-driver/Makefile
  head/x11/nvidia-driver-304/Makefile
  head/x11/nvidia-driver-340/Makefile
  head/x11/nvidia-driver-390/Makefile
  head/x11/slim/Makefile
  head/x11-drivers/xf86-input-egalax/Makefile
  head/x11-drivers/xf86-input-elographics/Makefile
  head/x11-drivers/xf86-input-evdev/Makefile
  head/x11-drivers/xf86-input-joystick/Makefile
  head/x11-drivers/xf86-input-keyboard/Makefile
  head/x11-drivers/xf86-input-libinput/Makefile
  head/x11-drivers/xf86-input-mouse/Makefile
  head/x11-drivers/xf86-input-synaptics/Makefile
  head/x11-drivers/xf86-input-vmmouse/Makefile
  head/x11-drivers/xf86-input-void/Makefile
  head/x11-drivers/xf86-input-wacom/Makefile
  head/x11-drivers/xf86-video-amdgpu/Makefile
  head/x11-drivers/xf86-video-apm/Makefile
  head/x11-drivers/xf86-video-ark/Makefile
  head/x11-drivers/xf86-video-ast/Makefile
  head/x11-drivers/xf86-video-ati/Makefile
  head/x11-drivers/xf86-video-ati-legacy/Makefile
  head/x11-drivers/xf86-video-chips/Makefile
  head/x11-drivers/xf86-video-cirrus/Makefile
  head/x11-drivers/xf86-video-dummy/Makefile
  head/x11-drivers/xf86-video-geode/Makefile
  head/x11-drivers/xf86-video-glint/Makefile
  head/x11-drivers/xf86-video-i128/Makefile
  head/x11-drivers/xf86-video-i740/Makefile
  head/x11-drivers/xf86-video-intel/Makefile
  head/x11-drivers/xf86-video-mach64/Makefile
  head/x11-drivers/xf86-video-mga/Makefile
  head/x11-drivers/xf86-video-neomagic/Makefile
  head/x11-drivers/xf86-video-nv/Makefile
  head/x11-drivers/xf86-video-openchrome/Makefile
  head/x11-drivers/xf86-video-qxl/Makefile
  head/x11-drivers/xf86-video-r128/Makefile
  head/x11-drivers/xf86-video-rendition/Makefile
  head/x11-drivers/xf86-video-s3/Makefile
  head/x11-drivers/xf86-video-s3virge/Makefile
  head/x11-drivers/xf86-video-savage/Makefile
  head/x11-drivers/xf86-video-scfb/Makefile
  head/x11-drivers/xf86-video-siliconmotion/Makefile
  head/x11-drivers/xf86-video-sis/Makefile
  head/x11-drivers/xf86-video-sunffb/Makefile
  head/x11-drivers/xf86-video-tdfx/Makefile
  head/x11-drivers/xf86-video-trident/Makefile
  head/x11-drivers/xf86-video-tseng/Makefile
  head/x11-drivers/xf86-video-vesa/Makefile
  head/x11-drivers/xf86-video-vmware/Makefile
  head/x11-drivers/xf86-video-voodoo/Makefile
  head/x11-drivers/xorg-drivers/Makefile
  head/x11-drivers/xorgxrdp/Makefile
  head/x11-servers/xephyr/Makefile
  head/x11-servers/xorg-dmx/Makefile
  head/x11-servers/xorg-nestserver/Makefile
  head/x11-servers/xorg-nestserver/distinfo
  head/x11-servers/xorg-server/Makefile
  head/x11-servers/xorg-server/distinfo
  head/x11-servers/xorg-server/files/20-evdev-kbd.conf
  head/x11-servers/xorg-server/files/config_Makefile.am
  head/x11-servers/xorg-server/files/configure.ac
  head/x11-servers/xorg-server/files/hw_xfree86_Makefile.am
  head/x11-servers/xorg-server/files/patch-CVE-2017-10971
  head/x11-servers/xorg-server/files/patch-CVE-2017-10972
  head/x11-servers/xorg-server/files/patch-CVE-2017-12176
  head/x11-servers/xorg-server/files/patch-CVE-2017-12177
  head/x11-servers/xorg-server/files/patch-CVE-2017-12178
  head/x11-servers/xorg-server/files/patch-CVE-2017-12179
  head/x11-servers/xorg-server/files/patch-CVE-2017-12183
  head/x11-servers/xorg-server/files/patch-CVE-2017-1218x
  head/x11-servers/xorg-server/files/patch-CVE-2017-1218y
  head/x11-servers/xorg-server/files/patch-CVE-2017-13721
  head/x11-servers/xorg-server/files/patch-CVE-2017-13723
  head/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-misc-Makefile.in
  head/x11-servers/xorg-server/files/patch-config_Makefile.in
  head/x11-servers/xorg-server/files/patch-config_config-backends.h
  head/x11-servers/xorg-server/files/patch-config_config.c
  head/x11-servers/xorg-server/files/patch-config_devd.c
  head/x11-servers/xorg-server/files/patch-config_udev.c
  head/x11-servers/xorg-server/files/patch-configure
  head/x11-servers/xorg-server/files/patch-glamor_glamor__dash.c
  head/x11-servers/xorg-server/files/patch-hw_xfree86_Makefile.in
  head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86AutoConfig.c
  head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Config.c
  head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Globals.c
  head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Xinput.c
  head/x11-servers/xorg-server/files/patch-hw_xfree86_dri2_pci__ids_i965__pci__ids.h
  head/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd__init.c
  head/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_i386__video.c
  head/x11-servers/xorg-server/files/patch-hw_xfree86_xorg-wrapper.c
  head/x11-servers/xorg-server/files/patch-include_dix-config.h.in
  head/x11-servers/xorg-server/files/patch-os_io.c
  head/x11-servers/xorg-server/files/patch-test_xtest.c
  head/x11-servers/xorg-server/files/patch-xkb_Makefile.in
_U  head/x11-servers/xorg-server/files/pkg-deinstall.in
_U  head/x11-servers/xorg-server/files/pkg-install.in
  head/x11-servers/xorg-server/files/xkb_Makefile.am
  head/x11-servers/xorg-server/pkg-message
  head/x11-servers/xorg-server/pkg-plist
  head/x11-servers/xorg-vfbserver/Makefile
  head/x11-servers/xorg-vfbserver/distinfo
  head/x11-servers/xwayland/Makefile
  head/x11-servers/xwayland/distinfo