From owner-freebsd-questions@freebsd.org Tue Mar 23 22:03:15 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 926505BD8FF for ; Tue, 23 Mar 2021 22:03:15 +0000 (UTC) (envelope-from kldunn@hiwaay.net) Received: from mail.hiwaay.net (mail.hiwaay.net [216.180.158.37]) by mx1.freebsd.org (Postfix) with ESMTP id 4F4ljt6MrKz4Y42 for ; Tue, 23 Mar 2021 22:03:14 +0000 (UTC) (envelope-from kldunn@hiwaay.net) Received: (qmail 4613 invoked from network); 23 Mar 2021 22:03:08 -0000 Received: from 50-83-57-148.client.mchsi.com (HELO naur.kad-hg.org) (kldunn@hiwaay.net@50.83.57.148) by mail.hiwaay.net with (SSL TLSv1.2 AES128-GCM-SHA256 encrypted) SMTPS (8cc2799a-8c23-11eb-a1db-c78a16217cf3); Tue, 23 Mar 2021 18:03:08 -0400 Subject: Re: How to get UEFI console resolution on a non-UEFI boot device References: <887d5ed5-b07-661-5e45-4796c3d25dc@naur.kad-hg.org> To: Aryeh Friedman Cc: FreeBSD Mailing List From: "Karl L. Dunn" X-Forwarded-Message-Id: <887d5ed5-b07-661-5e45-4796c3d25dc@naur.kad-hg.org> Message-ID: <1217eb17-831f-cf9a-0403-c3e812f2440b@hiwaay.net> Date: Tue, 23 Mar 2021 17:03:07 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <887d5ed5-b07-661-5e45-4796c3d25dc@naur.kad-hg.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-MagicMail-OS: FreeBSD 9.x or newer X-MagicMail-UUID: 8cc2799a-8c23-11eb-a1db-c78a16217cf3 X-MagicMail-Authenticated: kldunn@hiwaay.net X-MagicMail-SourceIP: 50.83.57.148 X-MagicMail-RegexMatch: 1 X-MagicMail-EnvelopeFrom: X-Rspamd-Queue-Id: 4F4ljt6MrKz4Y42 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of kldunn@hiwaay.net has no SPF policy when checking 216.180.158.37) smtp.mailfrom=kldunn@hiwaay.net X-Spamd-Result: default: False [-1.78 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[216.180.158.37:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[hiwaay.net]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[216.180.158.37:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.78)[-0.785]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:395532, ipnet:216.180.158.0/23, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 22:03:15 -0000 On Sun, 21 Mar 2021, Aryeh Friedman wrote: > On Sun, Mar 21, 2021 at 4:55 PM Karl Dunn wrote: > On Sun, 21 Mar 2021, Aryeh Friedman wrote: > > > > > > > On Sun, Mar 21, 2021 at 12:14 PM Karl Dunn wrote: > > On Sun, 21 Mar 2021, Aryeh Friedman wrote: > > > > > I really like the resolution settings on the UEFI console but my machine > > > doesn't support UEFI. How can I get the same resolution on this machine? > > > > > > Some things I have already tried/other notes: > > > > > > * I have a nVidia card using x11/nvidia-driver-390 (card not supported on > > > newer drivers) > > > * There is no on board video on the MB > > > * I have played with the settings suggested in vt(4), sc(4) and > > > vidcontrol(1) > > > > > > Here is my current /boot/loader.conf: > > > > > > kern.vt.fb.modes="3840x2160" > > > kern.vty=vt > > > nvidia-modeset_load="YES" > > > linux_load="YES" > > > fuse_load="YES" > > > > > > -- > > > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > > > > Can you post output from dmesg and pciconf -lv? > > Sorry for this "middle post". This is kinda long already. Here is a > really wild guess: > > How about this in loader.conf: > > kern.vt.fb.default_mode="3840x2160" > > in place of the fb.modes spec you have. I think kern.vt.fb.modes has to > name a specific device, e.g. kern.vt.fb.modes.VGA-1=""3840x2160". > No go I tried all the obvious devices listed in /dev and all resolutions between 640x480 and the one listed above and no change in resolution with any of the combos ... ... I think the name part of the loader tunable is supposed to be the "connector" name, not a name from /dev. I could not figure out what to use, so that's why I thought kern.vt.fb.default_mode would work. I thrashed around with this problem for a while on my own machine: CPU: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz (1800.55-MHz K8-class CPU) Origin="GenuineIntel" Id=0x6f2 Family=0x6 Model=0xf Stepping=2 Features=0xbfebfbff Features2=0xe39d AMD Features=0x20100800 AMD Features2=0x1 TSC: P-state invariant, performance statistics vgapci0@pci0:1:0:0: class=0x030000 card=0x13113842 chip=0x0a6510de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'GT218 [GeForce 210]' class = display subclass = VGA for which I had to use the -340 NVIDIA driver. To make Xorg work right, I had to create this: /usr/local/etc/X11/xorg.conf.d/20-nvidia.conf: Section "Device" Identifier "GTX-nnnn" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GTX nnnn" EndSection No matter what I do, I am in the same place you are. Supposedly the functions that are in the -390 module nvidia-modeset.ko are in -340's nvidia.ko, but none of the stuff about modesetting in vt(4) works. The -340 driver apparently does not create or have the functions of nvidia-modeset.ko. So the loader tunable kern.vt.fb.default_mode="x" will not (again: apparently) do anything on my machine. The vt(4) man pages have a discouraging note about modesetting not being supported unless you have a KMS video driver. AFAIK only Intel, AMD, and Radeon are in that category. I think vt(4) means xxxkms.ko and drm.ko, not some other driver that has its own mode setting scheme. I might be wrong about that. I'm wrong about a lot of things -- just ask my wife of 53 years: she's a physics PhD, so she ought to know. It looks as if the 460.56 driver: https://www.nvidia.com/Download/driverResults.aspx/170806/en-us will support your card. You might be able to force the nvidia-driver port to make and install that one. I don't have much hope for it fixing your problem, though. - - - - There is a lot more hope for Intel cards/embedded GPUs. I have three other machines that have flavors of Intel GPUs "built-in", and they work fine, both with console resolution control and Xorg. The kms module will pull in drm module(s), and it is apparently crucial that they load from rc.conf, not loader.conf!! I built the drm package needed (to get the kms and drm for all three kinds) from the port in /usr/ports/graphics rather than do a pkg add, per FreeBSD recommendation: the pre-built package often won't fit the kernel, causing a crash at boot time, even though it's made for the right major release. So if you have a card that has some kind of AMD or Radeon or Intel GPU you might be good. I don't have one; if I did I would outright give it to you to see what happens! Maybe you can borrow one to test. I apologize for such a long story. -- Karl L. Dunn kldunn@hiwaay.net