Setting the native resolution in the framebuffer console

Forum Forums General Hardware Setting the native resolution in the framebuffer console

  • This topic has 4 replies, 2 voices, and was last updated Jan 2-2:34 pm by ant_222.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #96133
    Member
    ant_222

      Hello, all.

      I thank everyone for helping me set set the correct graphics mode for X in this thread. My next problem is setting the same mode—or at least the same resolution—for the framebuffer consoles, invocable by CTRL+ALT+F1..6. On my AC8 machine, they are in some wrong resolution, probably 1024×768, but my display is showing a wrong-mode warning and blocks its build-it menu system.

      To begin with, my display is Iyama ProLite E1902S, and is my full inxi dump, whence I will cite the Graphics section:

        Device-1: Intel JasperLake [UHD Graphics] driver: i915 v: kernel
          arch: Gen11 ports: active: DP-2 empty: DP-1,HDMI-A-1 bus-ID: 00:02.0
          chip-ID: 8086:4e61 class-ID: 0300
        Display: server: X.Org v: 1.20.11 driver: X: loaded: modesetting
          gpu: i915 display-ID: :0.0 screens: 1
        Screen-1: 0 s-res: 1280x1024 s-dpi: 96 s-size: 338x270mm (13.31x10.63")
          s-diag: 433mm (17.03")
        Monitor-1: DP-2 model-id: RGT 0x1252 serial: 16843009 res: 1280x1024
          hz: 75 dpi: 203 size: 160x90mm (6.3x3.54") diag: 1168mm (46") modes:
          max: 1024x768 min: 720x400
        OpenGL: renderer: Mesa Intel UHD Graphics (JSL) v: 4.6 Mesa 20.3.5
          direct render: Yes

      and draw your attention to the indications of the maximum resolution as 1024×768 and of the actual resolution as 1280×1024. I forced the correct resolution in X by typing it into my xorg.conf. Now in X, my display reports:
      1280x1024 at 75Hz.
      The first thing I tried was:
      GRUB_GFXMODE=1280x1024
      in the GRUB config, but it had no effect. Then inside GRUB I invoked its videoinfo command, which printed:

      grub> vbeinfo
      error: can't find command 'vbeinfo'
      grub> videoinfo
      Adapter 'Cirrus CLGD 5446 PCI Video Driver': No info available
      Adapter 'Bochs PCI Video Driver': No info available
      Adapter 'EFI GOP dirver':
        * 0x000 1024 x 768 x 32 ...
          0x001  640 x 480 x 32 ...
          0x002  800 x 600 x 32 ...
        EDID version: 1.4
          Preferred mode: 1024x768

      This may explain the wrong mode on my terminal. At startup, the kernel logs:

      fbcon: Taking over console
      fbcon: i915drmfb (fb0) is primary device

      whence I conclude that the correct DRM/framebuffer driver has been loaded. All attempts, however, to set the correct mode, fail:

      $ fbset 1280x1024-75
      ioctl FBIOPUT_VSCREENINFO: Invalid argument

      I have tried various 1280×1024 modes pre-entered into etc/fb.modes, and new ones generated with gtf, including 8- 24-, and 32-bit color. All of them fail with the error message above, but without any new message in dmesg. What further steps can you suggest to enable a 1280×1024 mode in the framebuffer terminals?

      Update 1:
      With drm.debug=0xe in the kernel boot options, dmesg printed , including:

      [    3.141586] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:233:DP-2] probed modes :
      [    3.141594] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1024x768": 60 65000 1024 1048 1184 1344 768 771 777 806 0x48 0x5
      [    3.141600] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1920x1080": 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0xa
      [    3.141606] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1400x1050": 60 121750 1400 1488 1632 1864 1050 1053 1057 1089 0x40 0x6
      [    3.141612] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1600x900": 60 108000 1600 1624 1704 1800 900 901 904 1000 0x40 0x5
      [    3.141617] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1280x1024": 75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x40 0x5
      [    3.141623] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1280x1024": 60 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x40 0x5
      [    3.141628] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1440x900": 60 106500 1440 1520 1672 1904 900 903 909 934 0x40 0x6
      [    3.141633] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1280x960": 60 108000 1280 1376 1488 1800 960 961 964 1000 0x40 0x5
      [    3.141639] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1366x768": 60 85500 1366 1414 1557 1792 768 769 796 798 0x40 0x5
      [    3.141644] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1280x800": 60 83500 1280 1344 1472 1680 800 801 829 831 0x40 0x5
      [    3.141650] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1152x864": 75 108000 1152 1216 1344 1600 864 865 868 900 0x40 0x5
      [    3.141655] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1280x768": 60 79500 1280 1328 1456 1664 768 769 796 798 0x40 0x5
      [    3.141660] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1280x720": 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
      [    3.141666] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1024x768": 75 78750 1024 1040 1136 1312 768 769 772 800 0x40 0x5
      [    3.141671] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1024x768": 70 75000 1024 1048 1184 1328 768 771 777 806 0x40 0xa
      [    3.141676] [drm:drm_mode_debug_printmodeline [drm]] Modeline "1024x768": 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
      [    3.141770] [drm:drm_mode_debug_printmodeline [drm]] Modeline "832x624": 75 57284 832 864 928 1152 624 625 628 667 0x40 0xa
      [    3.141776] [drm:drm_mode_debug_printmodeline [drm]] Modeline "800x600": 75 49500 800 816 896 1056 600 601 604 625 0x40 0x5
      [    3.141781] [drm:drm_mode_debug_printmodeline [drm]] Modeline "800x600": 72 50000 800 856 976 1040 600 637 643 666 0x40 0x5
      [    3.141875] [drm:drm_mode_debug_printmodeline [drm]] Modeline "800x600": 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5
      [    3.141881] [drm:drm_mode_debug_printmodeline [drm]] Modeline "640x480": 75 31500 640 656 720 840 480 481 484 500 0x40 0xa
      [    3.141886] [drm:drm_mode_debug_printmodeline [drm]] Modeline "640x480": 73 31500 640 664 704 832 480 489 492 520 0x40 0xa
      [    3.141892] [drm:drm_mode_debug_printmodeline [drm]] Modeline "640x480": 67 30240 640 704 768 864 480 483 486 525 0x40 0xa
      [    3.141897] [drm:drm_mode_debug_printmodeline [drm]] Modeline "640x480": 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
      [    3.141902] [drm:drm_mode_debug_printmodeline [drm]] Modeline "720x400": 70 28320 720 738 846 900 400 412 414 449 0x40 0x6
      [    3.141909] [drm:drm_client_modeset_probe [drm]] connector 215 enabled? no
      [    3.141915] [drm:drm_client_modeset_probe [drm]] connector 225 enabled? no
      [    3.141921] [drm:drm_client_modeset_probe [drm]] connector 233 enabled? yes
      [    3.141931] [drm:drm_client_modeset_probe [drm]] Not using firmware configuration
      [    3.141938] [drm:drm_client_modeset_probe [drm]] looking for cmdline mode on connector 233
      [    3.141943] [drm:drm_client_modeset_probe [drm]] looking for preferred mode on connector 233 0
      [    3.141948] [drm:drm_client_modeset_probe [drm]] found mode 1024x768
      [    3.141954] [drm:drm_client_modeset_probe [drm]] picking CRTCs for 16384x16384 config
      [    3.141960] [drm:drm_client_modeset_probe [drm]] desired mode 1024x768 set on crtc 91 (0,0)

      Failing invocations of fbset produce:

      [ 1377.941980] i915 0000:00:02.0: [drm:drm_fb_helper_check_var [drm_kms_helper]] fbdev emulation doesn't support changing the pixel clock, value of pixclock is ignored
      [ 1377.941986] i915 0000:00:02.0: [drm:drm_fb_helper_check_var [drm_kms_helper]] fb requested width/height/bpp can't fit in current fb request 1280x1024-32 (virtual 1280x1024) > 1024x768-32

      Update 2:
      I performed additional tests:

      $ cat /sys/class/graphics/fb0/modes
      U:1024x768p-0

      which means other modes are unavailable to the framebuffer for some reason.
      $ cat /sys/class/graphics/fb0/mode
      prints nothing.

      $ sudo echo U:1280x1024p-0 > /sys/class/graphics/fb0/mode
      -bash: /sys/class/graphics/fb0/mode: Permission denied
      $ con2fbmap 1
      console 1 is mapped to framebuffer 0

      (with identical reports for consoles 1..6)

      #96496
      Member
      ant_222
        My display shows: 1280x1024  H: 80.0 KHz  V: 75.0Hz
        xvidtune -show  : "1280x1024"   135.00   1280 1296 1440 1688   1024 1025 1028 1066 +hsync +vsync

        When, however, I enter my parameters in modeline calculator, it shows different values, e.g.:

        # 1280x1024 @ 75.00 Hz (GTF) hsync: 80.18 kHz; pclk: 138.54 MHz
        Modeline "1280x1024_75.00" 138.54 1280 1368 1504 1728 1024 1025 1028 1069 -HSync +Vsync

        As you see, pixel clock and many other values differ from the required ones, and I cannot seem to adjust the calculator inputs to make it output the correct modeline. Have you an idea what I may be doing wrong?

        • This reply was modified 1 year, 3 months ago by ant_222.
        #96504
        Moderator
        BobC

          If it were me, I would try with Debian 11.6 non-free, or Debian Bookworm Alpha non-free, and if it doesn’t work, ask for help there. Once you fix it there, it is a reasonable possibility that the fix will work for antiX as well.

          If those don’t pan out, I’d suggest trying the new MX flavors like MXDE with the Liquorix 6 kernel, and try to find something that works.

          I don’t know how to make it work, myself. You need to find someone expert is my guess.

          #96600
          Member
          ant_222

            Now I have tried to convert my working X mode into a framebuffer mode using modeline2fb:

            ant@antix1:~
            $ xvidtune -show
            "1280x1024"   135.00   1280 1296 1440 1688   1024 1025 1028 1066 +hsync +vsync
            ant@antix1:~
            $ echo modeline <code>xvidtune -show</code> | ./modeline2fb
            # modes.fb - video mode descriptions for fbset
            #
            # See fbset(8) and fb.modes(5) for more information
            mode "1280x1024"
              geometry   1280 1024   1280 2444   8
              timings    7407   248 16   38 1   144 3
              hsync high
              vsync high
            endmode

            but still with no success and the same error as above. I also tried 16- 24- and 32-bit color, and a virtual vertical resolution identical to the physical one (1024 instead of 2444).

            P.S.: A Mickle Merry New Year to All!

            #96606
            Member
            ant_222

              Just an idea. Sometimes, if proper resolution won’t come up, the monitor itself is the culprit, providing wrong EDID data to the graphics board, due to buggy firmware, keeping the proper resolution from being activated by the graphics card. Luckily this can be fixed by creating a personal EDID file on your system for this broken device. See http://gist.github.com/hinell/0ebaad01b771a70844204f295aaf03b7 for details.

              Many thanks for the references. They helped me set the correct framebuffer mode by simply adding a kernel parameter:
              drm.edid_firmware=DP-2:edid/1280x1024.bin
              DP-2 above is my device id, which I found by:
              xrandr | grep connected
              whereas edid/1280×1024.bin is a standard pseudo-path hard-coded into the kernel together with the corresponding EDID info.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.