From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#40538: installer: Support uvesafb to install on machines without KMS. Date: Fri, 10 Apr 2020 16:38:37 +0200 Message-ID: <87tv1rv21e.fsf@gnu.org> References: <20200410125447.smn6xhcixe7hpday@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52071) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMuoB-0006VF-GK for bug-guix@gnu.org; Fri, 10 Apr 2020 10:39:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMuoA-0001Ui-3l for bug-guix@gnu.org; Fri, 10 Apr 2020 10:39:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMuoA-0001Ud-0G for bug-guix@gnu.org; Fri, 10 Apr 2020 10:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jMuo9-0008TU-US for bug-guix@gnu.org; Fri, 10 Apr 2020 10:39:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20200410125447.smn6xhcixe7hpday@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Fri, 10 Apr 2020 14:54:47 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: "pelzflorian (Florian Pelz)" Cc: 40538@debbugs.gnu.org Hi Florian, "pelzflorian (Florian Pelz)" skribis: > uvesafb should be run in the Guix System installer image so the GUI > installer can be used on more systems, including AMD GPU systems. > > uvesafb is needed to support systems that otherwise need nonfree > firmware or drivers (many current and older AMD GPUs as well as old > machines like Uniwill U50SI1 with Silicon Integrated Systems GPU). I > attach a patch I made previously at > > (plus proper indentation and copyright statement). I believe it could > be included in the installer even though it is a little hacky. > > Note that the installed system will need uvesafb (or nonfree firmware) > too, so the patch alone won=E2=80=99t make these systems work out of the = box. > But these things are easier to setup when the system can be installed > via the GUI installer. I wrote the same about the issue previously at > . Thanks for the explanations. AIUI, uvesafb is needed for ksmcon (or presumably X11) to work, but it=E2= =80=99s not necessary to get the standard Linux framebuffer/console running (indeed, you were able to ctrl-alt-f3 to get a terminal). Is this correct? If that=E2=80=99s the case, then I think it=E2=80=99s acceptable for now to= install a system that lacks uvesafb. Of course X11 won=E2=80=99t work (right?), whic= h is not great, but people can hopefully address it at the console until we have a better fix, possibly using =E2=80=98kernel-module-configuration-serv= ice=E2=80=99 as you write. WDYT? > From de24448076379a1792a7e1031471d5ae33c8c440 Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Fri, 10 Apr 2020 14:35:38 +0200 > Subject: [PATCH] installer: Load uvesafb kernel module. > > This enables the installer to display when no Kernel Mode Setting is avai= lable > (e.g. many AMD GPUs, old SIS GPUs). > > * gnu/system/install.scm (%installation-services): Add kernel-module-load= er > service for loading uvesafb. [...] > + (if (member (%current-system) '("x86_64-linux" "i686-linux")) > + ;; Load uvesafb to show installer when no KMS is available. > + `(,(service kernel-module-loader-service-type '("uvesafb")) > + ,(let ((uvesafb-options > + #~(with-output-to-file #$output > + (lambda _ > + (format #t > + (string-join `("options" "uvesafb" > + ,(string-append "v86d=3D= " #$v86d > + "/sbin/v= 86d") > + "mode_option=3D1024x768"= ))))))) > + (simple-service 'uvesafb-configuration etc-service-type > + (list `("modprobe.d/uvesafb.conf" > + ,(computed-file "uvesafb-options" > + uvesafb-options)))= ))) This is not quite correct because here =E2=80=98%current-system=E2=80=99 is= evaluated at the top level, when (gnu tests install) is loaded. So on my laptop, it=E2=80=99s always "x86_64-linux", regardless of any =E2=80=98-s=E2=80=99 = flags. Also, it ignores =E2=80=98--target=E2=80=99. Can we arrange to make it unconditional? One way to do that (not great), would be to make it an activation snippet: since activation snippets are written as monadic code, we can reliably check =E2=80=98%current-system=E2=80=99 & =E2=80=98%current-target= -system=E2=80=99 from there. (For lack of a solution like .) Stylistic comments: 1. IMO we should move the uvesafb service definition to the top-level for clarity. 2. Does "modprobe.d/uvesafb.conf" work? I thought there was nothing taking care of creating =E2=80=9Cmodprobe.d=E2=80=9D automatically. 3. You can replace the whole =E2=80=98computed-file=E2=80=99 with: (mixed-text-file "uvesafb.conf" "options uvesafb v86d=3D" v86d "/sbin/v86d mode_option=3D1024x768\n") 4. Please add a comment stating the hardware target, like in the commit log. Thank you! Ludo=E2=80=99.