NetBSD Problem Report #57346
From www@netbsd.org Wed Apr 12 17:36:23 2023
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 3C8CB1A9239
for <gnats-bugs@gnats.NetBSD.org>; Wed, 12 Apr 2023 17:36:23 +0000 (UTC)
Message-Id: <20230412173621.2CFB21A923A@mollari.NetBSD.org>
Date: Wed, 12 Apr 2023 17:36:21 +0000 (UTC)
From: vivianne@chinstrap.org
Reply-To: vivianne@chinstrap.org
To: gnats-bugs@NetBSD.org
Subject: X.org tries to use standard protocol for keyboard regardless of xorg.conf
X-Send-Pr-Version: www-1.0
>Number: 57346
>Category: xsrc
>Synopsis: X.org tries to use standard protocol for keyboard regardless of xorg.conf
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: xsrc-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 12 17:40:00 +0000 2023
>Closed-Date: Sat Aug 12 14:20:12 +0000 2023
>Last-Modified: Sat Aug 12 14:20:12 +0000 2023
>Originator: Vivianne Ombretta
>Release: netbsd-10-202304120540Z
>Organization:
>Environment:
NetBSD localhost 10.0_BETA NetBSD 10.0_BETA (GENERIC) #0: Mon Apr 3 18:36:09 UTC 2023 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/dreamcast/compile/GENERIC dreamcast
>Description:
The X server fails to start on NetBSD/dreamcast 10.0 when using the provided /etc/X11/xorg.conf.uskbd or /etc/X11/xorg.conf.jpkbd copied to /etc/X11/xorg.conf.
As shown at 143.474 in the log, it seems to be trying to use the standard protocol for the keyboard regardless of the contents of xorg.conf.
The log is as follows:
[ 97.171]
X.Org X Server 1.21.1.8
X Protocol Version 11, Revision 0
[ 98.034] Current Operating System: NetBSD dreamcast 10.0_BETA NetBSD 10.0_BETA (GENERIC) #0: Mon Apr 3 18:36:09 UTC 2023 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/dreamcast/compile/GENERIC dreamcast
[ 98.175]
[ 98.343] Current version of pixman: 0.38.4
[ 98.593] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 98.636] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 99.525] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Apr 12 13:30:55 2023
[ 99.749] (==) Using config file: "/etc/X11/xorg.conf"
[ 99.839] (==) ServerLayout "wsfb"
[ 99.839] (**) |-->Screen "Screen0" (0)
[ 99.840] (**) | |-->Monitor "Monitor"
[ 99.947] (**) | |-->Device "Wsdisplay0"
[ 99.958] (**) |-->Input Device "Mouse0"
[ 99.959] (**) |-->Input Device "Keyboard0"
[ 99.972] (==) Automatically adding devices
[ 99.972] (==) Automatically enabling devices
[ 99.973] (==) Not automatically adding GPU devices
[ 99.973] (==) Automatically binding GPU devices
[ 99.985] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 100.048] (WW) The directory "/usr/pkg/share/fonts/X11/TTF/" does not exist.
[ 100.049] Entry deleted from font path.
[ 100.072] (WW) The directory "/usr/pkg/share/fonts/X11/misc/" does not exist.
[ 100.073] Entry deleted from font path.
[ 100.073] (WW) The directory "/usr/pkg/share/fonts/X11/TTF/" does not exist.
[ 100.074] Entry deleted from font path.
[ 100.075] (WW) The directory "/usr/pkg/share/fonts/X11/Type1/" does not exist.
[ 100.075] Entry deleted from font path.
[ 100.076] (WW) The directory "/usr/pkg/share/fonts/X11/75dpi/" does not exist.
[ 100.076] Entry deleted from font path.
[ 100.077] (WW) The directory "/usr/pkg/share/fonts/X11/100dpi/" does not exist.
[ 100.077] Entry deleted from font path.
[ 100.078] (**) FontPath set to:
/usr/X11R7/lib/X11/fonts/misc/,
/usr/X11R7/lib/X11/fonts/TTF/,
/usr/X11R7/lib/X11/fonts/Type1/,
/usr/X11R7/lib/X11/fonts/75dpi/,
/usr/X11R7/lib/X11/fonts/100dpi/
[ 100.078] (==) ModulePath set to "/usr/X11R7/lib/modules"
[ 100.090] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[ 100.090] (WW) Disabling Mouse0
[ 100.091] (WW) Disabling Keyboard0
[ 100.102] (II) Loader magic: 0x645c4c
[ 100.103] (II) Module ABI versions:
[ 100.103] X.Org ANSI C Emulation: 0.4
[ 100.104] X.Org Video Driver: 25.2
[ 100.104] X.Org XInput driver : 24.4
[ 100.104] X.Org Server Extension : 10.0
[ 100.187] (II) LoadModule: "glx"
[ 100.386] (II) Loading /usr/X11R7/lib/modules/extensions/libglx.so
[ 100.646] (II) Module glx: vendor="X.Org Foundation"
[ 100.647] compiled for 1.21.1.8, module version = 1.0.0
[ 100.647] ABI class: X.Org Server Extension, version 10.0
[ 100.712] (II) LoadModule: "wsfb"
[ 100.732] (II) Loading /usr/X11R7/lib/modules/drivers/wsfb_drv.so
[ 100.885] (II) Module wsfb: vendor="X.Org Foundation"
[ 100.885] compiled for 1.21.1.8, module version = 0.4.0
[ 100.886] ABI class: X.Org Video Driver, version 25.2
[ 100.893] (II) wsfb: driver for wsdisplay framebuffer: wsfb
[ 100.922] (--) Using wscons driver
[ 100.922] (WW) Falling back to old probe method for wsfb
[ 100.923] (II) wsfb(0): using default device
[ 100.941] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 100.954] (WW) ioctl(WSDISPLAYIO_GET_FBINFO) failed, falling back to old method
[ 100.955] (II) fboffset 0
[ 100.955] (==) wsfb(0): Depth 16, (==) framebuffer bpp 16
[ 100.957] (II) fbi_flags: 0
[ 100.957] (==) wsfb(0): RGB weight 565
[ 100.958] (==) wsfb(0): Default visual is TrueColor
[ 100.959] (==) wsfb(0): Using gamma correction (1.0, 1.0, 1.0)
[ 100.959] (II) wsfb(0): Vidmem: 600k
[ 100.960] (==) wsfb(0): DPI set to (96, 96)
[ 100.960] (==) wsfb(0): Using HW cursor
[ 100.961] (**) wsfb(0): Using "Shadow Framebuffer"
[ 100.962] (II) Loading sub module "shadow"
[ 100.962] (II) LoadModule: "shadow"
[ 100.988] (II) Loading /usr/X11R7/lib/modules/extensions/libshadow.so
[ 101.025] (II) Module shadow: vendor="X.Org Foundation"
[ 101.026] compiled for 1.21.1.8, module version = 1.1.0
[ 101.026] ABI class: X.Org ANSI C Emulation, version 0.4
[ 101.027] (II) Loading sub module "fb"
[ 101.027] (II) LoadModule: "fb"
[ 101.028] (II) Module "fb" already built-in
[ 101.028] (II) Loading sub module "ramdac"
[ 101.029] (II) LoadModule: "ramdac"
[ 101.029] (II) Module "ramdac" already built-in
[ 101.397] (==) wsfb(0): Backing store enabled
[ 101.452] (WW) No HW cursor support found
[ 101.613] (II) Initializing extension Generic Event Extension
[ 101.692] (II) Initializing extension SHAPE
[ 101.730] (II) Initializing extension MIT-SHM
[ 101.775] (II) Initializing extension XInputExtension
[ 101.971] (II) Initializing extension XTEST
[ 102.012] (II) Initializing extension BIG-REQUESTS
[ 102.060] (II) Initializing extension SYNC
[ 102.099] (II) Initializing extension XKEYBOARD
[ 102.149] (II) Initializing extension XC-MISC
[ 102.177] (II) Initializing extension SECURITY
[ 102.367] (II) Initializing extension XFIXES
[ 102.439] (II) Initializing extension XFree86-Bigfont
[ 102.599] (II) Initializing extension RENDER
[ 102.627] (II) Initializing extension RANDR
[ 102.693] (II) Initializing extension COMPOSITE
[ 102.775] (II) Initializing extension DAMAGE
[ 102.802] (II) Initializing extension MIT-SCREEN-SAVER
[ 102.840] (II) Initializing extension DOUBLE-BUFFER
[ 102.878] (II) Initializing extension RECORD
[ 102.917] (II) Initializing extension DPMS
[ 102.928] (II) Initializing extension Present
[ 102.988] (II) Initializing extension DRI3
[ 102.995] (II) Initializing extension X-Resource
[ 103.023] (II) Initializing extension XVideo
[ 103.072] (II) Initializing extension XVideo-MotionCompensation
[ 103.085] (II) Initializing extension GLX
[ 103.191] (II) AIGLX: Screen 0 is not DRI2 capable
[ 108.817] (II) IGLX: Loaded and initialized swrast
[ 108.902] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[ 108.957] (II) Initializing extension XFree86-VidModeExtension
[ 109.152] (II) Initializing extension XFree86-DGA
[ 109.202] (II) Initializing extension XFree86-DRI
[ 109.213] (II) Initializing extension DRI2
[ 141.022] (II) config/wscons: checking input device /dev/wskbd
[ 141.244] (II) wskbd: using layout us
[ 141.360] (II) LoadModule: "kbd"
[ 141.489] (II) Loading /usr/X11R7/lib/modules/drivers/kbd_drv.so
[ 143.311] (II) Module kbd: vendor="X.Org Foundation"
[ 143.318] compiled for 1.21.1.8, module version = 2.0.0
[ 143.319] Module class: X.Org XInput Driver
[ 143.319] ABI class: X.Org XInput driver, version 24.4
[ 143.353] (II) Using input driver 'kbd' for '/dev/wskbd'
[ 143.354] (**) /dev/wskbd: always reports core events
[ 143.398] (**) /dev/wskbd: always reports core events
[ 143.474] (**) Option "Protocol" "standard"
[ 143.542] (**) Option "XkbRules" "base"
[ 143.543] (**) Option "XkbModel" "pc105"
[ 143.543] (**) Option "XkbLayout" "us"
[ 143.728] (II) XINPUT: Adding extended input device "/dev/wskbd" (type: KEYBOARD, id 6)
[ 144.916] (EE)
Fatal server error:
[ 144.917] (EE) can't switch keyboard to raw mode. Enable support for it in the kernel
or use for example:
Option "Protocol" "wskbd"
Option "Device" "/dev/wskbd0"
in your xorg.conf(5) file
[ 144.918] (EE)
[ 144.919] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 144.920] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 144.921] (EE)
[ 145.065] (EE) Server terminated with error (1). Closing log file.
>How-To-Repeat:
Copy a provided xorg conf to /etc/X11/xorg.conf then attempt to start the server with `xinit`.
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-dreamcast-maintainer->xsrc-manager
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Fri, 14 Apr 2023 18:42:14 +0000
Responsible-Changed-Why:
Not dreamcast specific, but generic wscons Xorg server issue.
State-Changed-From-To: open->analyzed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Fri, 14 Apr 2023 18:42:14 +0000
State-Changed-Why:
Problem investigated.
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-dreamcast/57346: X.org tries to use standard protocol for
keyboard regardless of xorg.conf
Date: Sat, 15 Apr 2023 03:38:25 +0900
> [ 141.022] (II) config/wscons: checking input device /dev/wskbd
> [ 141.244] (II) wskbd: using layout us
After several hours investigation, these lines indicate
the following commit that enabled CONFIG_WSCONS caused this fallout:
https://mail-index.netbsd.org/source-changes/2021/12/05/msg134355.html
https://github.com/NetBSD/src/commit/161ee3087f60da29034b592af424445fc986ea4d
>> Log Message:
>> xorg-server: Enable wscons-based autoconfiguration.
>>
>> This gets us features like automatic configuration of touchscreens,
>> and X's default keyboard layout matching the console's.
This changed the following default config values:
https://github.com/NetBSD/xsrc/blob/84795101/external/mit/xorg-server/dist/hw/xfree86/common/xf86Globals.c#L121-L129
---
#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
.forceInputDevices = FALSE,
.autoAddDevices = TRUE,
.autoEnableDevices = TRUE,
#else
.forceInputDevices = TRUE,
.autoAddDevices = FALSE,
.autoEnableDevices = FALSE,
#endif
---
Then NewInputDeviceRequest() in xorg-server/dist/hw/xfree86/common/xf86Xinput.c
looks to override xorg.conf settings
https://github.com/NetBSD/xsrc/blob/84795101/external/mit/xorg-server/dist/hw/xfree86/common/xf86Xinput.c#L1065-L1074
---
if (strcmp(key, "_source") == 0 &&
(strcmp(value, "server/hal") == 0 ||
strcmp(value, "server/udev") == 0 ||
strcmp(value, "server/wscons") == 0)) {
is_auto = 1;
if (!xf86Info.autoAddDevices) {
rval = BadMatch;
goto unwind;
}
}
---
Adding the following lines in /etc/X11/xorg.conf works around:
--- xorg.conf.uskbd 2023-04-04 03:36:09.000000000 +0900
+++ xorg.conf 2023-04-15 03:30:13.184604411 +0900
@@ -7,6 +7,10 @@
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
+Section "ServerFlags"
+ Option "AutoAddDevices" "false"
+EndSection
+
Section "Files"
FontPath "/usr/pkg/share/fonts/X11/TTF/"
EndSection
---
But I'm not sure what's correct.
mrg@ ? nia@ ?
---
Izumi Tsutsui
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57346 CVS commit: src/external/mit/xorg/etc
Date: Tue, 8 Aug 2023 14:34:21 +0000
Module Name: src
Committed By: tsutsui
Date: Tue Aug 8 14:34:21 UTC 2023
Modified Files:
src/external/mit/xorg/etc/etc.dreamcast: xorg.conf.jpkbd
xorg.conf.uskbd
src/external/mit/xorg/etc/etc.hpc: xorg.conf.640x240-jp
xorg.conf.640x240-us xorg.conf.640x480-jp xorg.conf.640x480-us
xorg.conf.800x600-jp xorg.conf.800x600-us
src/external/mit/xorg/etc/etc.hpcarm: xorg.conf.ws003sh
xorg.conf.ws007sh xorg.conf.ws011sh xorg.conf.ws020sh
src/external/mit/xorg/etc/etc.zaurus: xorg.conf.C3x00 xorg.conf.C7x0
Log Message:
Specify options "AutoAddDevices" to prefer xorg.conf keyboard options.
Fixes PR/57346.
Should be pulled up to netbsd-10.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-us
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws003sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws007sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws011sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws020sh
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 \
src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: analyzed->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 12 Aug 2023 08:51:20 +0000
State-Changed-Why:
[pullup-10 #324]
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57346 CVS commit: [netbsd-10] src/external/mit/xorg/etc
Date: Sat, 12 Aug 2023 12:47:48 +0000
Module Name: src
Committed By: martin
Date: Sat Aug 12 12:47:48 UTC 2023
Modified Files:
src/external/mit/xorg/etc/etc.dreamcast [netbsd-10]: xorg.conf.jpkbd
xorg.conf.uskbd
src/external/mit/xorg/etc/etc.hpc [netbsd-10]: xorg.conf.640x240-jp
xorg.conf.640x240-us xorg.conf.640x480-jp xorg.conf.640x480-us
xorg.conf.800x600-jp xorg.conf.800x600-us
src/external/mit/xorg/etc/etc.hpcarm [netbsd-10]: xorg.conf.ws003sh
xorg.conf.ws007sh xorg.conf.ws011sh xorg.conf.ws020sh
src/external/mit/xorg/etc/etc.zaurus [netbsd-10]: xorg.conf.C3x00
xorg.conf.C7x0
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #324):
external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0: revision 1.3
external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0: revision 1.4
external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd: revision 1.4
external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp: revision 1.4
external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd: revision 1.5
external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp: revision 1.5
external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd: revision 1.4
external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd: revision 1.5
external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00: revision 1.3
external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00: revision 1.4
external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-us: revision 1.4
external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us: revision 1.4
external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-us: revision 1.5
external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us: revision 1.5
external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws007sh: revision 1.4
external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws007sh: revision 1.5
external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws020sh: revision 1.4
external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws011sh: revision 1.4
external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-us: revision 1.4
external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws020sh: revision 1.5
external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws011sh: revision 1.5
external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws003sh: revision 1.4
external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-us: revision 1.5
external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws003sh: revision 1.5
external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-jp: revision 1.4
external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp: revision 1.4
external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-jp: revision 1.5
external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp: revision 1.5
Specify options "AutoAddDevices" to prefer xorg.conf keyboard options.
Fixes PR/57346.
Remove trailing tabs.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.34.1 \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd
cvs rdiff -u -r1.3 -r1.3.34.1 \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-us
cvs rdiff -u -r1.3 -r1.3.34.1 \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws003sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws007sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws011sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws020sh
cvs rdiff -u -r1.2 -r1.2.34.1 \
src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 \
src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 12 Aug 2023 14:20:12 +0000
State-Changed-Why:
Pullup done.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.