From owner-freebsd-x11@freebsd.org Mon May 21 19:26:18 2018 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AF59EFCB15 for ; Mon, 21 May 2018 19:26:18 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C87E26D02B for ; Mon, 21 May 2018 19:26:17 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 88E68EFCB14; Mon, 21 May 2018 19:26:17 +0000 (UTC) Delivered-To: x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75F4DEFCB13 for ; Mon, 21 May 2018 19:26:17 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2607:f740:d:20::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F22FD6D02A for ; Mon, 21 May 2018 19:26:16 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 40qTKM4VvvzDhVP; Mon, 21 May 2018 19:26:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([127.0.0.1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [127.0.0.1]) (amavisd-new, port 10587) with ESMTPS id Z9Hm3aWLtT7i; Mon, 21 May 2018 19:26:15 +0000 (UTC) Received: from celes.daemonic.se (celes.daemonic.se [IPv6:2001:470:dca9:2::3]) by mail.daemonic.se (Postfix) with ESMTPSA id 40qTKL4X9PzDhBg; Mon, 21 May 2018 19:26:14 +0000 (UTC) Subject: Re: your mail To: Emil Velikov Cc: x11@freebsd.org References: <20170222120828.zkrfh56swen7r44o@ivaldir.etoilebsd.net> <3635692.Vys3mgEcQY@workstation.reztek> <237b2552-c97c-fd41-5509-ed611f0103dd@freebsd.org> From: Niclas Zeising Message-ID: <9311ffed-ae3a-32d9-6e8d-c1db3f6abd68@freebsd.org> Date: Mon, 21 May 2018 21:26:14 +0200 User-Agent: Mutt/1.5.21 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 19:26:18 -0000 On 05/21/18 14:26, Emil Velikov wrote: >>>> Creating /dev nodes is handled automatically by devfs and devd. I don't >>>> know how it's done in detail, but it's automatic as far as at least I'm >>>> concerned. >>>> >>> Ack. On Linux the same daemon (udevd in our case) loads the kernel >>> module also creates the node. >>> Has there been attempts/discussions about doing the same in FreeBSD? >> >> >> I don't think so. There is some work done in general to load modules as >> needed, but I don't think anything's been done specifically for graphics. >> On linux, when is the module loaded? On start or when starting X or some >> other time? > > It's been years since I've looked, so the following outline might not be 100% > > - device is plugged/present > - kernel populates /sys/$hardware_bus..../uevent > - udevd reads the uevent, loads (modprobe) the new module > - the module is loaded, creates more sysfs entries > - udevd sees the new ones, matches them to $rules and creates device > nodes/symlinks/others It should definitely be possible to do something similar on FreeBSD, probably using devd. I had a look at the e-mail thread you linked to in another mail as well. Robert Millan hasn't been active in the FreeBSD project for quite some time, so I don't think he'll answer. Apart from getting rid of old code, and special casing a platform, can you give some more background to the change? Thanks! -- Niclas Zeising