kern.vty=sc
to loader.conf if you want to try that.The best way to learn about any systemI'm learning to solve various problems.
I'd like to add that I found that if you set the VT resolution the same as your X11 resolution, this seems to fix the switching issue.
In loader.conf (if X11 is set for 1024x768):How set the resolution?
kern.vt.fb.default_mode="1024x768"
man vt
is your friend.VT(efifb): resolution 1024x768
kern.vt.fb.default_mode
only works with KMS drivers, so it does not support Nvidia. (I have an Nvidia Geforce GT 1030.)Did you experience this yourself or just read about it somewhere?I'd like to add that I found that if you set the VT resolution the same as your X11 resolution, this seems to fix the switching issue.
That is entirely correct.Apparently, the tunablekern.vt.fb.default_mode
only works with KMS drivers, so it does not support Nvidia. (I have an Nvidia Geforce GT 1030.)
This issue happens with VGA either due VT missing a fix similar to the one in PR 237050 or os_get_screen_info (see src/nvidia/nvidia_os.c in the driver) not handling VT+VGA.Of course, X11 runs at the native resolution of my monitor, that’s 3440×1440. Fortunately I can switch between X11 and sc(4)-based VTYs without problems, even though the resolutions are very different.
ssh
into the terminal and reboot or physically reset the hardware.Couldn't this be done automatically via the vesa driver?That’s interesting. My VT resolution is set to 1024×768, and I don’t seem to be able to change it.
[...]
Of course, X11 runs at the native resolution of my monitor, that’s 3440×1440. Fortunately I can switch between X11 and sc(4)-based VTYs without problems, even though the resolutions are very different.
You mean VBE (VESA BIOS Extension)? No, unfortunately not. VBE is relatively useless nowadays.Couldn't this be done automatically via the vesa driver?
That’s not possible for Nvidia GPUs because they’re not KMS-based.I mean, there is some way (EDID, DisplayID, ...) that xorg uses to find out the monitor's native resolution.
And then simply use this?
Yes, of course, FreeBSD already has a selection of fonts, including larger ones (32 pixels) for screens with high DPI. You can use the vidfont(1) command to select a font from a list.However, combining this with appropriately larger-sized fonts would probably be a must!
*.fnt
file usable with vt(4) with FreeBSD’s vtfontcvt(8) tool. Then you can load the font with the vidcontrol(1) command. In order to have it in the selection list of the vidfont(1) tool, put the *.fnt
file in the /usr/share/vt/fonts directory and add an entry to the INDEX.fonts file (it’s an ASCII file, so you can use a standard text editor). By the way, BDF files are also ASCII files, so you can look at them with less(1), for example, if you’re curious.My impression is that VESA works with legacy BIOS / UEFI CSM boot while GOP is available with pure UEFI boot (with 7xx and later cards).Today, many graphics cards don’t have a VBE anymore, so the “vesa driver” doesn’t work. That’s the case for my Nvidia 1030, for example.
Same here, in my Nvidia GTX 1650 there is no way to make it work in TTy.My impression is that VESA works with legacy BIOS / UEFI CSM boot while GOP is available with pure UEFI boot (with 7xx and later cards).
That's… not at all what the quoted sentence claims.Same here, in my Nvidia GTX 1650 there is no way to make it work in TTy.
I'm sorry, I didn't write in the reply that I should do so, my apologies.That's… not at all what the quoted sentence claims.
Yes, I mentioned that EDID thing because the more modern standards (which I do not know) apparently get the resolution information via the EDID hardware.You mean VBE (VESA BIOS Extension)? No, unfortunately not. VBE is relatively useless nowadays.
Apart from that, the list of video modes supported by VBE is usually a fixed list (hardcoded in the graphics hardware’s BIOS ROM), i.e. it does not dynamically adapt to the monitor that is connected. For this reason, it supports only a certain set of standard resolutions, usually not including things like UWQHD displays like mine (3440×1440).
The 32-lines-fonts could be ideal for 1024x768!Yes, of course, FreeBSD already has a selection of fonts, including larger ones (32 pixels) for screens with high DPI. You can use the vidfont(1) command to select a font from a list.
vidfont -p
it shows no fonts larger than 16 lines Cool!You can also create your own font files for use with vt(4): Either export an existing X11 font with x11/fstobdf or x11-fonts/pcf2bdf, or use one of the various X11 font editors to modify an existing font or create your own one from scratch, then save it in BDF format. Once you have a BDF file, you can convert it to a*.fnt
file usable with vt(4) with FreeBSD’s vtfontcvt(8) tool. Then you can load the font with the vidcontrol(1) command. In order to have it in the selection list of the vidfont(1) tool, put the*.fnt
file in the /usr/share/vt/fonts directory and add an entry to the INDEX.fonts file (it’s an ASCII file, so you can use a standard text editor). By the way, BDF files are also ASCII files, so you can look at them with less(1), for example, if you’re curious.
Well, that depends on the display’s DPI, not on the pixel resolution.The 32-lines-fonts could be ideal for 1024x768!
Yes, of course, the vidfont(1) tool tries to connect to the TTY driver, so it doesn’t work inside an X11 window. However, theHowever, when I attempt to list the available fonts usingvidfont -p
it shows no fonts larger than 16 lines
I wonder whether this is because of "BUGS: The kbdmap and vidfont utilities work only on a (virtual) console and not with X11."?
-p
option is special, because it only prints the contents of the index file, so it doesn’t actually have to connect with the TTY driver in that case (you still get a warning, though).vidfont < /dev/ttyv0
vidfont -p
:lang_default = en
dialect = de_...UTF-8
lang_abk = de
gallant
terminus-b32
tom-thumb
vgarom-16x32
vgarom-8x8
vgarom-8x14
vgarom-8x16
vgarom-thin-8x8
vgarom-thin-8x16
terminus-b32
and the vgarom-16x32
fonts have a height of 32 pixels. Personally I think both of them are dead ugly and not very well readable, but I usually work with X11, so I don’t care much about the virtual terminals. Section "InputClass"
Identifier "Keyboard1"
Option "XkbOption" "terminate:ctrl_alt_bksp" # press Ctrl+Alt+Bksp. to exit X server to console
EndSection