Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Clarification of DVMT stolen calculation #1585

Closed
1alessandro1 opened this issue Apr 2, 2021 · 6 comments
Closed

[Docs] Clarification of DVMT stolen calculation #1585

1alessandro1 opened this issue Apr 2, 2021 · 6 comments

Comments

@1alessandro1
Copy link

1alessandro1 commented Apr 2, 2021

Today I've successfully managed to unlock the following hidden options with setup_var:

  • CFG Lock set to 0x00 with the command: setup_var 0x4A3 0x00
    image

  • DVMT Total Gfx Mem set to MAX with the command: setup_var 0x234 0x03
    image

My question arises when I try to unlock DVMT Pre-Allocated (I'm using a 4K display, so 128MB of preallocated required) with the command:

setup_var 0x233 0x04

Having checked the Bios offset beforehand:
image

And the result is the following:

2021-04-02 01 55 24

Which corresponds to:

#define GRUB_EFI_SECURITY_VIOLATION GRUB_EFI_ERROR_CODE (26)

I've even tried other values and other setup_var2, setup_var_3 etc but unfortunately the result is the same. So I've checked WhateverGreen manual, to see how I would add the missing MBs from 32MB of pre allocated all the way to 128MB, but it wasn't clear to me, since this is an hybrid situation, where only Pre-Allocated cannot be modified - what is necessary to add apart framebuffer-patch-enable

Should I need only more framebuffer-fbmem set to (128-32)=96MB missing for the 4K display (the 32MB are already provided by the BIOS by default) hence increasing the hypotetical DVMT Pre-Allocated value to 128MB?

Here's the dump for easy access, thanks for your time.

ID: 0D220003, STOLEN: 32 MB, FBMEM: 19 MB, VRAM: 1536 MB, Flags: 0x00000402
TOTAL STOLEN: 52 MB, TOTAL CURSOR: 1 MB (1572864 bytes), MAX STOLEN: 116 MB, MAX OVERALL: 117 MB (123219968 bytes)
Camellia: CamelliaDisabled (0), Freq: 5273 Hz, FreqMax: 5273 Hz
Mobile: 0, PipeCount: 3, PortCount: 3, FBMemoryCount: 3
[1] busId: 0x05, pipe: 9, type: 0x00000400, flags: 0x00000087 - ConnectorDP
[2] busId: 0x04, pipe: 10, type: 0x00000400, flags: 0x00000087 - ConnectorDP
[3] busId: 0x06, pipe: 8, type: 0x00000400, flags: 0x00000011 - ConnectorDP
01050900 00040000 87000000
02040A00 00040000 87000000
03060800 00040000 11000000
@vit9696
Copy link
Contributor

vit9696 commented Apr 2, 2021

You cannot add "missing" memory in WEG. At most you can force the framebuffer to use less memory, this is what these options are about. And it will either fail or work unstable (or more or less ok). It is weird that you cannot change the option via setup_var while you can do that to e.g. CFG Lock. Maybe there is a bug in grub shell or your actions, but it is out of our scope.

@vit9696 vit9696 closed this as completed Apr 2, 2021
@1alessandro1
Copy link
Author

1alessandro1 commented Apr 2, 2021

Thanks for these clarifications, indeed none of those patches are in the config.plist now

The system successfully boots macOS recovery (11.2.3) without panics, so I guess the 32MB value is fine, and matches the STOLEN: 32MB found in the dumps. But the resolution is not 3840x2160, (in Debian Linux 4K works) - does WeG have something for 4K screens (like enable-hdmi20) which works for DP to DP connections?

@vit9696
Copy link
Contributor

vit9696 commented Apr 2, 2021

@1alessandro1
Copy link
Author

1alessandro1 commented Apr 10, 2021

igfxonlnfbs=MASK boot argument (force-online-framebuffers device property) to specify indices of connectors for which online status is enforced. Format is similar to igfxfcmsfbs.

Little doubt here ^
If I have to specify force-online only for the connector (HDMI 00080000) highlighted:
image

Should I specify force-online-framebuffers (DATA) = 02 or 01? (Should I include 0 when counting or not?)

@vit9696
Copy link
Contributor

vit9696 commented Apr 10, 2021

Should be 01 I believe. Counts from 00.

@gatorback
Copy link

It took me five months to discover that DVMT settings were preventing 4K resolution. Lessons learned include:

  • Use the terminal / tool: modgrubshell.efi
  • Use the command: setup_var_cv

For more details see: https://www.tonymacx86.com/threads/how-to-configure-4k-resolution-for-an-optiplex-3090-mff.321968/post-2364717

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants