Jump to content

ah-

Registered User
  • Posts

    9
  • Joined

  • Last visited

About ah-

  • Birthday 11/14/1988

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ah-'s Achievements

Curious Beginner

Curious Beginner (1/7)

18

Reputation

  1. I looks like Optimus.dmg is the old grub implementation of apple_set_os.efi, which does exactly the same thing as apple_set_os.efi, just as a grub command instead of a standalone EFI application. You don't need both, one is enough and I think apple_set_os.efi is the better implementation. In particular since less can go wrong, like grub not finding stuff. I'm a bit surprised to see that it does anything on systems without a dedicated GPU, but who knows what exactly Apple does.
  2. I'm not sure if the NVIDIA driver does any power management, on Linux the dedicated GPU just stays powered up even if you boot with Intel as the primary. Somebody wrote a GMUX driver that can cut the power, see here: MacRumors Forums - View Single Post - Win7 x64 booting natively via EFI (no BIOS emulation) It's rather crude and probably won't work if you want to use the NVIDIA GPU at all, but maybe it decreases power consumption. Also, did you have any issues with black screens at all? What software/versions are you running?
  3. Hi everyone, you might be interested in this: https://github.com/0xbb/apple_set_os.efi Download it from releases, install refind, sudo mount -t msdos /dev/disk0s1 /efi, copy apple_set_os.efi to /efi/EFI/custom/apple_set_os.efi. You should then see an entry for apple_set_os.efi in refit. Before you boot Windows, just quickly start that, which will flash the screen while it runs and then just boot Windows. This enables the Intel GPU so it's visible in the device manager. No more grub/Linux required. (To clarify, this disables the hiding of the Intel GPU and makes it appear in the device manager, nothing else. NVIDIA could still remain your primary GPU). There is now also a Windows version of gpu-switch at https://github.com/0xbb/gpu-switch, which you can use to set the primary GPU for the next boot. I just tested it and was able to use the Intel GPU, but booting with both GPUs active and the NVIDIA driver installed often gives me black screens after booting. I have no idea why, when I uninstall the NVIDIA driver it works perfectly, I just see two displays, one for each GPU.
  4. You could try that, but the screen going black means that at least the display switching worked. External doesn't really matter, so it just might be that the ddc switch didn't happen. You don't have any sleeps in your startup.nsh so adding some after each mm might help. I think it might be "stall". Another thing might be that it could work better with the eGPU disconnected, just to rule out one possible source of errors.
  5. That's strange, things like "mm 07c2 -IO 2" should work in the EFI shell. That's pretty cool, it's no big surprise that Windows crashes if you cut the power to the dGPU while it's in use . The gmux just switches the data lines for the internal display without giving the OS any notification, so it's also no surprise the LCD turns black because the Intel driver doesn't know that suddenly there is a display connected to it. But you could try to just switch the external display (with just wait{1,100,o 0x7c2 2}; o 0x7d4 0x40;) and then connect an external display. This way there's a hotplug notification and maybe you get a picture from the Intel card on the external display. And it's probably a good idea to leave out powering off the dGPU for now, if you want that you should do it before booting Windows. So the next major step would be to get the gmux switched before booting, if it works in Windows it has to work outside of it as well.
  6. You could also try switching the gmux before booting windows, for example in startup.nsh or using GRUB. But yeah maybe for the beginning it's easiest to just do it in windows because it's more interactive than rebooting all the time to see if anything happens. In the long run it might be necessary to do the switching before booting, so Windows sees the internal display connected to the intel card during boot. The following should switch the gmux to integrated (based on what the linux driver does): // new version of outb(2, 0x728) - switch ddc outb(2, 0x7c2) // write the value to the value register sleep 100ms // instead of gmux_index_wait_ready, just to be on the safe side outb(0x28, 0x7d4) // write the port to GMUX_PORT_WRITE sleep 100ms // instead of gmux_index_wait_complete // new version of outb(3, 0x710) - switch internal display outb(3, 0x7c2) // write the value to the value register sleep 100ms // instead of gmux_index_wait_ready, just to be on the safe side outb(0x10, 0x7d4) // write the port to GMUX_PORT_WRITE sleep 100ms // instead of gmux_index_wait_complete // new version of outb(3, 0x740) - switch external display outb(3, 0x7c2) // write the value to the value register sleep 100ms // instead of gmux_index_wait_ready, just to be on the safe side outb(0x40, 0x7d4) // write the port to GMUX_PORT_WRITE sleep 100ms // instead of gmux_index_wait_complete
  7. I wrote a good part of the apple_gmux driver . The driver you linked previously is my old version that doesn't support the newest apple hardware. I don't remember if it's just the retina mbps, but apple changed how you have to communicate with the gmux chip. That's why poking at the old IOports doesn't do anything. See LXR linux/drivers/platform/x86/apple-gmux.c and [PATCH] apple-gmux: Add support for message box interface (as found in MBP10,1/Retina MacBook Pro) -- Linux x86 Platform Driver Development for more. Unfortunately I don't have access to a retina mbp so I can't help with testing/developing directly. When using any code from this, use the first link (or a recent mainline kernel), not the patch. Edit: So what you need to do to hopefully get a minimal version to work is to take the part so that runs. For that you need gmux_index_write8 (that's the same as the outbs, but with the message box interface), which requires gmux_index_wait_ready and gmux_index_wait_complete. I'm not sure about this, but maybe you can even skip the wait functions and for a rough first version just replace them with a long enough sleep.
  8. Just a quick hint, how the gmux is controlled changed with the retina mbps from simple ioports to a message box. See the newer apple_gmux linux driver for how to use it.
×
×
  • Create New...

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.