guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KMScon vs. AMD Radeon


From: Ludovic Courtès
Subject: Re: KMScon vs. AMD Radeon
Date: Mon, 01 Apr 2019 22:01:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Mathieu,

Mathieu Othacehe <address@hidden> 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’ll wait for your feedback Florian & Pierre.  :-)

> From f728749dc02f8bb8a1870925547d96d8ce352f55 Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <address@hidden>
> 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 “is-”.  :-)

> +  (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 ‘kmscon-service-type’,
possibly with a flag to turn it off?

Thank you!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]