Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Mar 2021 17:03:07 -0500
From:      "Karl L. Dunn" <kldunn@hiwaay.net>
To:        Aryeh Friedman <aryeh.friedman@gmail.com>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: How to get UEFI console resolution on a non-UEFI boot device
Message-ID:  <1217eb17-831f-cf9a-0403-c3e812f2440b@hiwaay.net>
In-Reply-To: <887d5ed5-b07-661-5e45-4796c3d25dc@naur.kad-hg.org>
References:  <887d5ed5-b07-661-5e45-4796c3d25dc@naur.kad-hg.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sun, 21 Mar 2021, Aryeh Friedman wrote:

> On Sun, Mar 21, 2021 at 4:55 PM Karl Dunn <kldunn@hiwaay.net> wrote:
> On Sun, 21 Mar 2021, Aryeh Friedman wrote:
> 
> >
> >
> > On Sun, Mar 21, 2021 at 12:14 PM Karl Dunn <kldunn@hiwaay.net> 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
  ... <snip> ...

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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,
  HTT,TM,PBE>
    Features2=0xe39d<SSE3,DTES64,MON,DS_CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM>
    AMD Features=0x20100800<SYSCALL,NX,LM>
    AMD Features2=0x1<LAHF>
   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>x<Y>"

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




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?1217eb17-831f-cf9a-0403-c3e812f2440b>