From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: KMScon vs. AMD Radeon Date: Mon, 01 Apr 2019 22:01:58 +0200 Message-ID: <87a7h9jxzd.fsf@gnu.org> References: <871s3a4xd4.fsf@gnu.org> <87sgv89w3k.fsf@gnu.org> <20190328000935.qnhrbamajj47vibu@pelzflorian.localdomain> <87h8bl8xrb.fsf_-_@gnu.org> <875zs1k5ac.fsf@gmail.com> <20190329180022.pqzdrzcjrbm3z5ub@pelzflorian.localdomain> <871s2o6cyt.fsf@gmail.com> <87imw0u558.fsf@ambrevar.xyz> <20190330152211.2ugzdbvp2hjy3lvl@pelzflorian.localdomain> <871s2lkesq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:57946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB38C-0002Ty-Kd for guix-devel@gnu.org; Mon, 01 Apr 2019 16:02:09 -0400 In-Reply-To: <871s2lkesq.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 01 Apr 2019 15:58:45 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mathieu Othacehe Cc: Guix-devel Hi Mathieu, Mathieu Othacehe skribis: > Here's a patch that fallback to mingetty if kmscon is not supported. I > don't have a machine with AMD GPU for testing so if Florian or Pierre > could test the patch that would be very helpful :) That was fast, thanks! We=E2=80=99ll wait for your feedback Florian & Pierre. :-) > From f728749dc02f8bb8a1870925547d96d8ce352f55 Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe > Date: Mon, 1 Apr 2019 15:54:26 +0200 > Subject: [PATCH] wip: Fallback to mingetty if kmscon is not supported. [...] > + (define is-kmscon-supported? > + #~(let ((drm-regex (make-regexp "(card|render).*$"))) > + (not (null? (scandir "/sys/class/drm" > + (cut regexp-exec drm-regex <>)))))) No need for =E2=80=9Cis-=E2=80=9D. :-) > + (let ((mingetty > + (service mingetty-service-type > + (mingetty-configuration > + (tty "tty1") > + (auto-login "root") > + (%auto-start? #f)))) > + (kmscon > + (service kmscon-service-type > + (kmscon-configuration > + (virtual-terminal "tty1") > + (login-program (installer-program)) > + (%auto-start? #f))))) > + (list > + mingetty > + kmscon > + (service > + (shepherd-service-type > + 'installer-tty > + (lambda _ > + (shepherd-service > + (provision '(installer-tty)) > + (requirement '(user-processes host-name udev virtual-terminal)) > + (start #~(lambda _ > + (if #$is-kmscon-supported? > + (start 'kmscon-tty1) > + (start 'term-tty1)))) > + (stop #~(make-kill-destructor)) > + (modules `((ice-9 ftw) > + (ice-9 regex) > + (srfi srfi-26) > + ,@%default-modules))))) > + '())))) Should we instead build this functionality into =E2=80=98kmscon-service-typ= e=E2=80=99, possibly with a flag to turn it off? Thank you! Ludo=E2=80=99.