On Thu, Feb 20, 2020 at 11:10 PM YASUOKA Masahiko <yasu...@openbsd.org> wrote: > Hello, > > I am testing a new hardware, HPE DL20 Gen10. > > When efiboot starts the kernel, the video display becomes distorted > and never recovered until CPU reset. > [...] > On HPE DL20 Gen10, probing vga is succeeded on first trial, the kernel > selects vga for the console, but actually it is broken. On usual > machines which boot with EFI, the problem doesn't happen since they > have no vga. > > The diff following fixes the problem by initializing efifb console > even if the VGA is probed.
This is exciting! Your HP server sounds very much like what I've experienced on the Dell PowerEdge R230 [1] (probably also affects other Dell Rx30 in UEFI mode, maybe Rx40 too?), and I would not be surprised if your diff fixes mine too. > # Also, HP DL20 Gen10 has "UEFI optimized boot" setting on BIOS and > # disabling the setting avoids the problem happening. But since the > # setting seems to be for old Windows, I think we should fix our > # kernel. OpenBSD squishes the video to a thin purple line unless I enable the "Load Legacy Video Option ROM" setting in the Dell BIOS. However, that setting is described as a compatibility shim for old OSes which don't support EFI GOP natively, and enabling it restricts the efifb resolution to 1024x768. Every other OS I tested (including FreeBSD & Linux) worked properly without the legacy video ROM. I got as far a nasty hack of a diff on efifb where if probing failed, attach it with hardcoded values matching my machine. With said diff plus vga disabled via 'boot -c' (otherwise vga would steal the console), kernel output was still scrambled, but userland output from the boot process displayed correctly. Unfortunately the keyboard wasn't attached to this console, but I could at least print stuff on the screen from an ssh session, e.g. 'echo "Hello, world!" > /dev/console'. At some point I had to actually use this server though, so I abandoned that effort and put the server into production (using the legacy video ROM). I'll try to test this diff next week if I can schedule some downtime. -Andrew [1] https://marc.info/?l=openbsd-tech&m=150707255507032&w=2 The first half isn't relevant, but the last part covers the R230, and has (old) dmesg for with and without the legacy video ROM. I should clarify "X still works in either case": with efifb active, X will prefer wsfb unless you add an xorg.conf for mga. mga performs better and can use any resolution, while wsfb is limited to the efifb resolution.