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

      @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
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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

          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

            @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

              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

                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

                  @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

                    @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
                    • Sergei_ShablovskyS
                      Sergei_Shablovsky @jimp
                      last edited by Sergei_Shablovsky

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

                      Sergei_ShablovskyS 1 Reply Last reply Reply Quote 0
                      • Sergei_ShablovskyS
                        Sergei_Shablovsky @Sergei_Shablovsky
                        last edited by

                        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 Reply Quote 0
                        • R
                          rcork @Sergei_Shablovsky
                          last edited by

                          @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
                          • stephenw10S stephenw10 referenced this topic on
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.