From nobody Mon May 15 12:32:22 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QKf072cSnz4BYq0 for ; Mon, 15 May 2023 12:32:39 +0000 (UTC) (envelope-from tsoome@me.com) Received: from pv50p00im-ztdg10011201.me.com (pv50p00im-ztdg10011201.me.com [17.58.6.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QKf070HLjz4HnK for ; Mon, 15 May 2023 12:32:39 +0000 (UTC) (envelope-from tsoome@me.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1684153958; bh=8qRGXe7AZ9rAOzDvW52pMyBmln/ife4rfQUrnLiiA08=; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:To; b=ZyTaJbdyJXJkFD9T5lsiFqCJHi3Nru+ho2d/ke9+JUZPHLuAe/LfQveTTm/fJk9sb I2EXNREzKQVR8noNYLfamWin2oePyN2iBtrgfhXYWpmbxZ8ronTB3AtbOL2Zlj2MW3 PH2i9BBWksoob9HCHrW3vuWatZ2Ze6LQWgKb2XwsnWYcNj+LkroYQb8XO5Xah602L+ lLXnI9MKONVVJeKYsuT8TRwLwGZ9xUyPmriQ77eLiwXR786k1Wbi2qJieBBWOtqQAi fXbitjxFTroJVapDcEw2ZZ57oS8M825mPn/n/5iEzk1QXOhMxoV3N0U2Fhfwx0fMf9 w8pV/FB6JF9FA== Received: from smtpclient.apple (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10011201.me.com (Postfix) with ESMTPSA id AAF33680313; Mon, 15 May 2023 12:32:35 +0000 (UTC) From: Toomas Soome Message-Id: <4AC4F6EE-CE18-4D67-A7F7-9328DAB3E1AB@me.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_014146C7-A0D4-479C-B6D4-F3C1327B5374" List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: Why doesn't the EFI boot loader want to display the graphical orb logo in its boot menu on an Asus Prime 7590-P motherboard? Date: Mon, 15 May 2023 15:32:22 +0300 In-Reply-To: Cc: Warner Losh , Ed Maste , Emmanuel Vadot , FreeBSD Current To: Oleg Lelchuk References: <3B658415-3AD0-4E8B-8CBE-F13FA70CBDC8@me.com> <20230512070557.859671981b7c616c0da7d666@bidouilliste.com> <4F0D21B1-58B6-413D-8499-11AF0E338C78@me.com> X-Mailer: Apple Mail (2.3731.500.231) X-Proofpoint-GUID: 6dQga-nDfVNMF_NSgjSHNaMYufjK6ddO X-Proofpoint-ORIG-GUID: 6dQga-nDfVNMF_NSgjSHNaMYufjK6ddO X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.883,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-06-21=5F08:2020-02-14=5F02,2022-06-21=5F08,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 malwarescore=0 suspectscore=0 spamscore=0 phishscore=0 clxscore=1015 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2305150108 X-Rspamd-Queue-Id: 4QKf070HLjz4HnK X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:714, ipnet:17.58.0.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_014146C7-A0D4-479C-B6D4-F3C1327B5374 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 15. May 2023, at 15:22, Oleg Lelchuk wrote: >=20 > Adding screen.font=3D"16=C3=9732" to loader.conf fixed that tiny issue = mentioned in the previous email message... I find it a bit surprising = that I only had to make one tiny change to the source code of stand to = make the graphical logo appear, to start playing with the EFI = resolution, and etc. The font size/resolution is difficult topic. The implementation itself = can choose =E2=80=9Cgood enough=E2=80=9D variant and then some people = are happy and some people are unhappy. The current loader UI is built on terminal dimensions (which depend on = glyph size and resolution), and there the traditional assumption is that = we have 80x24 terminal. With different fonts and depending on how much = screen space we want to leave unused, we can get different dimensions = for terminal. And since there is quite a variation of displays, the challenge is to = get decent enough visual on most commonly used displays - so there can = be pressure to use fixed resolution etc. And this is also the reason, = why you see very simple boot screens with something like spinning wheel = on some other systems. rgds, toomas >=20 > On Sun, May 14, 2023, 8:58 AM Oleg Lelchuk > wrote: >> Okay, so I edited /usr/src/stand/efi/loader/main.c , and I replaced = ConOut with ConIn in this line: rv =3D efi_global_getenv("ConIn", buf, = &sz); . Now I am able to see the beautiful graphical logo in the efi = boot menu! But why are the boot menu and the logo shown in the top left = corner of my computer screen? My monitor is 1080p and the setting = efi_max_resolution=3D1080p in loader.conf only affects what happens = after the kernel starts booting up, but it doesn't affect what happens = before it: the boot menu and the logo remain in the top left corner of = the screen. Why is this the case? You can see the photo in the provided = attachment... And thank you, guys, for your work! >>=20 >> On Sat, May 13, 2023 at 9:35=E2=80=AFAM Warner Losh > wrote: >>>=20 >>>=20 >>> On Sat, May 13, 2023, 6:26 AM Oleg Lelchuk > wrote: >>>> I've been reading the documentation for loader.efi and it says = this: "If there is no ConOut variable, both serial and video are = attempted. >>>> loader.efi uses the "efi" console for the video (which may or = may not >>>> work) and "comconsole" for the serial on COM1 at the default = baud rate. >>>> The kernel will use a dual console, with the video console = primary if a >>>> UEFI graphics device is detected, or the serial console as = primary if >>>> not." >>>> I find this language confusing because I don't know what is meant = by "a UEFI graphics device". In my situation, is my Intel Integrated = Graphics card an UEFI graphics device? Does it mean that once i915kms is = loaded, I no longer deal with UEFI graphics? I think lots of people = whose native language is English will find the documentation describing = loader.efi confusing. The documentation page also mentions this: "BUGS >>>> Systems that do not have a ConOut variable set are not = conformant with >>>> the standard, and likely have unexpected results." But I think = you guys already implied that the UEFI specification doesn't mandate = having such a variable. >>>=20 >>>=20 >>> That's unclear. The standard refers to it many times. Earlier = versions especially. It doesn't say it's optional, unlike some other = variables. Yet later versions don't say it's mandatory. I've yet to own = or use a system without it... such systems exist but they are quite = new... >>>=20 >>> Warner >>>=20 >>>> On Fri, May 12, 2023 at 7:55=E2=80=AFPM Oleg Lelchuk = > wrote: >>>>> I got it. Thanks. >>>>>=20 >>>>> On Fri, May 12, 2023 at 7:45=E2=80=AFPM Ed Maste = > wrote: >>>>>> On Fri, 12 May 2023 at 09:26, Oleg Lelchuk > wrote: >>>>>> > >>>>>> > I don't want to go through the hassle of filling a bug with my = vendor. I will just wait for you, guys, to update the stand = implementation. Thank you for explaining to me what causes this issue. >>>>>>=20 >>>>>> This issue is tracked in PR 265980 if you want to follow it. >>>>>> https://bugs.freebsd.org/265980 --Apple-Mail=_014146C7-A0D4-479C-B6D4-F3C1327B5374 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 15. = May 2023, at 15:22, Oleg Lelchuk <oleglelchuk@gmail.com> = wrote:

Adding screen.font=3D"16=C3=9732" to loader.conf fixed that = tiny issue mentioned in the previous email message... I find it a bit = surprising that I only had to make one tiny change to the source code of = stand to make the graphical logo appear, to start playing with the EFI = resolution, and etc.

The = font size/resolution is difficult topic. The implementation itself can = choose =E2=80=9Cgood enough=E2=80=9D variant and then some people are = happy and some people are unhappy.

The current = loader UI is built on terminal dimensions (which depend on glyph size = and resolution), and there the traditional assumption is that we have = 80x24 terminal. With different fonts and depending on how much screen = space we want to leave unused, we can get different dimensions for = terminal.

And since there is quite a variation = of displays, the challenge is to get decent enough visual on most = commonly used displays - so there can be pressure to use fixed = resolution etc. And this is also the reason, why you see very simple = boot screens with something like spinning wheel on some other = systems.

rgds,
toomas


On Sun, May 14, 2023, 8:58 AM Oleg Lelchuk <oleglelchuk@gmail.com> = wrote:
Okay, = so I edited /usr/src/stand/efi/loader/main.c , and I replaced ConOut = with ConIn in this line: rv =3D efi_global_getenv("ConIn", buf, = &sz); . Now I am able to see the beautiful graphical logo in the efi = boot menu! But why are the boot menu and the logo shown in the top left = corner of my computer screen? My monitor is 1080p and the setting = efi_max_resolution=3D1080p in loader.conf only affects what happens = after the kernel starts booting up, but it doesn't affect what happens = before it: the boot menu and the logo remain in the top left corner of = the screen. Why is this the case? You can see the photo in the provided = attachment... And thank you, guys, for your work!

On Sat, May = 13, 2023 at 9:35=E2=80=AFAM Warner Losh <imp@bsdimp.com> wrote:


On Sat, May 13, 2023, 6:26 AM Oleg Lelchuk <oleglelchuk@gmail.com> = wrote:
I've been reading = the documentation for loader.efi and it says this: "If there is no = ConOut variable, both serial and video are attempted.
    =  loader.efi uses the "efi" console for the video (which may = or may not
     work) and "comconsole" for the = serial on COM1 at the default baud rate.
     The = kernel will use a dual console, with the video console primary if = a
     UEFI graphics device is detected, or the serial = console as primary if
     not."
I find this = language confusing because I don't know what is meant by "a UEFI = graphics device". In my situation, is my Intel Integrated Graphics card = an UEFI graphics device? Does it mean that once i915kms is loaded, I no = longer deal with UEFI graphics? I think lots of people whose native = language is English will find the documentation describing loader.efi = confusing. The documentation page also mentions this: "BUGS
  =    Systems that do not have a ConOut variable set are not = conformant with
     the standard, and likely have = unexpected results." But I think you guys already implied that the UEFI = specification doesn't mandate having such a = variable.

That's unclear. The standard refers to it many times. = Earlier versions especially. It doesn't say it's optional, unlike some = other variables. Yet later versions don't say it's mandatory.  I've = yet to own or use a system without it... such systems exist but they are = quite new...

Warner

On Fri, May 12, 2023 at 7:55=E2=80=AFPM = Oleg Lelchuk <oleglelchuk@gmail.com> = wrote:
I got it. = Thanks.

On Fri, May 12, 2023 at 7:45=E2=80=AFPM Ed Maste = <emaste@freebsd.org> wrote:
On Fri, 12 May 2023 at 09:26, = Oleg Lelchuk <oleglelchuk@gmail.com> wrote:
>
> I don't want to go through the hassle of filling a bug with my = vendor. I will just wait for you, guys, to update the stand = implementation. Thank you for explaining to me what causes this = issue.

This issue is tracked in PR 265980 if you want to follow it.
https://bugs.freebsd.org/265980

= --Apple-Mail=_014146C7-A0D4-479C-B6D4-F3C1327B5374--