Jump to content
Evo*

[GUIDE] Macbook: enabling Optimus internal LCD mode

Recommended Posts


In this guide I provide a way to give 100% optimus internal LCD mode on a iGPU-only equipped Macbooks (not GT650M/GT750M/HD6750M MBP) on every boot. No special hardware interaction is necessary! Discovered as part of my implementation at [GUIDE] 2013 15" Macbook Pro Iris + GTX970@16Gbps-TB2 (AKiTiO Thunder2) + Win8.1/OSX

THIS GUIDE IS INTENDED FOR WINDOWS 8.1 UEFI ONLY! PLEASE PROCEED AT YOUR OWN RISK!

All Commands are from OS X Yosemite



1. Obtain the EFI Disk Indentifier

Open OS X Terminal (Enter the Following)

diskutil list


The Output will be similar to below but for your System. Take note of the EFI Identifier for YOUR System output. here mine is 'disk0s1' (shown in RED)

Evo$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage                         439.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data Windows                 60.0 GB    disk0s4
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Yosemite               *439.0 GB   disk1


If your disk identifier for the EFI is different than what is shown above please edit the below Terminal Commands to suit (Highlighted in RED)

2. Mounting and Backing up the EFI Partition.

mkdir /Volumes/efi


sudo mount -t msdos /dev/disk0s1 /Volumes/efi


Enter your Password and hit ENTER

sudo hdiutil create ~/Desktop/EFIBackup.dmg -srcdevice /dev/disk0s1


You will now have a Backup of your EFI on the Desktop.

3. Adding the Optimus Boot files to the EFI partition. Download the DMG image >>> http://s000.tinyupload.com/?file_id=68742157736895896560 <<< into the OS X Download Directory (Default) ~/Downloads

Mount the Downloaded Image

hdiutil attach ~/Downloads/OPTIMUS.dmg


The next Command will transfer all the Files to the EFI Partition

ditto -V --norsrc /Volumes/OPTIMUS /Volumes/EFI


Unmount the EFI Partition.

sudo diskutil unmount /dev/disk0s1


4. Choosing your Default OS to Auto Boot at Startup
System Preferences >> Startup Disk >> Select BOOTCAMP (Windows)


5. Reboot

Restart holding "option" Key and Select EFI Boot from the Apple Boot Loader to proceed to Boot into Windows.

Optimus Should be Running within Windows 8.1

Restart holding "option" Key and Select OS X Partition from the Apple Boot Loader to proceed to Boot into OS X
System Preferences >> Startup Disk >> Select BOOTCAMP (Windows)


Restart Again without holding the "option" key and Windows will Boot automatically with Optimus Enabled on Every Boot with no interaction. Unless you change the Startup Device from within Bootcamp ControlPanel (WIN) or System Preferences (OS X)

Booting With the Option Key will give you Access to All Bootable OS from the Apple Bootloader

6. Troubleshooting. (Optional) [FONT=arial] Encountering the dreaded GRUB 2 boot prompt [/FONT]

[FONT=sans-serif][FONT=arial]If improperly configured, GRUB 2 may fail to load and subsequently drop to a boot prompt. To address this issue, proceed as follows:[/FONT][/FONT] [FONT=sans-serif][FONT=arial] 1. List the drives which GRUB 2 sees:[/FONT][/FONT]
[FONT=arial]grub2> ls[/FONT]
[FONT=arial] [/FONT][FONT=sans-serif][FONT=arial] 2. While the output for a gpt partition table /dev/sda with four partitions will look something like this:[/FONT][/FONT]
[FONT=arial](hd0) (hd0,gpt4) (hd0,gpt3)  (hd0,gpt2) (hd0,gpt1)[/FONT]
[FONT=sans-serif][FONT=arial] 3. With this information you can now probe each partition of the drive and locate your efi parition containing the windows boot efi[/FONT][/FONT]
[FONT=arial]ls (hd0,gpt1)/ [/FONT]
[FONT=arial] [/FONT] [FONT=sans-serif][FONT=arial]4. Declare your root partition:[/FONT][/FONT]

set root='(hd1,gpt1)'



5. the declared root now can be edited in the grub config file in OS X

/Volumes/EFI/EFI/Grub/grub.cfg


apple_set_os
insmod part_gpt
insmod chain
set root='(hd1,gpt1)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot



[FONT=arial]How do I restore the old EFI with the Backup file?[/FONT]

Quote

How do I restore the old EFI with the Backup file?



Quote

Just repeat Step 2&3 with the new file names and without making a new backup:

If your disk identifier for the EFI is different than what is shown above please edit the below Terminal Commands to suit (Highlighted in RED)



2.

mkdir /Volumes/efi

sudo mount -t msdos /dev/disk0s1 /Volumes/ef

i

3.

hdiutil attach ~/Desktop/EFIBackup.dmg

ditto -V --norsrc /Volumes/EFIBackup /Volumes/EFI

sudo diskutil unmount /dev/disk0s1



4. Profit

  • Thumbs Up 6

Share this post


Link to post
Share on other sites

Hi. I having problem with the Grub 2 boot prompt. If I understand correctly I am supposed to set the root partition to the EFI partition that we edited earlier(Which in my case is hd1,gpt1). However I am still unable to boot using Grub 2- still stuck with the boot prompt.

When I probe (hd1,gpt1) with

ls (hd1,gpt1)

I can only see

apple/ Grub/

Is there supposed to be Microsoft/

Thank you for your help

Share this post


Link to post
Share on other sites

You think that OSX 10.10.2 will overwrite or change any of this?

---

