Difference between revisions of "OpenWRT and Supermicro"

Wiki.TerraBase.info
Jump to navigation Jump to search
m
Line 1: Line 1:
Wow!  Here's one for the record books that took a bit of research for such a simple solution.  Everything that's written here applies to an x86_64 install of OpenWRT on computer hardware with a video display as opposed to TTL / Serial output that some monitors have.
Wow!  Here's one for the record books that took a bit of research for such a simple solution.  Everything that's written here applies to an x86_64 install of OpenWRT on computer hardware with a video display as opposed to TTL / Serial output that some monitors have.


== The Issue ==
==The Issue==
Are you installing OpenWRT on a Supermicro, or posibly another x86_64 motherboard / platform with an ASPEED or equivalent IPMI (Intelligent Platform Management Interface) / BMC (Baseboard Management Controller that has multiple video outputs (VGA, HDMI, Display Port, etc.)?
Are you installing OpenWRT on a Supermicro, or posibly another x86_64 motherboard / platform with an ASPEED or equivalent IPMI (Intelligent Platform Management Interface) / BMC (Baseboard Management Controller that has multiple video outputs (VGA, HDMI, Display Port, etc.)?


Line 8: Line 8:
Well, read on for an explanation of the issue.  If you want to take a shortcut and just solve the issue, then read the next section.
Well, read on for an explanation of the issue.  If you want to take a shortcut and just solve the issue, then read the next section.


== Shortcut, errr, The Solution ==
==Shortcut, errr, The Solution==
In the /boot/grub/grub.cfg (remember, OpenWRT uses "Legacy" Grub, so all of the GRUB2 information out there has to be 'taken with a grain of salt' and translated into "Legacy" Grub);
In the /boot/grub/grub.cfg (remember, OpenWRT uses "Legacy" Grub, so all of the GRUB2 information out there has to be 'taken with a grain of salt' and translated into "Legacy" Grub);


Line 20: Line 20:
...and that's it.  The output will be displayed to the monitor hooked up to the VGA Port
...and that's it.  The output will be displayed to the monitor hooked up to the VGA Port


== One More Thing to Make Sure of ==
==One More Thing to Make Sure of==


For the Supermicro Motherboards, make sure the below setting is configured in the BIOS Setup / Settings;


So what was the original issue?  Well, when a monitor was plugged into the VGA Port, basically the system would boot up, display all of the BMC / IPMI stuff, and then display the beginning of the OpenWRT booting output (IE, the first couple of seconds), then a blank screen.  It was noticed that if after the screen blanked the VGA cable was unplugged and an HDMI cable was plugged in, it would display the rest of the OpenWRT boot sequence.  But sadly the iKVM video display was broken.
* For the X11SAE-F Motherboard (it may vary with different models);
** Under Advanced, Chipset Configuration, North Bridge, Intel IGD Configuration, Primary Display (Auto, IGD, PCIE), set it to either: Auto or PCIE


A 'fallback' if the incorrect Video Mode is configured that results in a blank or black screen. This can happen if Primary Display is set to IGD (BIOS Setup / Settings: Advanced, Chipset Configuration, North Bridge, Intel IGD Configuration, Primary Display (Auto, IGD, PCIE));
In the System Block Diagram of the X11SAE-F Motherboard below, it shows the VGA port at the end of a PCIe lane.  
[[File:System Block Diagram.jpg|alt=System Block Diagram for X11SAE-F|center|thumb|System Block Diagram]]


*Set JPG1 Jumper to Disable VGA (this only disables the VGA Port), plut in an HDMI Cable / Monitor and everything will be displayed, allowing access to the BIOS.


...and it goes without saying to upgrade to the latest BIOS, IPMI, etc. Firmware
Of course this begs the question about where the heck the connector for the IGD (Integrated Graphics Device) is. Apparently there isn't one, which may be involved with the implementation of the ASPEED chip.  The block diagram doesn't explicitly show the HDMI or Display Port at the end of a PCIe lane, but they are.
 
So if you were thinking the VGA port (or the HDMI or Display Port Connectors) are the IGD, they're not.  If one looks at the information on the Wikipedia Page (https://en.wikipedia.org/wiki/List_of_Intel_Pentium_processors) or the Intel Page (https://ark.intel.com/content/www/us/en/ark/products/87261/intel-pentium-processor-n3700-2m-cache-up-to-2-40-ghz.html), in indicates that N3700 CPU (really and SoC (System on a Chip)) has a CPU and GPU integrated into the same device with only HDMI and Display Port Outputs.  That, combined with the fact (according the System Block Diagram) the VGA output seems to be coming from ASPEED chip, leads one to believe the Pentium based Braswell CPU in the N3700 SoC indeed has HD Graphics 400 or 405 capability that is simply not hooked up to anything.  
 
So we're right back to the point of asking why the IGD choice is in the BIOS settings if there isn't a connector for the HD Graphics 400 / 405 built into the Pentium CPU? IE, behavior and documentation seems to indicate there are two GPUs in the N3700 SoC package. One GPU is built into the Pentium CPU and the other is a discrete GPU at the end of a couple of PCIe lanes in the SoC.  This isn't stated explicitly, but all evidence seems to point to this conclusion.
 
== Fallback Incase One Sets the Above Noted Primary Display to IGD ==
If the Primary Display is set to IGD in the BIOS settings (BIOS Setup / Settings: Advanced, Chipset Configuration, North Bridge, Intel IGD Configuration, Primary Display (Auto, IGD, PCIE)) it will result in a blank or black screen no matter which port the monitor is plugged into.
 
Solution? See below;
 
*Connect a monitor to the HDMI port.
*Set JPG1 Jumper to Disable VGA (Pins 1-2 are Enable, Pins 2-3 are Disable)
 
Why? Because disabling the VGA port has the effect of enabling the HDMI and Display Port connectors.
 


Notes;
Notes;


It's still kind of up in the air, but...  Supermicro seems to designate the Integrated Graphics Device (IGD) as the VGA Port, not the HDMI Port (Display Port is unknown). Why? Because setting the JPG1 Jumper for VGA Enable/Disable to Disable (Pins 1-2 are Enable, Pins 2-3 are Disable) results in the VGA Port not working but the HDMI Port DOES work.  The BIOS is an interesting thing.  If Primary Display is set to IGD (BIOS Setup / Settings: Advanced, Chipset Configuration, North Bridge, Intel IGD Configuration, Primary Display (Auto, IGD, PCIE)), one might expect output to go to the VGA port.  Nope, it isn't.  Lesson, do NOT conflate IGD and VGA as they are not equivalent.  The hint was in the block diagram of the motherboard and involves the ASPEED IPMI / BMC AST2400 Chip.  The diagram shows VGA connected to the ASPEED BMC AST 2400 chip, which in turn is shown connected to the CPU via a PCIe lane.  Get it?  VGA is at the end of a PCIe lane, so setting the video in the BIOS to PCIe outputs to the VGA and Display Port.  Of course this begs the question about where the heck is the connector for the IGDApparently there isn't one, which may be involved with the implementation of the ASPEED chip OR it could be the Display Port as that wasn't tested.  Although the block diagram seems to indicated that the HDMI and DP connector are equivalently connected.
It's still kind of up in the air, but...  Supermicro seems to designate the Integrated Graphics Device (IGD) as the VGA Port, not the HDMI Port (Display Port is unknown).   The BIOS is an interesting thing.  If Primary Display is set to IGD (BIOS Setup / Settings: Advanced, Chipset Configuration, North Bridge, Intel IGD Configuration, Primary Display (Auto, IGD, PCIE)), one might expect output to go to the VGA port.  Nope, it isn't.  Lesson, do NOT conflate IGD and VGA as they are not equivalent.  The hint was in the block diagram of the motherboard and involves the ASPEED IPMI / BMC AST2400 Chip.  The diagram shows VGA connected to the ASPEED BMC AST 2400 chip, which in turn is shown connected to the CPU via a PCIe lane.  Get it?  VGA is at the end of a PCIe lane, so setting the video in the BIOS to PCIe outputs to the VGA and Display Port.   
 
==Why Not Just Disable the VGA Port with a Jumper (JPG1 on Supermicro Motherboards)==
Well, bad news: If you do that, it'll work in that all the boot up messages will be displayed on a monitor hooked up to the HDMI or Display Port.  But...  And this is a big BUT: Nothing will be displayed on the iKVM/HTML5 (or the 'Remote Control' JAVA Console)That's kind of a nice thing to have working.  See the above System Block Diagram and you'll see that the JPG1 jumper really seems to disable the VGA of the ASPEED chip.
 


== Why Not Just Disable the VGA Port with a Jumper (JPG1 on Supermicro Motherboards) ==
Well, bad news: If you do that, it'll work in that all the boot up messages will be displayed on a monitor hooked up to the HDMI or Display Port.  But...  And this is a big BUT: Nothing will be displayed on the iKVM/HTML5 (or the 'Remote Control' JAVA Console).  That's kind of a nice thing to have working.
Video can be set with;
Video can be set with;


Line 171: Line 190:
FBDEV = Linux Frame Buffer ( <nowiki>https://en.wikipedia.org/wiki/Linux_framebuffer</nowiki> )
FBDEV = Linux Frame Buffer ( <nowiki>https://en.wikipedia.org/wiki/Linux_framebuffer</nowiki> )


 
 ...and it goes without saying to upgrade to the latest BIOS, IPMI, etc. Firmware


 
 

Revision as of 18:54, 14 August 2023

Wow! Here's one for the record books that took a bit of research for such a simple solution. Everything that's written here applies to an x86_64 install of OpenWRT on computer hardware with a video display as opposed to TTL / Serial output that some monitors have.

The Issue

Are you installing OpenWRT on a Supermicro, or posibly another x86_64 motherboard / platform with an ASPEED or equivalent IPMI (Intelligent Platform Management Interface) / BMC (Baseboard Management Controller that has multiple video outputs (VGA, HDMI, Display Port, etc.)?

Have you experienced an issue where the OpenWRT boot sequence starts, but then the screen goes black and nothing is displayed?

Well, read on for an explanation of the issue. If you want to take a shortcut and just solve the issue, then read the next section.

Shortcut, errr, The Solution

In the /boot/grub/grub.cfg (remember, OpenWRT uses "Legacy" Grub, so all of the GRUB2 information out there has to be 'taken with a grain of salt' and translated into "Legacy" Grub);

  • "Stock" / Original OpenWRT Boot / Kernel Commands / Parameters;
    • linux /boot/vmlinuz root=PARTUUID=d2e27698-02 rootfstype=squashfs rootwait console=ttyS0,115200n8 console=tty0 noinitrd
  • Change it to this: (IE, just add nomodeset to the end of the line);
    • linux /boot/vmlinuz root=PARTUUID=d2e27698-02 rootfstype=squashfs rootwait console=ttyS0,115200n8 console=tty0 noinitrd nomodeset
  • Hints Obtained from;

...and that's it. The output will be displayed to the monitor hooked up to the VGA Port

One More Thing to Make Sure of

For the Supermicro Motherboards, make sure the below setting is configured in the BIOS Setup / Settings;

  • For the X11SAE-F Motherboard (it may vary with different models);
    • Under Advanced, Chipset Configuration, North Bridge, Intel IGD Configuration, Primary Display (Auto, IGD, PCIE), set it to either: Auto or PCIE

In the System Block Diagram of the X11SAE-F Motherboard below, it shows the VGA port at the end of a PCIe lane.

System Block Diagram for X11SAE-F
System Block Diagram


Of course this begs the question about where the heck the connector for the IGD (Integrated Graphics Device) is. Apparently there isn't one, which may be involved with the implementation of the ASPEED chip. The block diagram doesn't explicitly show the HDMI or Display Port at the end of a PCIe lane, but they are.

So if you were thinking the VGA port (or the HDMI or Display Port Connectors) are the IGD, they're not. If one looks at the information on the Wikipedia Page (https://en.wikipedia.org/wiki/List_of_Intel_Pentium_processors) or the Intel Page (https://ark.intel.com/content/www/us/en/ark/products/87261/intel-pentium-processor-n3700-2m-cache-up-to-2-40-ghz.html), in indicates that N3700 CPU (really and SoC (System on a Chip)) has a CPU and GPU integrated into the same device with only HDMI and Display Port Outputs. That, combined with the fact (according the System Block Diagram) the VGA output seems to be coming from ASPEED chip, leads one to believe the Pentium based Braswell CPU in the N3700 SoC indeed has HD Graphics 400 or 405 capability that is simply not hooked up to anything.

So we're right back to the point of asking why the IGD choice is in the BIOS settings if there isn't a connector for the HD Graphics 400 / 405 built into the Pentium CPU? IE, behavior and documentation seems to indicate there are two GPUs in the N3700 SoC package. One GPU is built into the Pentium CPU and the other is a discrete GPU at the end of a couple of PCIe lanes in the SoC. This isn't stated explicitly, but all evidence seems to point to this conclusion.

Fallback Incase One Sets the Above Noted Primary Display to IGD

If the Primary Display is set to IGD in the BIOS settings (BIOS Setup / Settings: Advanced, Chipset Configuration, North Bridge, Intel IGD Configuration, Primary Display (Auto, IGD, PCIE)) it will result in a blank or black screen no matter which port the monitor is plugged into.

Solution? See below;

  • Connect a monitor to the HDMI port.
  • Set JPG1 Jumper to Disable VGA (Pins 1-2 are Enable, Pins 2-3 are Disable)

Why? Because disabling the VGA port has the effect of enabling the HDMI and Display Port connectors.


Notes;

It's still kind of up in the air, but... Supermicro seems to designate the Integrated Graphics Device (IGD) as the VGA Port, not the HDMI Port (Display Port is unknown). The BIOS is an interesting thing. If Primary Display is set to IGD (BIOS Setup / Settings: Advanced, Chipset Configuration, North Bridge, Intel IGD Configuration, Primary Display (Auto, IGD, PCIE)), one might expect output to go to the VGA port. Nope, it isn't. Lesson, do NOT conflate IGD and VGA as they are not equivalent. The hint was in the block diagram of the motherboard and involves the ASPEED IPMI / BMC AST2400 Chip. The diagram shows VGA connected to the ASPEED BMC AST 2400 chip, which in turn is shown connected to the CPU via a PCIe lane. Get it? VGA is at the end of a PCIe lane, so setting the video in the BIOS to PCIe outputs to the VGA and Display Port.

Why Not Just Disable the VGA Port with a Jumper (JPG1 on Supermicro Motherboards)

Well, bad news: If you do that, it'll work in that all the boot up messages will be displayed on a monitor hooked up to the HDMI or Display Port. But... And this is a big BUT: Nothing will be displayed on the iKVM/HTML5 (or the 'Remote Control' JAVA Console). That's kind of a nice thing to have working. See the above System Block Diagram and you'll see that the JPG1 jumper really seems to disable the VGA of the ASPEED chip.


Video can be set with;

video=1280x1024 (nope, this don't work)* OR vga=795 (from https://en.wikipedia.org/wiki/VESA_BIOS_Extensions#Linux_video_mode_numbers)

...however, the first part of the boot sequence (first couple of seconds, including "Decompressing Linux") cannot be seen until it reaches the 'change video' part of the boot. IE, the below part;

[    1.486659] simple-framebuffer simple-framebuffer.0: framebuffer at 0x81000000, 0x500000 bytes, mapped to 0xffffc90001000000

[    1.497977] simple-framebuffer simple-framebuffer.0: format=a8r8g8b8, mode=1280x1024x32, linelength=5120

[    1.544395] Console: switching to colour frame buffer device 160x64

[    1.587467] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered!


Good news, it doesn't seem to be possible to adjust resolution after booting using fbset or xrandr because they don't exist as packages in OpenWRT. Makes sense given that most routers don't freakin' have video cards! It looks like some people have compiled custom versions of busybox.

No real need to change the resolution, unless one wants to see the full lines of boot messages during boots. Keep in mind, it's available for review after booting using the DMESG Command. Of course if booting is a problem it might be helpful to see the entire line. An alternative would be to remove the nomodeset parameter from the grub.cfg file.

And the ASPEED's iKVM capability doesn't work across reboots, so need to close that window and open it back up

Enabling Kernel Modesetting (KMS): To enable KMS, add nomodeset=0 or remove nomodeset if it's already present. KMS allows the kernel to set display modes during boot.


* This was an answer from ChatGPT when asked: How do I get my supermicro motherboard to display vga output when booting openwrt?

Stuff like: video=HDMI-1:d rmmod=i915 in the command line don't work.

Differences in boot;

video=VGA-1:1280x1024 (nope, don't work)

vga=795 does work (sets the same resolution as above)

...JPG1 Enabled;

[    1.830724] Non-volatile memory driver v1.3

[    1.835663] Linux agpgart interface v0.103

[    1.842052] [drm] Memory usable by graphics device = 2048M

[    1.847750] [drm] Replacing VGA console driver

[    1.862012] Console: switching to colour dummy device 80x25

[    1.868432] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

[    1.868438] [drm] Driver supports precise vblank timestamp query.

[    1.891463] [drm] Initialized i915 1.6.0 20170818 for 0000:00:02.0 on minor 0

[    1.899211] [drm] HDaudio controller not detected, using LPE audio instead

[    1.899211]

[    1.915025] loop: module loaded

[    1.918457] Guest personality initialized and is inactive

[    1.924095] VMCI host device registered (name=vmci, major=10, minor=63)

[    1.930796] Initialized host personality

[    1.935699] VMware PVSCSI driver - version 1.0.7.0-k

...JPG1 Disabled;

[    1.999013] Non-volatile memory driver v1.3

[    2.003980] Linux agpgart interface v0.103

[    2.012403] [drm] Memory usable by graphics device = 2048M

[    2.018099] [drm] Replacing VGA console driver

[    2.032397] Console: switching to colour dummy device 80x25

[    2.038920] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

[    2.038927] [drm] Driver supports precise vblank timestamp query.

[    2.060952] [drm] Initialized i915 1.6.0 20170818 for 0000:00:02.0 on minor 0

[    2.068660] [drm] HDaudio controller not detected, using LPE audio instead

[    2.068660]

[    2.084438] loop: module loaded

[    2.087882] Guest personality initialized and is inactive

[    2.093496] VMCI host device registered (name=vmci, major=10, minor=63)

[    2.100201] Initialized host personality

[    2.105116] VMware PVSCSI driver - version 1.0.7.0-k

...JPG1 Enabled with nomodeset paramter set in grub.cfg vmlinuz line

[    1.714978] Linux agpgart interface v0.103

[    1.726847] loop: module loaded

[    1.730427] Guest personality initialized and is inactive

[    1.736124] VMCI host device registered (name=vmci, major=10, minor=63)

[    1.742948] Initialized host personality

[    1.747960] VMware PVSCSI driver - version 1.0.7.0-k

...and according to: https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt, it does;

nomodeset Disable kernel modesetting. Most systems' firmware

sets up a display mode and provides framebuffer memory

for output. With nomodeset, DRM and fbdev drivers will

not load if they could possibly displace the pre-

initialized output. Only the system framebuffer will

be available for use. The respective drivers will not

perform display-mode changes or accelerated rendering.

Useful as error fallback, or for testing and debugging.

DRM = Direct Rendering Manager

FBDEV = Linux Frame Buffer ( https://en.wikipedia.org/wiki/Linux_framebuffer )

 ...and it goes without saying to upgrade to the latest BIOS, IPMI, etc. Firmware