Files
Getting-Started-With-ACPI/Universal/spoof.html

519 lines
16 KiB
HTML

<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>GPU Spoof · GitBook</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<link rel="stylesheet" href="../gitbook/style.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
<link rel="stylesheet" href="../styles/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="../cleanup.html" />
<link rel="prev" href="irq.html" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="../">
<a href="../">
Getting Started With ACPI
</a>
</li>
<li class="chapter " data-level="1.2" data-path="../ssdt-easy.html">
<a href="../ssdt-easy.html">
SSDTs: Easy Way
</a>
</li>
<li class="chapter " data-level="1.3" data-path="../ssdt-long.html">
<a href="../ssdt-long.html">
SSDTs: Long Way
</a>
</li>
<li class="header">Manual</li>
<li class="chapter " data-level="2.1" data-path="../Manual/dump.html">
<a href="../Manual/dump.html">
Dumping the DSDT
</a>
</li>
<li class="chapter " data-level="2.2" data-path="../Manual/compile.html">
<a href="../Manual/compile.html">
Decompiling and Compiling
</a>
</li>
<li class="header">Desktop</li>
<li class="chapter " data-level="3.1" data-path="../Desktops/desktop-ec.html">
<a href="../Desktops/desktop-ec.html">
Embedded Controllers
</a>
</li>
<li class="header">Laptop</li>
<li class="chapter " data-level="4.1" data-path="../Laptops/laptop-ec.html">
<a href="../Laptops/laptop-ec.html">
Embedded Controllers
</a>
</li>
<li class="chapter " data-level="4.2" data-path="../Laptops/backlight.html">
<a href="../Laptops/backlight.html">
Backlight PNLF
</a>
</li>
<li class="chapter " data-level="4.3" data-path="../Laptops/trackpad.html">
<a href="../Laptops/trackpad.html">
Trackpad GPI0
</a>
</li>
<li class="header">Universal</li>
<li class="chapter " data-level="5.1" data-path="plug.html">
<a href="plug.html">
Plugin type
</a>
</li>
<li class="chapter " data-level="5.2" data-path="awac.html">
<a href="awac.html">
AWAC vs RTC
</a>
</li>
<li class="chapter " data-level="5.3" data-path="nvram.html">
<a href="nvram.html">
NVRAM PMC
</a>
</li>
<li class="chapter " data-level="5.4" data-path="irq.html">
<a href="irq.html">
IRQ Fix
</a>
</li>
<li class="chapter active" data-level="5.5" data-path="spoof.html">
<a href="spoof.html">
GPU Spoof
</a>
</li>
<li class="header">Cleanup</li>
<li class="chapter " data-level="6.1" data-path="../cleanup.html">
<a href="../cleanup.html">
Cleanup
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href=".." >GPU Spoof</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div class="search-plus" id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="renaming-gpus">Renaming GPUs</h1>
<p>So this is mainly needed for GPUs that are not natively supported OOB due to their names, most commonly:</p>
<ul>
<li>R9 290/390</li>
<li>R9 280/380</li>
<li>R7 270/370</li>
<li>R9 260/360</li>
<li>R7 250</li>
<li>R7 240</li>
</ul>
<p>Instead, these GPUs need to be &quot;spoofed&quot; or faked into a model that closely matches theirs, generally this will be the &quot;X&quot; variant of the card. For some reason Apple never bothered adding the PCI IDs for these other cards even though their GPU cores are supported by the driver.</p>
<p>So to spoof the GPU, we need to find a couple things:</p>
<ul>
<li>Suitable PCI ID for the GPU</li>
<li>ACPI Path of the GPU</li>
<li><a href="https://github.com/khronokernel/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-GPU-SPOOF.dsl.zip" target="_blank">SSDT-GPU-SPOOF</a></li>
</ul>
<h2 id="finding-a-suitable-pci-id">Finding a suitable PCI ID</h2>
<p>To find a suitable PCI ID, we&apos;ll be using <a href="https://pci-ids.ucw.cz/read/PC/1002" target="_blank">PCI ID Repository</a> which has a full database of all AMD GPUs. For this example, we&apos;ll be creating a Spoof SSDT for the R9 390. For a full list of supported GPUs, please see the <a href="https://khronokernel-3.gitbook.io/catalina-gpu-buyers-guide/" target="_blank">GPU Buyers Guide</a>. The closest match to this GPU would be the 390X, and looking on that site near the top gives us this:</p>
<pre><code>Vendor 1002 -&gt; Device 1002:67b0
</code></pre><p>Now lets break this down into a device ID we can use:</p>
<ul>
<li><code>1002</code>: The vendor ID, all AMD devices have this ID</li>
<li><code>67B0</code>: The device ID, this is what we care about</li>
</ul>
<p>So how do we convert this to a fake ID? Well the format of a fake ID:</p>
<pre><code>&quot;device-id&quot;,
Buffer (0x04)
{
0xB0, 0x67, 0x00, 0x00
},
</code></pre><p>As you can see, the bytes are swapped in pairs. Keep this in mind when we make our SSDT</p>
<p>The specifics are due to <a href="https://en.wikipedia.org/wiki/Endianness" target="_blank">Endianness</a> for those who are curious</p>
<h2 id="finding-the-acpi-path-of-the-gpu">Finding the ACPI Path of the GPU</h2>
<p>To find the PCI path of a GPU is fairly simple, best way to find it is running Windows: </p>
<ul>
<li>Open Device Manager</li>
<li>Select Display Adapters, then right click your GPU and select Properties</li>
<li>Under the Details Tab, search for &quot;Location Paths&quot;</li>
</ul>
<p><img src="https://cdn.discordapp.com/attachments/456913818467958789/675210740231176212/unknown.png" alt=""></p>
<p>The second &quot;ACPI&quot; is what we care about:</p>
<pre><code>ACPI(_SB_)#ACPI(PC02)#ACPI(BR2A)#ACPI(PEGP)#PCI(0000)#PCI(0000)
</code></pre><p>Now converting this to an ACPI path is quite simple, remove the <code>#ACPI</code> and <code>#PCI(0000)</code>:</p>
<pre><code>`_SB_.PC02.BR2A.PEGP
</code></pre><p>And voila! We&apos;ve found our ACPI path, now that we have everything we&apos;re ready to get cooking</p>
<h2 id="making-the-ssdt">Making the SSDT</h2>
<p>To start grab our <a href="https://github.com/khronokernel/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-GPU-SPOOF.dsl.zip" target="_blank">SSDT-GPU-SPOOF</a> and open it up. Here there&apos;s a couple things to change:</p>
<pre><code>External (_SB_.PCI0, DeviceObj)
External (_SB_.PCI0.PEG0.PEGP, DeviceObj)
</code></pre><p>For our example, we&apos;ll change all mentions of :</p>
<ul>
<li><code>PCI0</code> with <code>PC02</code></li>
<li><code>PEG0</code> with <code>BR2A</code></li>
</ul>
<p>Hint: If your ACPI path is a bit shorter than the example, this is fine. Just make sure the ACPI paths are correct to your device.</p>
<p>Now that the ACPI pathing is correct, we can finally apply our fake ID!!!</p>
<p>So the 2 parts we want to change:</p>
<p><strong>device ID</strong>:</p>
<pre><code>&quot;device-id&quot;,
Buffer (0x04)
{
0xB0, 0x67, 0x00, 0x00
},
</code></pre><p><strong>Model</strong>:</p>
<pre><code>&quot;model&quot;,
Buffer ()
{
&quot;AMD Radeon R9 390&quot;
}
</code></pre><p><code>&quot;device-id&quot;</code> will be set to our PCI ID that we found in &quot;Finding a suitable PCI ID&quot; and <code>&quot;model&quot;</code> is mainly cosmetic </p>
<h2 id="now-youre-ready-to-compile-the-ssdt"><a href="../Manual/compile.html">Now you&apos;re ready to compile the SSDT!</a></h2>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="irq.html" class="navigation navigation-prev " aria-label="Previous page: IRQ Fix">
<i class="fa fa-angle-left"></i>
</a>
<a href="../cleanup.html" class="navigation navigation-next " aria-label="Next page: Cleanup">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"GPU Spoof","level":"5.5","depth":1,"next":{"title":"Cleanup","level":"6.1","depth":1,"path":"cleanup.md","ref":"cleanup.md","articles":[]},"previous":{"title":"IRQ Fix","level":"5.4","depth":1,"path":"Universal/irq.md","ref":"Universal/irq.md","articles":[]},"dir":"ltr"},"config":{"plugins":["theme-default","-lunr","-search","search-plus","addcssjs","favicon-plus"],"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"},"pluginsConfig":{"output":"_book","addcssjs":{"css":[],"js":[]},"fontsettings":{"theme":"night","family":"sans","size":2},"favicon-plus":{"appleTouchIconPrecomposed152":"","favicon":"","output":"_book"},"highlight":{},"favicon":"/icons/favicon.ico","appleTouchIconPrecomposed152":"/icons/appleTouchIconPrecomposed152.png","sharing":{"facebook":false,"twitter":false,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":[]},"theme-default":{"showLevel":false,"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"}},"search-plus":{}},"theme":"default","pdf":{"pageBreaksBefore":"/","headerTemplate":null,"paperSize":"a4","margin":{"right":62,"left":62,"top":36,"bottom":36},"fontSize":12,"fontFamily":"Arial","footerTemplate":null,"chapterMark":"pagebreak","pageNumbers":false},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"links":{"sharing":{"google":false,"facebook":false,"twitter":false,"weibo":false,"all":false}},"gitbook":"*"},"file":{"path":"Universal/spoof.md","mtime":"2020-02-14T19:22:34.908Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-02-14T19:23:20.420Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>
<script src="../gitbook/gitbook.js"></script>
<script src="../gitbook/theme.js"></script>
<script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
<script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>