From owner-freebsd-x11@freebsd.org Tue Aug 23 18:39:33 2016 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7D8DBC430F for ; Tue, 23 Aug 2016 18:39:33 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) Received: from nm45-vm1.bullet.mail.bf1.yahoo.com (nm45-vm1.bullet.mail.bf1.yahoo.com [216.109.115.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 918F81BF2 for ; Tue, 23 Aug 2016 18:39:33 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1471977379; bh=l3sj9R8w0cJP2fIW1ZYn6Bv6E82x90Y6mtYjZ3m9/10=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=C/r+HPUYwMbOltzaVMukyHusxkgpcVD9sFZW6AJJMFS866OlWmN81LTmM8j5eUlHZ1Jjw/kRrvuJsd24cWEUdXXnTwgiT6exBngVtyk7gc9N2U20o9NhyO/V1FP6UtA3HBMvzxND726lqremAzNVvlq4yaqq40xNCOIq3zn5K46rMFxfIzVkrBiZ5vPab6nPuyIsBuk7hYZ+LxvdGaUkYfZEPnifNY6ikaGMNMLXnpNkZRnKXe2N1Ag/3+q825zBkCqlhtPuKKXo2+EXE/GBFXl9gwz6MTlv/EWl8RheOMPxZvHqI8hyWSAX4EFLeRPWB0e8LcPBbA5+vgQS9yu7Yg== Received: from [66.196.81.173] by nm45.bullet.mail.bf1.yahoo.com with NNFMP; 23 Aug 2016 18:36:19 -0000 Received: from [68.142.230.75] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 23 Aug 2016 18:36:19 -0000 Received: from [127.0.0.1] by smtp232.mail.bf1.yahoo.com with NNFMP; 23 Aug 2016 18:36:19 -0000 X-Yahoo-Newman-Id: 727412.62000.bm@smtp232.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: rJeCRLkVM1nchPSViVCb9gVZqhsZ.BJSyy7XfFcSrua25d0 qgxNB.3CWdGhxDn2mUZRWHQehG3DmKhit8VgFb7TdZlEqDevwN9wTL9UfvIl b6dyaV3uj0tOGUP.Um1dnLnmuSFO1RPLBHTtURt5GtY4EWQlb.aK_xQ87MVv QbS5FGVUSk3NOXQWKOoxz_VmqzYOxL9OHCPmBZKSIZoZw2H092X_a8DOiq0D 2ZQnVXzRJFXg5Hr4WnZVBltfR3TAJqa8AG32VC5Yuijl81JLj26SLrVGv6cy aeHt_IShJAB5Nk.T7Icpaub5GN2BUrk3TICheizoYd16W8BtqamsAPpPAjKp .MYR4t7YcZHvEJU0cFGUT9FOnN.t1WhexbDPzFinW7_Rfo9lZBerJjk8pHHt 80YOKIErI35.0C1XwcKbEpYaMapUJHfG0VylvHnvZGz5rWnUWEK4uM3KvIws AoB3.cl458Q4_nq9JH3nOwE5CAq34oS91TTa.0FRN0g2C5S6mgErlGPzmWUu RYpe7qo2tb7j3ksq.ol8xesz8z58v9t7E0lUYFMP2XCXMKzw- X-Yahoo-SMTP: 9sPoSQ2swBBlERuQ.0vs8XLc_MeClW0- Subject: Re: Auto-detecting vmmouse To: Thomas Hellstrom References: <7dafabbb-c906-86b3-d9e7-5dd4c59dec7f@vmware.com> Cc: freebsd-x11@freebsd.org From: Anthony Jenkins Message-ID: <8c3432df-1960-b823-a12a-a285caa62184@yahoo.com> Date: Tue, 23 Aug 2016 14:36:17 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <7dafabbb-c906-86b3-d9e7-5dd4c59dec7f@vmware.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 18:39:33 -0000 On 08/23/2016 04:43 AM, Thomas Hellstrom wrote: > Hi! > > With the advent of the devd-managed Xorg device auto-detection, the > automatic ability of loading the "vmmouse" driver instead of the "mouse= " > driver isn't there anymore. > > Previously, with the hal-driven detection, a utility called > "vmmouse_detect" was run and the HAL suggested xorg driver was set > accordingly depending on the result of "vmmouse_detect". > > So I was planning to restore this functionality somehow and when it's > working kindly ask whoever is responsible to automatically install > xf86-video-vmware and xf86-input-vmmouse whenever xorg is installed. > > Unfortunately I have trouble finding documentation that describes how t= o > set the xorg input driver name for a mouse device detected by devd. The= > input driver name needs to be set based on the return code of the > "vmmouse_detect" utility. > > Any help pointing me to a preferred way of doing this would be greatly > appreciated. Basically you will have to modify device_added(const char *line) in config/devd.c to create a new InputOption "object" and set the "driver" option to "vmmouse" (assuming that's the driver name) using input_option_new(). I did my own implementation of config/devd.c (I think others have also, but I think they're all basically similar) different from the one currently in x11-servers/xorg-server/, it uses a function table to call a function for a given const char *line passed to device_added() to make a decision about what driver to attach. https://github.com/ScoobiFreeBSD/freebsd-ports/blob/xorg-synaptics/x11-se= rvers/xorg-server/files/patch-config_devd.c You'd add an entry to hw_types[] for the device node created by devd(8), adding a new function to fill in the InputOption object depending on information from the system. Anthony > Thanks, > > Thomas Hellstr=C3=B6m, VMWare > > > > _______________________________________________ > freebsd-x11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-x11 > To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org" --=20 Anthony Jenkins