Mac os nvidia optimus
Начнем с того, что технология Nvidia Optimus не заводима!
Все что можно найти в интернете — фэйк и обман:
Например, очень часто можно скачать кекст, который просто делает инжект EFI-стрингами. Таким образом, насильно заставляет думать Mac OS X, что видеокарта поддерживается. Да, nVidia будет значиться в системе, но на деле будет жрать только энергию. Поэтому ее всегда отключают через ssdt/dsdt.
Причины по которым Optimus не работает:
#1 Система переключения графики другая.
Видеокарта, построенная на Optimus не имеет выхода на монитор (максимум HDMI, но не у всех ). Она является только ускорителем графики для Intel. Сразу возникает вопрос: и как же она выводит картинку? Ответ — через встроенную Intel. Причем делает это через ее фрэймбуффер. Иными словами: все свои результаты видеокарта nvidia копирует из своей памяти в память видеокарты Intel. Но так как Intel не имеет своей видеопамяти, то nVidia копирует в оперативную память компа в зарезервированную область. А Intel просто выводит картинку с этих данных.
Сразу вылезают недостатки такого подхода:
1) 2 видеокарты работают и жрут энергию одновременно
2) Много времени уходит на копирование данных в ОЗУ.
Но есть и положительный момент. Во время переключения графики нету промаргивания экрана, по скольку физически Intel всегда выводит изображение на монитор. Nvidia только забирает у нее работу, если у встроенной не хватает сил.
Чтобы Nvidia понимала когда нужно переключаться предусмотрены 3 решения:
1) Список программ в драйвере Nvidia (win). Он редактируется, можно добавлять и свои программы.
2) Меню: «запустить с помощью высокопроизодительной Nvidia»
3) Автоматический режим — когда поступают вызовы библиотек DirectX, Nvidia сразу же на себя все берет, если ей не запрещает пункт 1 или 2.
#2 По-другому распаяна память для Nvidia или программные отличия(?)
Это я обнаружил, проведя эксперимент:
Я открыл скрытые настройки биоса в своем ноуте Asus N56VZ
И тем самым смог отключить встроенную графику аппаратно, так как HDMI у меня подпаян к Nvidia — я ее запустил без Optimus и Windows спокойно пошла работать так. И соответственно видела только одну видеокарту. Да и драйверы NVIDIA не предлагали запустить что-либо через встроенную карту. Далее я пробовал запустить OS X — сразу подвисон на nvidia драйверах.
Поставив nvidia web драйвера в логе появляется ошибка — NVDA::rmStart failed.
А именно не пошел драйвер NVDAResman, который отвечает за framebuffer.
Это говорит о том, что как минимум драйвер не распознал видеопамять нашей карточки Nvidia.
Здесь либо отличия в видеобиосе или в аппаратной реализации (у меня установлена «нативная» gt650m, так что шансов было больше на завод).
Подведем итоги: виновата не только система Optimus, но и сама Nvidia карточка. На нее тупо не садятся штатные драйвера.
Система переключения графики в настоящих маках совсем другая:
Видеокарты Intel + nVidia работают не вместе, как с optimus, а всегда по-отдельности, таким образом сохраняя производительность и электроэнергию.
Настоящики используют специальное устройство MUX ( в DSDT называется GMUX ), которое отвечает за распределение потоков информации с видеокарт на один монитор.
Аналогия переключателя.
Самое интересное, что более старые ноутбуки имели тоже MUX, и на старых мак ос некоторые ноуты поддавались переключению графики, я читал про успешный завод.
Но nVidia посчитала, что не время экономить и убрала MUX, сказав что технология Optimus настолько уникальна, что не требует никакой дополнительной периферии.
Таким образом, они наплевали на энергоэффективность и производительность. Конец 🙂
Possible Nvidia Optimus functionality in macOS Mojave
RastaFabi
I just thought about a way how enabling Nvidia Optimus might be possible now thanks to macOS Mojave. Since I do not have compatible hardware I cannot work on this myself, but someone might be interested nonetheless.
The problem:
Optimus is (was) not feasible as the way it physically works does not have any macOS support: The dGPU draws to the screen through the iGPU.
The possible fix:
Copy the dGPU framebuffer’s content via software to the iGPU rather than relying on hardware.
Theoretical solution:
Mojave is the first macOS release to (officially) support eGPUs connected via Thunderbolt to draw to the internal screen of a MacBook or iMac. This is accomplished by the aforementioned frame buffer-copying, with can be enabled from the GUI. (In the Finder’s Information dialog for any application.)
Thus it might be possible to achieve something similar for hackintoshs if the GPUs PCI-tree mimics a thunderbolt path (via DSDT/SSDT patching?).
The graphics drivers can be patched to load for Thunderbolt devices since quite some time (like done for eGPUs on older generation MacBooks via Thunderbolt 1 or 2). This is also applicable for NVIDIA web drivers and even already works in Mojave, though there is no acceleration yet, due the need for patching 10.13.6 drivers as the Mojave ones aren’t released yet.
Until Mojave web drivers are released this can be tested with 10.13.6 as there is non-GUI support for mentioned functionality.
This might be interesting for any Kepler chipset (Mojave support) and later Optimus system, and should work for any iGPU and not only Intel ones, as legit Macs copy the eGPU frame buffer to the dGPU if they are dual GPU models. I hope laptop hackintoshing can be brought forward significantly by this.
PS: I miss posted the thread. Could you please move it out of buying advice to anything more appropriate? – Fixed, thank you!
EDITs:
29.10.2018: Added supposed compatibility information.
Is this optimus working on my Mac OS X
6 posts in this topic
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It’s easy!
Sign in
Already have an account? Sign in here.
Recently Browsing 0 members
No registered users viewing this page.
Announcements
Similar Content
Hi all, recently I upgraded to hp z620. Almost without problems ran my old system softraid0 ElCapitan 10.11.6, install clean Sierra 10.12.1.
Config:
cpu intel E5 2650
mem 64gb 1333mhz
nvidia quadro 4000 2gb (pcie slot2)
wifi Atheros Ar9285 (pcie slot3)
nvidia gf440 (pci slot5)
All works well out of the box (sleep, restart, shutdown, usb2) except for power management (P-, C-states magically earned patch AppleIntelCPUPowerManagment.kext)
I decided to put a second video card (gf440) and received cyclic reboot when GUI loading. Equally for web and macOS drivers, but nv_disable = 1 — is loaded in GUI.
smbios — macpro6.1
Clover ver.3911
EFI / CLOVER / kexts / 10.12 /
FakeSMC.kext
USBInjectAll.kext
VoodooTSCSync.kext
FakeSMC_GPUSensors.kext
FakeSMC_CPUSensors.kext
FakeSMC_ACPISensors.kext
EFI / CLOVER / ACPI / patched
ssdt-cpupm.aml (gen by ssdtPRGen.sh)
SSDT-XOSI.aml
/ S / L / E
VoodooHDA.kext
AppleHDADisabler.kext
HackPlatformPlugin.kext
X79PlatformPlugin.kext
In BIOS everything is standard (AHCI, vt-x is off and so on.)
Varies with each other.
Please help and advice on how to make a second video card?
config.plist
original DSDT
patched DSDT by clover
in attached files
thz for answers!)
files.zip
I had everything working under 10.8.5 with Chimera Bootloader. I needed to upgrade my system (xCode 6 requires at least Mavericks) so i decided to switch to Clover and jump to Yosemite.
Everything is working like a charm, even better than before, but my second GPU, an XFX ATI Radeon HD 5770, stopped to work! I tried to edit DSDT and i tried to look around and other many ways but i couldn’t make it work.
I can boot normally but only the screens connected to my GTX 770 are working. To enable the 5770 i have to add the device+vendor id (0x68B81002) to AMD5000Controller.kext’s info.plist but when i boot into the OS the ATI monitor turns on (black with backlight turned on) and the nVidia’s monitor turns off (neither backlight is on) and it stuck there.
In the log i see exactly when this happens:
** GPU Hardware VM is disabled (multispace: disabled, page table updates with DMA: disabled) I tried to add the FB name in clover settings (Vervet), tried to inject and not ATI and a lot of other things but i didn’t succeed to make both work like it was before on Chimera&10.8, i dunno what else to do.
PS:
Logging without adding the Device-ID in the kext i notice a «ATY,Vervet: Not usable», but guess it’s caused from the missing device id.
I attach DarwinDump with ioreg, Clover Config, ACPI Tables, SSDTs, etc.
https://www.dropbox.com/s/cdw0kmzw4gxvu7h/DarwinDumper_2.9.7_AMI_X64_3168_Yos_zeus.zip?dl=0
I got an ASUS U41SV with a discrete NVIDIA graphics card, and I have reached a solution to disable it in OS X.
Spec of the laptop
CPU: Intel Core i5-2410M 2.3 GHz Memory: 8GB DDR3 1333 MHz Chipset: Intel HM65 Graphics: Intel HD3000 + NVIDIA GeForce GT540M Display: 14″ 1366 x 768 Audio codec: Realtek ALC269 WiFi: Atheros 9285
OS X Configuration
Niresh’s distro of Yosemite A whole SSD reserved for OS X Chameleon bootloader SMBIOS: MacBookPro8,1 (13-inch, Early 2011) Updated to 10.10.1 via App Store
Disabling Optimus
The guide here does not fit this laptop, but after some modifications, it works on U41SV.
I first extracted DSDT under Windows with AIDA64 Back to OS X, I used MaciASL to edit the DSDT extracted from Windows At the begging of the file, I added the following line: // . DefinitionBlock («iASLnv4Cgf.aml», «DSDT», 1, «_ASUS_», «Notebook», 0x00000000) < // the line below was added External (\_SB_.PCI0.PEG0.GFX0.SGOF, MethodObj) // . Then I added the following method before Method (_WAK, 1, Serialized) // . Method (M_OF, 0, NotSerialized) < If (CondRefOf (\_SB.PCI0.PEG0.GFX0._OFF)) < \_SB.PCI0.PEG0.GFX0._OFF () >If (CondRefOf (\_SB.PCI0.PEG0.GFX0._PS3)) < \_SB.PCI0.PEG0.GFX0._PS3 () >If (CondRefOf (\_SB.PCI0.PEG0.GFX0.SGOF)) < \_SB.PCI0.PEG0.GFX0.SGOF () >> // . Then called the method M_OF in the method _WAK // . Method (_WAK, 1, Serialized) < M_OF () // calling M_OF () WAK (Arg0) Return (Package (0x02) < Zero, Zero >) > // . And called the method M_OF again in the method _INI // . Scope (_SB.PCI0) < Method (_INI, 0, NotSerialized) < Store (0x07D0, OSYS) M_OF () // calling M_OF () If (CondRefOf (\_OSI, Local0)) < If (_OSI ("Linux")) < Store (0x03E8, OSYS) >// . Finally clicked compile in MaciASL, and saved the DSDT as /Extra/DSDT.aml
And now NVIDIA Optimus is disabled.
Edit: HDMI output working, VGA untested, able to adjust brightness of built-in display
And here is my edited DSDT.
ASUS-U41SV-DSDT.aml.zip
Credits
Thanks to Whit3Spirit for the guide here
Can anyone help me compile one?
I need to patch one so that I can follow the rest of this tutorial: http://www.insanelymac.com/forum/topic/295584-disabling-nvidia-optimus-card-on-all-laptops/page-11
The thing is I’m not sure what’s going wrong, I’ve tried to use Chameleon wizard to patch it but got 3 errors, and from what I’ve been told if it has any errors at all it will not be patched so no disabling nVidia for me.
Someone told me to manually rewrite the DSDT, or maybe it was to rewrite the patch within it but I simply have no idea how that is done or where to even begin
Some instructions would be great, I would like to understand what I’m doing so I know what exactly is going on.
Not sure if this is necessary
Specs:
Asus S550CM (touchscreen laptop)
Intel core i5-3317u 1.7 Ghz Quad
8 Gigs Ram
1TB HDD
24 Gigs SSD (mac installed on it)
Win 8.1