Menu

Graphics

arsr4du

Home > Configuration > Graphics

<key>Graphics</key>
<dict>
...
</dict>

This parameter group is made for injecting video card properties as done, for example, by Natit.kext. There are many different parameters that are injected, mostly constants, some of them calculated, some of them defined in the internal table and only a few parameters can be adjusted with the configuration file.

Table of Contents


Inject

<key>Inject</key>
<true/>

Enables graphics injection, which is necessary for a working system. It is only advised to disable it, if you do not know a better method. Some video cards, for instance Nvidia GTX 6xx or AMD Radeon HD 6xxx do not require injection and it will automatically be disabled without user interaction. At least it is enough to reach the desktop.

Enabled by default.


Inject / Intel

<key>Inject</key>
<dict>
  <key>Intel</key>
  <true/>
</dict>

Inject / ATI

<key>Inject</key>
<dict>
  <key>ATI</key>
  <true/>
</dict>

Inject / NVidia

<key>Inject</key>
<dict>
  <key>NVidia</key>
  <true/>
</dict>

VRAM

<key>VRAM</key>
<integer>1024</integer>

Amount of video memory in MB. It is determined automatically but no one will be harmed if you write a correct value. However, changing it has not helped anyone yet.


LoadVBios

<key>LoadVBios</key>
<true/>

Loads a video bios from a file, which needs to be stored at the directory EFI/CLOVER/OEM/[model]/ROM or EFI/CLOVER/ROM with the name [vendor]_[device].rom, for instance 1002_68d8.rom. Sometimes it makes sense to load video bios manually, for example when you need a patched version or when the video card does not show it to the system - like mobile Radeon cards. In this case it is enough to set this parameter to Yes without providing any file. Clover will read the video bios from legacy memory at 0xC0000, where it is present most of the times, and enable functionality.
Apparently the video bios written to the card's ROM does not match the one stored at address 0xC0000 - the shadow ROM. In short:

  • <true/> - Use for mobile Radeon cards without any external file.
    Can also be used to supply a legacy video bios to cards, which only contain a UEFI video bios.
  • <false/> - For all other variants

DualLink

<key>DualLink</key>
<integer>0</integer>

Default is 1.

Some systems show a quartered screen. Use 0 to solve this problem, as showed in the example above.


PatchVBios

<key>PatchVBios</key>
<true/>

Clover applies corrections to the shadow ROM at address 0xC0000 to allow support of the highest monitor resolution. For instance, a monitor's EDID contains the mode 1920x1080 but the video bios does not. Clover will apply it as the first mode to be used. In case the monitor does not produce an EDID, it can be injected manually.

In case ScreenResolution in section GUI is set, it will be used for this patch.

Should the automatic patch fail, then you can specify a manual one.


PatchVBiosBytes

<key>PatchVBiosBytes</key>
<array>
    <dict>
        <key>Find</key>
        <data>gAeoAqAF</data>
        <key>Replace</key>
        <data>gAeoAjgE</data>
    </dict>
</array>

This example applied to an AMD Radeon HD 6670 video bios, resulting in a replacement of mode 1920x1440 with mode 1920x1080. It is advised to choose a mode with the same horizontal resolution.

It is possible to apply multiple patches. An Nvidia video bios, for instance, was successfully modified with four patches.


EDID

<key>EDID</key>
<dict>
    <key>Inject</key>
    <true/>
    <key>Custom</key>
    <data>AP///////wAyDADfAAAAAAASAQOAIRV4CunVmVlTjigmUFQAAAABAQEBAQEBAQEBAQEBAQEB3iGgcFCEHzAgIFYAS88QAAAY3iGgcFCEHzAgIFYAS88QAAAAAAAA/gBXNjU3RwAxNTRXUDEKAAAA/gAjMz1IZYSq/wIBCiAgAJo=</data>
    <key>VendorID</key>
    <string>0x1006</string>
    <key>ProductID</key>
    <string>0x9221</string>
</dict>

Old keys InjectEDID and CustomEDID were moved here.

Inject parameter is useful when an EDID exists but is not seen by Apple's drivers. In this case it is enough to set this option to <true/>. Clover will automatically extract the EDID and provide it to the drivers. See Mobile Radeons for more info. For monitors without DDC and for UEFI-only computers a custom EDID is needed.

Custom parameter is for providing custom EDID when it's missing. The main requirement is to have a correct maximal resolution.

Another possibility is to use ViewSonic EDID Editor v3.1.5 that can easily be ported to Mac, if needed.

An EDID from a Dell Inspiron will be used in the sample configuration file with a matrix of 1440x900.

A custom EDID will also be used for automatic video bios patching. Look above.

You can override VendorID and ProductID in EDID.

Rev 4351, 4355

Additional patches for EDID.

Now config.plist may contain follow EDID section:

<key>EDID</key>
        <dict>
            <key>#Custom</key>
            <data>AP///////wAGECGSAAAAAAASAQOAIRV4CunVmVlTjigmUFQAAAABAQEBAQEBAQEBAQEBAQEB3iGgcFCEHzAgIFYAS88QAAAY3iGgcFCEHzAgIFYAS88QAAAAAAAA/gBXNjU3RwAxNTRXUDEKAAAA/gAjMz1IZYSq/wIBCiAgAJo=</data>
            <key>#Inject</key>
            <true/>
            <key>#ProductID</key>
            <string>0x9221</string>
            <key>#VendorID</key>
            <string>0x1006</string>
            <key>#HorizontalSyncPulseWidth</key>
            <integer>100</integer>
            <key>#VideoInputSignal</key>
            <string>0xA5</string>
        </dict>