Edit: 10.10.2 doesn't affect this. I was worried that the "Thunderstrike exploit" patch would change sth on the EFI partition, but it didn´'t.

  • Thumbs Up 1

Share this post


Link to post
Share on other sites

Awesome guide man, thanks a lot! Do you think this will work with a VM like Parallels Desktop? Since I have a limited understanding about what you've actually done here, I am too afraid to load the Optimus enabled partition in Parallels (maybe it would somehow mess up the partition?). Cheers

Share this post


Link to post
Share on other sites

Paralles should only affect the drivers and not the EFI partition!

Share this post


Link to post
Share on other sites

Well that was a silly question from me then... Thanks!

Edit:

Wait, so is it actually safe to run Parallels or not?

Share this post


Link to post
Share on other sites

You are talking about running the Bootcamp partition in Parallels right?

I think it shouldn't be a problem, but not 100% sure. The thing is, Parallels will install driver for itself to give the best performance. But I would assume, that it will just add driver and not remove any of them. Imho it is worth to try.

  • Thumbs Up 1

Share this post


Link to post
Share on other sites
You are talking about running the Bootcamp partition in Parallels right?

I think it shouldn't be a problem, but not 100% sure. The thing is, Parallels will install driver for itself to give the best performance. But I would assume, that it will just add driver and not remove any of them. Imho it is worth to try.

I haven't tried but seems to be impossible:

"Parallels Desktop (v9 and v10) supports only storage devices (Thunderbolt and FireWire), i.e. external hard drives - are supported.

Parallels Desktop (v9 and v10) for Mac does not provide support for non-storage FireWire devices, i.e. scanners, printers, video/sound cards, etc. - are not supported."

KB Parallels: Firewire device does not work.

Share this post


Link to post
Share on other sites

Of course, my fault. I was thinking he was just talking about using the eGPU+bootcamp partition in Parallels without the eGPU.

Thunderbolt eGPU in Parallels will not work.

Share this post


Link to post
Share on other sites

Thanks for this guide! Worked for my MacBook Pro 13“ (Mid 2014) with Akitios and Asus GeForce GTX 660. But how is it possible to replay the original backup of the EFI that was created in Step 2? Which command must be entered in terminal?

Sorry for my bad english…

Share this post


Link to post
Share on other sites
Of course, my fault. I was thinking he was just talking about using the eGPU+bootcamp partition in Parallels without the eGPU.

Thunderbolt eGPU in Parallels will not work.

Sorry, just realised how ambiguous my question was. I meant running the partition itself in parallels, without the eGPU. And if anyone wonders, it works without problems.

Thanks for the replies.

Share this post


Link to post
Share on other sites

Hi I'm curious - I have a thunderbolt portable hd drive - when I plug it in and try to boot the egpu in windows - it seems that the grub cfg file loses site of where to boot the efi as the naming structure of the drives changes (i.e. with no HDD attached the efi is on hd1gpt1 for example, but when it boots with the HDD attached, the efi partition changes to hd2gpt1 and thus the grub loader fails and heads to the prompt..... I have tried changing the grub.cfg file to point to the correct partition but windows starts loading then crashes... any suggestions welcome!

Share this post


Link to post
Share on other sites
How do I restore the old EFI with the Backup file?

Just repeat Step 2&3 with the new file names and without making a new backup:

If your disk identifier for the EFI is different than what is shown above please edit the below Terminal Commands to suit (Highlighted in RED)

2.

mkdir /Volumes/efi

sudo mount -t msdos /dev/disk0s1 /Volumes/efi

3.

hdiutil attach ~/Desktop/EFIBackup.dmg

ditto -V --norsrc /Volumes/EFIBackup /Volumes/EFI

sudo diskutil unmount /dev/disk0s1

4.

Profit

  • Thumbs Up 1

Share this post


Link to post
Share on other sites
Just repeat Step 2&3 with the new file names and without making a new backup:

ditto -V --norsrc /Volumes/EFIBackup /Volumes/EFI

While attaching EFIBackup.dmg: /dev/disk2 /Volumes/EFI 1

I'm getting: ditto: can't get real path for source '/Volumes/EFIBackup'

Share this post


Link to post
Share on other sites

how to?

Somehow the EFIBackup.dmg file is inside the EFI partition...

Everytime I try to boot windows, the GRUB command line comes up and nothing happens.

Edit: Nevermind, got it.

Share this post


Link to post
Share on other sites

any usb media device connected on boot i believe interferes with the grub boot. detach any connected devices.

Share this post


Link to post
Share on other sites

Hi,

I was using my egpu completely fine with windows 8.1 and i saw that nvidia has released dx12 drivers for Windows 10 preview edition. so I thought to install the windows 10 using bootcamp. so now I have installed Windows 10 successfully also my egpu was detected and i installed the drivers too. everything looked fine but now when i try to run 3dmark 11 to test performance, my only internal gpu works but not my gtx 980. i knew because it is giving very low fps in the benchmark test. Is any one had any idea please let me know. Thanks

Share this post


Link to post
Share on other sites

Would it be possible to make a version of Optimus.dmg that could be enabled within reFind?

Share this post


Link to post
Share on other sites

is the original way to install windows via bootcamp called UEFI? Or I have to do something to make it UEFI installed?

Share this post


Link to post
Share on other sites

After following these steps my MBP now runs hotter. Task Manager says that 'System' is using up ~12% of CPU usage pretty much constantly, and idle temperatures are about 60-65 degrees where before they were around 40-45.

Any idea why this is the case? And is there a way to fix it?

Share this post


Link to post
Share on other sites

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!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.