csmwrap icon indicating copy to clipboard operation
csmwrap copied to clipboard

Native VBT support

Open main3782 opened this issue 5 months ago • 14 comments

Hi there, i've used CSMWrap to install Windows Server 2008 R2 (not actually - Windows Server 2012 build 7788, but its so close to it that i'll just 2008 R2). Everything worked great, except for the fact that i'm stuck at 800x600 resolution. Attempting to set a higher resolution will cause the display to display, well, nothing until the change is automatically reverted.

The PC is a Surface Pro 1st gen. GPU is HD 4000.

Attempting to install HD 4000 drivers will just result in a 0x0000050 (0xFFFF88044E8E010, 0x0000000000000000, 0xFFFF880032D3F32, 0x0000000000000005) bugcheck in the middle of boot. The drivers did work fine on GPT though, and this is not only the case for this build - i got the same bugcheck on Vista.

TL;DR, i'm trying to install Server 2008 R2 under MBR mode (i wish i could do GPT mode, but it does not boot that and gets stuck at "Booting from Hard Disk...") but can't change the resolution nor install the HD 4000 driver.

Essentially, i want to ask if it would somehow be possible to either get native 1920x1080, or even better, the HD 4000 drivers properly running under CSMWrap. At least if someone knows.

The build im using is the latest compiled one as of writing this, build #163.

main3782 avatar Jul 21 '25 23:07 main3782

See this https://liujunming.top/2021/06/18/Video-BIOS-Table-VBT/

It's likely that the Windows Intel GPU driver loads VBT from legacy VBIOS region when booting in legacy, which isn't going to work with SeaVGABIOS.

Maybe if the offset it loads from is known could modify SeaVGABIOS to add the VBT table there ? Could look through Linux i915 driver to see how they load the VBT.

xCuri0 avatar Jul 22 '25 00:07 xCuri0

https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/i915/display/intel_bios.c#L3055

Seems like just extracting the VBT and placing it in an unused section of the SeaVGABIOS image should work.

xCuri0 avatar Jul 22 '25 00:07 xCuri0

Hmmm, how could i do that? (if i can even honestly)

main3782 avatar Jul 22 '25 10:07 main3782

Looks like adding VBT support to SeaVGABIOS has already been attempted though the patches weren't accepted.

https://patchew.org/Seabios/[email protected]/[email protected]/

Wouldn't be surprised if it needs a few changes to work on newer systems though, as Intel seems to have changed how the OpRegion works according to that blog post describing VBT.

xCuri0 avatar Jul 22 '25 13:07 xCuri0

Yeah, but this is an HD 4000, just i have no idea how to do any of this stuff, just want a premade EFI or something.

main3782 avatar Jul 22 '25 16:07 main3782

What about to extract VGA Video BIOS from firmware and use it as external at \EFI\CSMWrap\vgabios.bin?

NewcomerAl avatar Jul 22 '25 17:07 NewcomerAl

How can i do that?

main3782 avatar Jul 22 '25 17:07 main3782

Not sure about Surface Pro (for getting firmware update), but it helped me with ordinary PC. You need UEFITool and binary firmware update file. Open it in UEFITool and go Action -> Search -> Text tab. Uncheck "Unicode" (search for plain ASCII text) and input "IBM VGA Compatible BIOS" for text as magic pattern for Intel VGA BIOS (ATI has "761295520", may be AMD too). Scope should be set to "Header and body" or "Body". Click OK and in the lower pane you will see results as link(-s) for founded modules. Click on founded line and module with pattern will be selected for you. Right click on it and select "Extract body..." to save founded binary. Hexview saved file to check if it is exactly the Video BIOS binary. It must have 0x55 0xAA at the beginning and "IBM VGA Compatible BIOS" string nearly. If success rename saved file to "vgabios.bin" and use it with CSMWrap 1.30 by placing in "\EFI\CSMWrap\vgabios.bin".

As alternative you can try a Video BIOS from other PC with same CPU/chipset.

NewcomerAl avatar Jul 22 '25 18:07 NewcomerAl

Tried, gets stuck on the "CALL16 f000:d2da" something screen, doesn't even want to load it

main3782 avatar Jul 23 '25 10:07 main3782

Update, FINALLY found a working vBIOS. Will share it in a moment

main3782 avatar Jul 23 '25 11:07 main3782

https://pixeldrain.com/u/bXAZXBmC

Image

main3782 avatar Jul 23 '25 12:07 main3782

FYI running the LCD with wrong timings like this can damage it, wouldn't really recommend using it like this.

xCuri0 avatar Jul 23 '25 12:07 xCuri0

I tried different versions and it sort of works as intended now, its just the low brightness and no flickering. Good enough

main3782 avatar Jul 23 '25 12:07 main3782

Still would say this is a valid issue though, that can be fixed with a patch to SeaVGABIOS so it can provide VBT to Intel driver.

Maybe reopen and change title to something which better describes that.

xCuri0 avatar Jul 23 '25 12:07 xCuri0