Changing Resolution on VGA Console
-
Is there a way to get a higher resolution on the VGA console?
The default of 80x25 is pretty tight… most modern displays can easily support much more than that ... say (132x40... or whatever the standard is).
Any way to make that happen? (And how to make the change for initial testing so I don't make the system unbootable).
Even just after the system is up would be useful if it can't happen right from initial boot.
Any help would be much appreciated.
-
Version 2.4, which supports booting via UEFI, supports much higher resolution displays and show a lot more text on the screen (at least when booting through UEFI). If you want to run the beta now, you can, but it is a beta, so use on critical systems is not recommended.
-
Just usual FreeBSD way: https://www.freebsd.org/doc/handbook/consoles.html
Try MODE_321. -
@pan_2:
Just usual FreeBSD way: https://www.freebsd.org/doc/handbook/consoles.html
Try MODE_321.This was very helpful…. in my case vidcontrol MODE_282 gave me a screen resolution of 160x64 which is a big improvement.
When I look in /etc/rc.conf, it says this file does nothing, do not make config changes here.
Any idea how I would make this the option for booting. It would really help to have all that extra screen real estate.I'm just wondering about the virtual consoles …. that didn't seem to work. Has that feature been compiled out of pfSense?
Thanks again.
-
There are a few different things you can do, depending on your version.
On 2.4 you'll have to manually set kern.vty=sc in loader.conf.local to continue using the vidcontrol method.
You can set the mode on bootup by adding something like this to /boot/device.hints
hint.sc.0.flags="0x180" hint.sc.0.vesa_mode="279"
That will get overwritten on upgrade though, so remember to put that back.
-
hint.sc.0.flags="0x180" hint.sc.0.vesa_mode="279"
Thanks very much JimP… Can you please confirm that I've interpreted your answer correctly.
Problem with being a Noob is that putting answers into context can be a problem.Can I just replace /boot/device.hints with this: (Also are lines starting with # OK?)
/boot/device.hints
# $FreeBSD$ hint.fdc.0.at="isa" hint.fdc.0.port="0x3F0" hint.fdc.0.irq="6" hint.fdc.0.drq="2" hint.fd.0.at="fdc0" hint.fd.0.drive="0" hint.fd.1.at="fdc0" hint.fd.1.drive="1" hint.atkbdc.0.at="isa" hint.atkbdc.0.port="0x060" hint.atkbd.0.at="atkbdc" hint.atkbd.0.irq="1" hint.psm.0.at="atkbdc" hint.psm.0.irq="12" hint.sc.0.at="isa" # REPLACED WITH LINES BELOW # Set 160x64 Screen Resolution # hint.sc.0.flags="0x100" hint.sc.0.flags="0x11a" hint.sc.0.vesa_mode="282" # ================== hint.uart.0.at="isa" hint.uart.0.port="0x3F8" hint.uart.0.flags="0x10" hint.uart.0.irq="4" hint.uart.1.at="isa" hint.uart.1.port="0x2F8" hint.uart.1.irq="3" hint.ppc.0.at="isa" hint.ppc.0.irq="7" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" hint.wbwd.0.at="isa" hint.acpi_throttle.0.disabled="1" hint.p4tcc.0.disabled="1"
I've highlighted the changes in my existing file by surrounding them with comments.
vidcontrol -i mode command listed my chosen mode as 282 (0x11a), so I assume
that those are the numbers required, but the line hint.sc.0.vesa_mode="282"
is completely new. Do I have to remove or change anything else?Given this is a boot file, I'm being very cautious-thanks in advance for your help/understanding.
-
I would just add the lines at the end of the file, even if they result in a repeat. The last line will win. And it's easier to remember how to maintain them that way.
Otherwise it should be fine.
-
I use this shell script:
#!/bin/sh # Add the required screen resolution stuff to boot/devices.hint if (! grep hint.sc.0.vesa_mode /boot/device.hints >/dev/null ) ; then echo "hint.sc.0.flags=\"0x180\"" >>/boot/device.hints echo "hint.sc.0.vesa_mode=\"279\"" >>/boot/device.hints echo "Video mode set. Please reboot" else echo "Mode 279 already set. Reboot required?" fi
-
I would just add the lines at the end of the file, even if they result in a repeat. The last line will win. And it's easier to remember how to maintain them that way.
Thanks Jim… good to know... didn't know you could do that... I agree... much easier to see custom changes and no need to remove the original lines.
Thanks Steve_B for the shell script idea... I had to modify it for my use, so I made a couple of tweaks to make it was easier to read and change.
In the spirit of sharing here's the modified version in case it is of use to anybody.
#!/bin/sh # Add the required screen resolution stuff to boot/devices.hint if (! grep hint.sc.0.vesa_mode /boot/device.hints >/dev/null ) ; then { echo '#' echo '#' Custom Modifications: echo '#' Set 160x64 Screen Resolution echo '#' echo 'hint.sc.0.flags="0x11a"' echo 'hint.sc.0.vesa_mode="282"' } >>/boot/device.hints echo "Video mode set. Please reboot" else echo "Mode 282 already set. Reboot required?" fi
-
It didn't work! Here's my modified file:
/boot/device.hints
# $FreeBSD$ hint.fdc.0.at="isa" hint.fdc.0.port="0x3F0" hint.fdc.0.irq="6" hint.fdc.0.drq="2" hint.fd.0.at="fdc0" hint.fd.0.drive="0" hint.fd.1.at="fdc0" hint.fd.1.drive="1" hint.atkbdc.0.at="isa" hint.atkbdc.0.port="0x060" hint.atkbd.0.at="atkbdc" hint.atkbd.0.irq="1" hint.psm.0.at="atkbdc" hint.psm.0.irq="12" hint.sc.0.at="isa" hint.sc.0.flags="0x100" hint.uart.0.at="isa" hint.uart.0.port="0x3F8" hint.uart.0.flags="0x10" hint.uart.0.irq="4" hint.uart.1.at="isa" hint.uart.1.port="0x2F8" hint.uart.1.irq="3" hint.ppc.0.at="isa" hint.ppc.0.irq="7" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" hint.wbwd.0.at="isa" hint.acpi_throttle.0.disabled="1" hint.p4tcc.0.disabled="1" # # Custom Modifications: # Set 160x64 Screen Resolution # hint.sc.0.flags="0x11a" hint.sc.0.vesa_mode="282"
I rebooted the system, and nothing changed…. same 80x25 (at least I had that and not a blank screen or worse a hung system).
When the reboot is done I still have to drop to the shell and enter vidcontrol MODE_282 to get the screen back to high resolution.
As background:
The output from vidcontrol -i mode reads (copied to paper an retyped):
mode# flags type size font window linear buffer 282 (0x11a) 0x0000000f G 1280x1024x16 D 8x16 0xa0000000 64k 64k 0xc0000 2560k
I noticed that there are several lines above it that have
T 80x25 8x8 0xb8000000 32k 32k 0x00000000 32kThere are also some other smaller graphic modes where the character following the resolution is one of C 2 4 P or V instead of D and buffer size is 32k.
Any idea why it isn't working?
My guess is that it's using text mode (dumb terminal emulated by the graphics card) for the low resolution, and a graphical driver for the high resolution and it uses a much more complex driver to do that graphics work… and that driver isn't an option during boot... but that's just a guess.
Most important what do I do about it?
-
You've probably missed this part:
On 2.4 you'll have to manually set kern.vty=sc in loader.conf.local to continue using the vidcontrol method.
-
You've probably missed this part:
On 2.4 you'll have to manually set kern.vty=sc in loader.conf.local to continue using the vidcontrol method.
I'm still running 2.3.3-RELEASE (amd64) - so that's not the issue now…. unless this setting is required for 2.3.
I did forget to make a note of this, so I need to make a note when I get around to upgrading. Thanks.
-
@jimp said in Changing Resolution on VGA Console:
There are a few different things you can do, depending on your version.
On 2.4 you'll have to manually set kern.vty=sc in loader.conf.local to continue using the vidcontrol method.
You can set the mode on bootup by adding something like this to /boot/device.hints
hint.sc.0.flags="0x180" hint.sc.0.vesa_mode="279"
That will get overwritten on upgrade though, so remember to put that back.
As this came up in one of the top Google search results when looking for "pfsense console size", I will provide what worked for me:
Referencing the FreeBSD sc manual (specifically the "Driver Flags" section):
- /boot/device.hints
hint.sc.0.flags="0x0080" hint.sc.0.vesa_mode="324"
- /boot/loader.conf.local
kern.vty=sc
-
@jimp said in Changing Resolution on VGA Console:
There are a few different things you can do, depending on your version.
On 2.4 you'll have to manually set kern.vty=sc in loader.conf.local to continue using the vidcontrol method.
You can set the mode on bootup by adding something like this to /boot/device.hints
hint.sc.0.flags="0x180" hint.sc.0.vesa_mode="279"
That will get overwritten on upgrade though, so remember to put that back.
Carefully reading this 4 links
- https://forums.freebsd.org/threads/changing-screen-resolution.60979/
- https://www.reddit.com/r/PFSENSE/comments/fbuukj/how_to_change_monitor_resolution/
- https://www.freebsd.org/cgi/man.cgi?query=vidcontrol&sektion=1&format=html
- https://docs.freebsd.org/en/books/handbook/book/#consoles
But still have no clear vision how to achieve my goal: see 1024x768 (or 1280x1024) on my monitor.
P.S. Need to note, not all of cards for remote servers management (like iRSC in IBM, iRMC in Fujtsu-Siemens, iDRAC in Dell) able to capturing or redirect on-screen video with resolution that exceeds 1600 ×1200, many has upper limit 1280 × 1024, and very old (7-10years age) models have 1024x768 24/32bit color depth limit.
So, in case when SysAdmin need both remote control thru the BMC card AND control thru local monitor simultaneously, I need to be able to set VGA resolution one from this 3 variants:
1024 x 768
1280 x 1024
1600 x 1200 -
Any opinions or suggestions?
-
@sergei_shablovsky hint.sc.0.flags should be "0x0080" for VESA, not "0x180", per the man page here: https://www.freebsd.org/cgi/man.cgi?query=sc&sektion=4
So for mode 279 (1024x768x16), in /boot/device.hints it should be
hint.sc.0.at="isa" hint.sc.0.flags="0x0080" hint.sc.0.vesa_mode="0x117"
and in /boot/loader.conf make sure you have
kern.vty=sc
-
-