From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezmkT-00007w-BZ for guix-patches@gnu.org; Sat, 24 Mar 2018 13:15:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ezmj0-0007N7-MC for guix-patches@gnu.org; Sat, 24 Mar 2018 13:14:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ezmj0-0007Mz-Hr for guix-patches@gnu.org; Sat, 24 Mar 2018 13:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ezmj0-0004CO-58 for guix-patches@gnu.org; Sat, 24 Mar 2018 13:13:02 -0400 Subject: [bug#30604] Keyboard detection before =?UTF-8?Q?=E2=80=98cryptsetup=E2=80=99?= runs Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87h8plkkkc.fsf@gnu.org> <20180312221541.1886-1-ludo@gnu.org> <20180312221541.1886-5-ludo@gnu.org> <87fu54fjfj.fsf@gnu.org> <87o9jlo28l.fsf@inria.fr> <20180323140231.1c96615c@scratchpost.org> Date: Sat, 24 Mar 2018 18:12:52 +0100 In-Reply-To: <20180323140231.1c96615c@scratchpost.org> (Danny Milosavljevic's message of "Fri, 23 Mar 2018 14:02:31 +0100") Message-ID: <87h8p5jt2j.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 30604@debbugs.gnu.org Heya, Danny Milosavljevic skribis: > I have to say what we have to do is much more complicated than I thought > it would be - and I kinda regret starting this patchset. I didn't > want to make it less likely for people to boot than before :-( Yeah, I had a nightmare where I dreamed of all the bug reports due to devices not showing up quickly enough. :-) > A small bit of research shows that: > > - Busybox uses a loop with timeout to try to mount over and over again, > depending on bus type [2]. > - Alpine coldplugs twice [1]. > - Fatdog has a "waitdev" boot parameter that specifies how long it sleeps > until it tries to mount the root. > - Redhat mkinitrd has an mkinitrd option like "--with=3Dscsi_wait_scan" w= hich > they use after they saw a modalias starting with "scsi:" - or add the > kernel option "scsi_mod.scan=3Dsync" to the command line [3] (but they sa= y that > this is unreliable now and one is supposed to use udev inside the initrd). > Not sure what they do for USB. > > The Linux kernel itself has a "rootdelay" parameter which > was specifically introduced because of USB devices that took 15 s (!) > to show up. It=E2=80=99s a kludge fest, which is reassuring, in a way. > All in all, we have alternative ways to continue: > > (a) Drop this patchset/feature entirely because it's too unreliable. > (b) Monitor /sys using inotify in an extra thread/process. > (c) Include udev into the initrd and have it do its thing. > (d) Monitor the netlink socket in our own thread and play udev ourselves. > (e) Find out how to, for each bus type, detect when enumeration is finish= ed. > Find out which buses are there. Wait for them to finish enumerating. > (f) Always modprobe usb-hid first, no matter what. I think this would > become a whack-a-mole thing fast. > > I'd prefer either (a) or (b) for reliability and simplicity. WDYT? Same here! Sounds like (b) is something we could easily try, though we won=E2=80=99t know how well it works until people start running it on the b= are metal. I can adjust the branch I have to do that and push it for people to try. Thanks a lot of your feedback! Ludo=E2=80=99.