• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Changing Resolution on VGA Console

Scheduled Pinned Locked Moved General pfSense Questions
16 Posts 9 Posters 7.7k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    guardian Rebel Alliance
    last edited by Mar 8, 2017, 6:35 PM

    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.

    If you find my post useful, please give it a thumbs up!
    pfSense 2.7.2-RELEASE

    1 Reply Last reply Reply Quote 0
    • M
      MikeV7896
      last edited by Mar 8, 2017, 7:57 PM

      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.

      The S in IOT stands for Security

      1 Reply Last reply Reply Quote 0
      • S
        Soyokaze
        last edited by Mar 8, 2017, 11:49 PM

        Just usual FreeBSD way: https://www.freebsd.org/doc/handbook/consoles.html
        Try MODE_321.

        Need full pfSense in a cloud? PM for details!

        1 Reply Last reply Reply Quote 0
        • G
          guardian Rebel Alliance
          last edited by Mar 9, 2017, 10:51 AM Mar 9, 2017, 10:28 AM

          @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.

          If you find my post useful, please give it a thumbs up!
          pfSense 2.7.2-RELEASE

          1 Reply Last reply Reply Quote 0
          • J
            jimp Rebel Alliance Developer Netgate
            last edited by Mar 10, 2017, 3:13 PM

            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.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            R S 2 Replies Last reply Dec 21, 2020, 5:39 PM Reply Quote 1
            • G
              guardian Rebel Alliance
              last edited by Mar 10, 2017, 7:21 PM

              @jimp:

              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.

              If you find my post useful, please give it a thumbs up!
              pfSense 2.7.2-RELEASE

              1 Reply Last reply Reply Quote 0
              • J
                jimp Rebel Alliance Developer Netgate
                last edited by Mar 10, 2017, 7:22 PM

                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.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • S
                  Steve_B Netgate
                  last edited by Mar 11, 2017, 1:03 AM

                  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
                  

                  Als ik kan

                  1 Reply Last reply Reply Quote 0
                  • G
                    guardian Rebel Alliance
                    last edited by Mar 11, 2017, 4:04 AM

                    @jimp:

                    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
                    

                    If you find my post useful, please give it a thumbs up!
                    pfSense 2.7.2-RELEASE

                    1 Reply Last reply Reply Quote 0
                    • G
                      guardian Rebel Alliance
                      last edited by Mar 11, 2017, 5:22 PM

                      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 32k

                      There 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?

                      If you find my post useful, please give it a thumbs up!
                      pfSense 2.7.2-RELEASE

                      1 Reply Last reply Reply Quote 0
                      • D
                        doktornotor Banned
                        last edited by Mar 11, 2017, 5:35 PM

                        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.

                        1 Reply Last reply Reply Quote 0
                        • G
                          guardian Rebel Alliance
                          last edited by Mar 12, 2017, 3:43 AM

                          @doktornotor:

                          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.

                          If you find my post useful, please give it a thumbs up!
                          pfSense 2.7.2-RELEASE

                          1 Reply Last reply Reply Quote 0
                          • R
                            reb00tz @jimp
                            last edited by Dec 21, 2020, 5:39 PM

                            @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
                            
                            1 Reply Last reply Reply Quote 2
                            • S
                              Sergei_Shablovsky @jimp
                              last edited by Sergei_Shablovsky Oct 5, 2021, 9:20 AM Oct 5, 2021, 8:43 AM

                              @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

                              —
                              CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
                              Help Ukraine to resist, save civilians people’s lives !
                              (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

                              S 1 Reply Last reply Nov 1, 2021, 2:59 AM Reply Quote 0
                              • S
                                Sergei_Shablovsky @Sergei_Shablovsky
                                last edited by Nov 1, 2021, 2:59 AM

                                Any opinions or suggestions?

                                —
                                CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
                                Help Ukraine to resist, save civilians people’s lives !
                                (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

                                R 1 Reply Last reply Feb 15, 2022, 2:04 AM Reply Quote 0
                                • R
                                  rcork @Sergei_Shablovsky
                                  last edited by Feb 15, 2022, 2:04 AM

                                  @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
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S stephenw10 referenced this topic on Sep 19, 2022, 11:40 PM
                                  • stephenw10S stephenw10 referenced this topic on Sep 19, 2022, 11:40 PM
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                    This community forum collects and processes your personal information.
                                    consent.not_received