NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-dreamcast/57346: X.org tries to use standard protocol for keyboard regardless of xorg.conf



The following reply was made to PR xsrc/57346; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: tsutsui%ceres.dti.ne.jp@localhost
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
 


Home | Main Index | Thread Index | Old Index