Custom is EDID obtained or created manually. You mostly don't need do it as Clover usually can obtain it by himself.
Inject=true informs Clover to inject Custom or Discovered EDID into video device properties. You have to set it to true is you do patches.
ProductID and VendorID- may be you want to mimic your display to be Apple manufactured. But you should know what you do. Making this patch I found that Brightness control stop working. Remove this patch and brightness control is working again!
HorizontalSyncPulseWidth - this patch helps to resolve garbled screen at boot with Intel graphics. Known problem of 8 apples.

I see that the patch is still needed

<dict>
                <key>Comment</key>
                <string>Patch 8 apples</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>AQAAdRc=</data>
                <key>MatchOS</key>
                <string>10.11</string>
                <key>Name</key>
                <string>IOGraphicsFamily</string>
                <key>Replace</key>
                <data>AQAA6xc=</data>
            </dict>

but this patch alone is not full solution. The apple is broken for a several seconds and then restored.
With new Clover setting HorizontalSyncPulseWidth=100 there is a full solution. The image is good and not jumped.

VideoInputSignal - this is additional patch for the same problem but I found no inluence.
Definition of the value is follow
Bit 7=1
Digital input. If set, the following bit definitions apply:

Bits 6–4 Bit depth: 000=undefined, 001=6, 010=8, 011=10, 100=12, 101=14, 110=16 bits per color, 111=reserved Bits 3–0 Video interface: 0000=undefined, 0001=HDMIa, 0010=HDMIb, 0100=MDDI, 0101=DisplayPort

My default values for desktop 0x80 (Digital, all undefined), for laptop 0x90 -6bits per color?! - not good.
It seems value 0xA0 will be better if used.
And I don't know interface for intenal screen.

Credits. I was informed by Derek about this patch but initially it was wrong (byte 64 while it must be 63+65).
https://github.com/1and1get2/Clover/commit/ee301efdcce8ae1e47be21267490753a0c145c1d
The discussion was at tmx site as well wrong and without result. And I don't know who is initial inventor because in those matter it can't work properly.


VideoPorts

<key>VideoPorts</key>
<integer>2</integer>

The amount of ports on a video card, including TVO and/or HDMI. The chosen Apple framebuffer may not correspond to our real video card.


FBName

<key>FBName</key>
<string>Macaque</string>

This parameter is specific to AMD Radeon cards, which have a bunch of different framebuffers without any specific pattern. For a wide range of common video cards Clover will automatically choose a suiting framebuffer name. Feel free to set your own if you want. If you do not know what to write here, delete this parameter completely.

Do not use Macaque! It is solely used for absurdity. But no - people still use it in their configurations!

Small guidance table:

Series v / Type >|Mobile|Desktop :---|:---|:--- HD 5000|Alouatta|Baboon HD 6000|Cttail|Ipomoea HD 7000|Pondweed|Futomaki


NVCAP

<key>NVCAP</key>
<string>04000000000003000C0000000000000A00000000</string>

This parameter is only useful for Nvidia video cards and configures types and usage of video ports. The example line contains 40 capitalised hexadecimal digits. Theory is missing in this case and praxis shows controversial results.

Following table exists (found somewhere on insanelymac) but its correctness is debatable:

img

You can also find other methods on calculating a correct value for this line.

Clover will try to generate one according to the video bios.


display-cfg

<key>display-cfg</key>
<string>03010300FFFF0001</string>

This parameter is also just for Nvidia cards. For details see the topic on projectosx. However the listed examples are controversial. You can see real configurations in this topic. Apparently it is best to just let Clover handle this value. Leave it out completely and let Clover do the calculation.


ig-platform-id

<key>ig-platform-id</key>
<string>0x01620005</string>

This parameter is used to enable the internal Intel HD 4000 video card. Until now no common rule for selecting a value was found, so either let Clover handle this parameter or use another one if it does not work.

Here is a table with possible values:

Value|Type|Ports :---|:---|:--- 0x01660000|Mobile|4 ports: 1 LVDS, 3 DP 0x01660001|Mobile|4 ports: 1 LVDS, 1 HDMI, 2 DP 0x01660002|Mobile|1 port: LVDS 0x01660003|Mobile|4 ports: 1 LVDS, 1 HDMI e 2 DP 0x01660004|Mobile|1 port: LVDS 0x01620005|Desktop|3 ports: DP 0x01620006|Desktop|0 ports 0x01620007|Desktop|0 ports 0x01660008|Mobile|3 ports: 1 LVDS, 2 DP 0x01660009|Mobile|3 ports: 1 LVDS, 2 DP 0x0166000a|Mobile|3 ports: 2 DP, 1 HDMI 0x0166000b|Mobile|3 ports: 2 DP, 1 HDMI


RadeonDeInit

Rev 4296

A possibility to de-init Radeon cards.
It was very old problem since ElCapitan that AMD Radeon HD6xxx and up will not wake after sleep if used as first card.
If the card is secondary and CSM enabled then the card works fine. So the differences is initialisation.
The solution was found by vit9696 and used in private WhateverGreen.kext. Then Mieze proposed the solution as ACPI patch.
Now I included this into Clover.

You have to set in config.plist:

<key>RadeonDeInit</key>
<true/>

Related threads
No graphics / USB / Audio after wake

Tracing back the AMD GPU wakeup issue to its origin