NetBSD Problem Report #58153
From www@netbsd.org Mon Apr 15 03:50:55 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 40EBF1A9238
for <gnats-bugs@gnats.NetBSD.org>; Mon, 15 Apr 2024 03:50:55 +0000 (UTC)
Message-Id: <20240415035053.B995F1A923A@mollari.NetBSD.org>
Date: Mon, 15 Apr 2024 03:50:53 +0000 (UTC)
From: rwhitlock22@gmail.com
Reply-To: rwhitlock22@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Listing grabs with XF86LogGrabInfo
X-Send-Pr-Version: www-1.0
>Number: 58153
>Category: xsrc
>Synopsis: Listing grabs with XF86LogGrabInfo
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: xsrc-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 15 03:55:00 +0000 2024
>Last-Modified: Sat Oct 31 15:15:01 +0000 2026
>Originator: Robert Whitlock
>Release: 10.0
>Organization:
>Environment:
NetBSD 10.0, amd64, GENERIC
>Description:
The Internet suggests performing
xdotool key XF86LogGrabInfo
in order to list grabs that are currently running on the server, however it outputs
(symbol) No such key name 'XF86LogGrabInfo'. Ignoring it.
(symbol) No such key name 'XF86LogGrabInfo'. Ignoring it.
and does not print anything to the log file. I ran it through a debugger and it seems like it's failing because XStringToKeysym is returning NoSymbol when passed "XF86LogGrabInfo", as illustrated by the following code:
0 thinkpad$ cat m.c
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
int main() {
Display *dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "XOpenDisplay failed.\n");
exit (1);
}
KeySym ksym = XStringToKeysym("XF86LogGrabInfo");
printf("Keysym: %lu\n", (unsigned long)ksym);
XCloseDisplay(dpy);
}
0 thinkpad$ cat Makefile
a.out: m.c
cc -I/usr/X11R7/include -L/usr/X11R7/lib m.c -lX11 -Wl,-R/usr/X11R7/lib
0 thinkpad$ make
cc -I/usr/X11R7/include -L/usr/X11R7/lib m.c -lX11 -Wl,-R/usr/X11R7/lib
0 thinkpad$ ./a.out
Keysym: 0
0 thinkpad$
In a message on netbsd-users@, RVP suggested applying the patch below, which did correct the problem. (see [1])
diff -urN a/xsrc/external/mit/libX11/dist/src/XKeysymDB b/xsrc/external/mit/libX11/dist/src/XKeysymDB
--- a/xsrc/external/mit/libX11/dist/src/XKeysymDB 2010-11-28 07:34:33.000000000 +0000
+++ b/xsrc/external/mit/libX11/dist/src/XKeysymDB 2024-03-25 21:36:39.970222356 +0000
@@ -370,6 +370,9 @@
XF86_ClearGrab :1008FE21
XF86_Next_VMode :1008FE22
XF86_Prev_VMode :1008FE23
+XF86LogWindowTree :1008FE24
+XF86LogGrabInfo :1008FE25
+
usldead_acute :100000A8
usldead_grave :100000A9
...although the other suggestion that was made did not work, which was
xdotool key Ctrl+Alt+F11
and which just reported "Failed to switch from vt05 to vt11: Invalid argument" in /var/log/Xorg.0.log.
[1] https://mail-index.netbsd.org/netbsd-users/2024/03/25/msg030829.html
>How-To-Repeat:
See above.
>Fix:
Apply the patch.
>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: mrg@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: xsrc/58153: Listing grabs with XF86LogGrabInfo
Date: Sun, 1 Nov 2026 00:13:11 +0900
> In a message on netbsd-users@, RVP suggested applying the patch below, which did correct the problem. (see [1])
>
> diff -urN a/xsrc/external/mit/libX11/dist/src/XKeysymDB b/xsrc/external/mit/libX11/dist/src/XKeysymDB
> --- a/xsrc/external/mit/libX11/dist/src/XKeysymDB 2010-11-28 07:34:33.000000000 +0000
> +++ b/xsrc/external/mit/libX11/dist/src/XKeysymDB 2024-03-25 21:36:39.970222356 +0000
> @@ -370,6 +370,9 @@
> XF86_ClearGrab :1008FE21
> XF86_Next_VMode :1008FE22
> XF86_Prev_VMode :1008FE23
> +XF86LogWindowTree :1008FE24
> +XF86LogGrabInfo :1008FE25
> +
>
> usldead_acute :100000A8
> usldead_grave :100000A9
This "missing `XF86LogWindowTree` and `XF86LogGrabInfo` keysyms"
also causes the following (annoying) warnings on xkbcomp(1):
```
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error: Couldn't lookup keysym
> Symbol interpretation ignored
> Error: Couldn't lookup keysym
> Symbol interpretation ignored
Errors from xkbcomp are not fatal to the X server
```
It looks this is caused by mismatch of our reachover X11 build rules
in src/external/mit/xorg/tools/makekeys/Makefile.makekeys:
```
--- Makefile.makekeys.orig 2015-07-18 21:13:10.000000000 +0900
+++ Makefile.makekeys 2026-10-30 08:42:23.000000000 +0900
@@ -3,9 +3,13 @@
DPSRCS+= ks_tables.h
CLEANFILES+= ks_tables.h
-KSDEF= ${DESTDIR}${X11INCDIR}/X11/keysymdef.h
+KSDEFS= ${DESTDIR}${X11INCDIR}/X11/keysymdef.h \
+ ${DESTDIR}${X11INCDIR}/X11/XF86keysym.h \
+ ${DESTDIR}${X11INCDIR}/X11/Sunkeysym.h \
+ ${DESTDIR}${X11INCDIR}/X11/DECkeysym.h \
+ ${DESTDIR}${X11INCDIR}/X11/HPkeysym.h
-ks_tables.h: ${KSDEF}
+ks_tables.h: ${KSDEFS}
${_MKTARGET_CREATE}
rm -f ${.TARGET}
- ${TOOL_MAKEKEYS} ${KSDEF} > ${.TARGET}
+ ${TOOL_MAKEKEYS} ${KSDEFS} > ${.TARGET}
```
In upstream libX11 1.3.6, vendor keysym files were added to generate
ks_tables.h:
https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/00175397480b76d32bf82b0c7c94c91a2a95954e
https://github.com/mirror/libX11/commit/00175397480b76d32bf82b0c7c94c91a2a95954e
```
- KEYSYMDEF="$dir/X11/keysymdef.h"
- if test -f "$KEYSYMDEF"; then
- AC_MSG_RESULT([$KEYSYMDEF])
- else
- AC_MSG_ERROR([Cannot find keysymdef.h])
- fi
- AC_SUBST(KEYSYMDEF)
+ FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
+ for i in $FILES; do
+ if test -f "$KEYSYMDEFDIR/$i"; then
+ KEYSYMDEFS="$KEYSYMDEFS $KEYSYMDEFDIR/$i"
+ elif test "x$i" = "xkeysymdef.h"; then
+ AC_MSG_ERROR([Cannot find keysymdef.h])
+ fi
+ done
+ AC_MSG_RESULT([$KEYSYMDEFS])
+ AC_SUBST(KEYSYMDEFS)
```
and XKeysymDB was also removed:
https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/eb023c0f8919e809b8b609e1467b14d20a290aa7
https://github.com/mirror/libX11/commit/eb023c0f8919e809b8b609e1467b14d20a290aa7
```
- x11data_DATA = XKeysymDB XErrorDB
+ x11data_DATA = XErrorDB
```
We also once removed XKeysymDB after libX11 1.3.6 import:
https://mail-index.netbsd.org/source-changes/2010/11/22/msg015021.html
> merge libX11 1.3.6 - delete XKeysymDB.
https://mail-index.netbsd.org/source-changes/2010/11/22/msg015024.html
> merge libX11 1.3.6
but due to lack of ks_tables.h fix, it caused PR/44137
(new X breaks keyboard) and the XKeysymDB file was restored:
https://gnats.netbsd.org/44137
https://cvsweb.netbsd.org/bsdweb.cgi/xsrc/external/mit/libX11/dist/src/XKeysymDB
> re-install the phoenixed XKeysymDB, since keyboards don't work without it.
Maybe the right fix to pull vendor keysyms and actually remove
to-be-oboslete XKeysymDB?
Thanks,
---
Izumi Tsutsui
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.