From owner-freebsd-x11@FreeBSD.ORG Thu Feb 13 16:00:21 2014 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79125308 for ; Thu, 13 Feb 2014 16:00:21 +0000 (UTC) Received: from master.debian.org (master.debian.org [IPv6:2001:41b8:202:deb:216:36ff:fe40:4001]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5BA2213B0 for ; Thu, 13 Feb 2014 16:00:20 +0000 (UTC) Received: from localhost ([::1]) by master.debian.org with esmtp (Exim 4.80) (envelope-from ) id 1WDyht-0006oz-Vj; Thu, 13 Feb 2014 16:00:17 +0000 Message-ID: <52FCEC09.8080409@freebsd.org> Date: Thu, 13 Feb 2014 16:00:09 +0000 From: Robert Millan User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Alex Kozlov Subject: Re: [PATCH] do not feed keyboard device path in X devd backend References: <52EFA9A9.2040901@freebsd.org> <52F61969.2060503@freebsd.org> <20140208135404.GA75736@ravenloft.kiev.ua> <52F63866.80505@freebsd.org> <20140209102615.GA11713@ravenloft.kiev.ua> In-Reply-To: <20140209102615.GA11713@ravenloft.kiev.ua> X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------000806030500040006080909" X-Mailman-Approved-At: Thu, 13 Feb 2014 20:04:46 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 16:00:21 -0000 This is a multi-part message in MIME format. --------------000806030500040006080909 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 09/02/2014 10:26, Alex Kozlov wrote: > On Sat, Feb 08, 2014 at 02:00:06PM +0000, Robert Millan wrote: >> >> Hi Alex, >> >> On 08/02/2014 13:54, Alex Kozlov wrote: >>>> Here's a patch that implements the same behaviour with devd. I've verified >>>> that attaching/detaching a second keyboard no longer causes this ill effect. >>> Can you please check if devd patch from xorg-dev work for you? >>> http://trillian.chruetertee.ch/ports/browser/trunk/x11-servers/xorg-server/files/extra-devd >> >> My patches are precisely against this file (devd.c). The pristine code doesn't work, but >> with the collection of fixes I just sent everything is working fine here (been using that >> for one week or so). > Can you please provide Xorg.x.log before and after applying this patch? Here. Note that both versions are patched (the double-free fixes are a must). Their only difference is that "devd+full" includes this patch, and "devd+half" doesn't. The logs correspond each to the following sequence of events: - USB keyboard and mouse are connected. - X starts. - USB keyboard is detached. - USB keyboard is attached. - X stops. In this sequence, with "devd+half" keyboard didn't work at all (at any point) because of the failed open() attempts, whereas with "devd+full" it worked every time (as long as it was attached, of course). I'm also attaching a diff obtained with a bit of sed magic to discard the irrelevant timestamp differences. This should make them easier to compare. -- Robert Millan --------------000806030500040006080909 Content-Type: text/plain; charset=UTF-8; name="devd.logdiff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="devd.logdiff" --- /dev/fd/63 2014-02-13 17:27:29.000000000 +0100 +++ /dev/fd/62 2014-02-13 17:27:29.000000000 +0100 @@ -4,15 +4,15 @@ X Protocol Version 11, Revision 0 Build Operating System: GNU/kFreeBSD 9.0-2-amd64 x86_64 Debian Current Operating System: GNU/kFreeBSD tv 10.0-1-amd64 #0 Sat, 08 Feb 2014 15:14:00 +0100 x86_64 -Build Date: 13 February 2014 04:38:01PM -xorg-server 2:1.15.0-2+devd+half (http://www.debian.org/support) +Build Date: 13 February 2014 04:19:12PM +xorg-server 2:1.15.0-2+devd+full (http://www.debian.org/support) Current version of pixman: 0.32.4 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. -(==) Log file: "/var/log/Xorg.0.log", Time: Thu Feb 13 17:44:11 2014 +(==) Log file: "/var/log/Xorg.0.log", Time: Thu Feb 13 17:32:55 2014 (==) Using system config directory "/usr/share/X11/xorg.conf.d" (==) No Layout section. Using the first Screen section. (==) No screen section available. Using defaults. @@ -2671,32 +2671,24 @@ (EE) AIGLX: reverting to software rendering (II) AIGLX: Loaded and initialized swrast (II) GLX: Initialized DRISWRAST GL provider for screen 0 -(II) config/devd: Adding input device Keyboard (/dev/ukbd0) -(**) Keyboard: Applying InputClass "kbd catchall" +(II) config/devd: Adding AT Keyboard +(**) AT Keyboard: Applying InputClass "kbd catchall" (II) LoadModule: "kbd" (II) Loading /usr/lib/xorg/modules/input/kbd_drv.so (II) Module kbd: vendor="X.Org Foundation" compiled for 1.15.0, module version = 1.8.0 Module class: X.Org XInput Driver ABI class: X.Org XInput driver, version 20.0 -(II) Using input driver 'kbd' for 'Keyboard' -(**) Keyboard: always reports core events -(**) Keyboard: always reports core events +(II) Using input driver 'kbd' for 'AT Keyboard' +(**) AT Keyboard: always reports core events +(**) AT Keyboard: always reports core events (**) Option "Protocol" "standard" -(**) Option "Device" "/dev/ukbd0" -(EE) Keyboard: cannot open "/dev/ukbd0" -(EE) PreInit returned 8 for "Keyboard" -(II) UnloadModule: "kbd" -(II) config/devd: Adding input device Keyboard (/dev/atkbd0) -(**) Keyboard: Applying InputClass "kbd catchall" -(II) Using input driver 'kbd' for 'Keyboard' -(**) Keyboard: always reports core events -(**) Keyboard: always reports core events -(**) Option "Protocol" "standard" -(**) Option "Device" "/dev/atkbd0" -(EE) Keyboard: cannot open "/dev/atkbd0" -(EE) PreInit returned 8 for "Keyboard" -(II) UnloadModule: "kbd" +(WW) Option "Device" requires a string value +(**) Option "XkbRules" "base" +(**) Option "XkbModel" "pc105" +(**) Option "XkbLayout" "us" +(**) Option "config_info" "devd:AT Keyboard" +(II) XINPUT: Adding extended input device "AT Keyboard" (type: KEYBOARD, id 6) (II) config/devd: Adding input device 0x04b3 product 0x310d (/dev/ums0) (**) 0x04b3 product 0x310d: Applying InputClass "mouse catchall" (II) LoadModule: "mouse" @@ -2714,7 +2706,7 @@ (**) 0x04b3 product 0x310d: ZAxisMapping: buttons 4 and 5 (**) 0x04b3 product 0x310d: Buttons: 9 (**) Option "config_info" "devd:ums0" -(II) XINPUT: Adding extended input device "0x04b3 product 0x310d" (type: MOUSE, id 6) +(II) XINPUT: Adding extended input device "0x04b3 product 0x310d" (type: MOUSE, id 7) (**) 0x04b3 product 0x310d: (accel) keeping acceleration scheme 1 (**) 0x04b3 product 0x310d: (accel) acceleration profile 0 (**) 0x04b3 product 0x310d: (accel) acceleration factor: 2.000 @@ -2722,17 +2714,6 @@ (II) 0x04b3 product 0x310d: SetupAuto: hw.iftype is 5, hw.model is 0 (II) 0x04b3 product 0x310d: SetupAuto: protocol is SysMouse (WW) fcntl(9, F_SETOWN): Inappropriate ioctl for device -(II) VESA(0): Setting up VESA Mode 0x166 (1280x1024) -(WW) fcntl(9, F_SETOWN): Inappropriate ioctl for device -(II) config/devd: Adding input device Keyboard (/dev/ukbd0) -(**) Keyboard: Applying InputClass "kbd catchall" -(II) Using input driver 'kbd' for 'Keyboard' -(**) Keyboard: always reports core events -(**) Keyboard: always reports core events -(**) Option "Protocol" "standard" -(**) Option "Device" "/dev/ukbd0" -(EE) Keyboard: cannot open "/dev/ukbd0" -(EE) PreInit returned 8 for "Keyboard" -(II) UnloadModule: "kbd" (II) UnloadModule: "mouse" +(II) UnloadModule: "kbd" (EE) Server terminated successfully (0). Closing log file. --------------000806030500040006080909--