Canonical Publishes Apple Hybrid Graphics Driver
Phoronix: Canonical Publishes Apple Hybrid Graphics Driver
On Thursday there was a new upstream contribution by Canonical for an Apple GMUX device driver, which can provide hybrid graphics support under Linux for certain Apple MacBook laptops...
Just to emphasize one point, right now the driver only supports adjusting the screen brightness. GPU switching should come along at some point, but there are other issues that have to be resolved on the machine I'm working with before it's even possible to work on the hybrid graphics support.
Is the device spoken of here a display mux? Does that mean that these notebooks could potentially switch between GPUs just by turning on the GPU and flipping the mux?
For the moment I'm assuming that an X restart would be required. Later, when we have more complete GPU switching (and DMA-BUF/PRIME/Bumblebee/whatever), we'll probably be able to enable the sleeping GPU, move all the buffers over to the new one, switch the mux, and then disable the other GPU within an X/wayland session.
Originally Posted by TechMage89
Note that in general it's not possible to just switch GPUs under running applications. Even if you move buffers, you need to also recompile shaders and recreate various other resources. Many of these resources will have hardware-dependent properties, and the application itself is required to make various choices regarding what resources or features to use. For example, the IGP card may be some Intel card that barely supports D3D10/GL3 but the discrete chip may have full D3D11/GL4 support, and the application may want to use some of those enhanced features if available.
Originally Posted by Veerappan
The only way to reliably handle this is to introduce a Windows-style lost-device message and force the application to completely tear-down and recreate the graphics context from scratch. This is a pain in the ass to handle (but Windows D3D devs are already used to handling it), but it's also a major incompatible break in the X11 protocol. It may be possible to make it a new protocol extension that an application can opt in to, and apps that don't will be locked to the GPU they initially started with (and the OS should be able to give useful information to a use when switching from discrete to integrated GPU that some applications are not able to switch and must be restarted if the user wants to fully disable the power-hungry discrete GPU).
Some of the Windows implementations of GPU switching actually just disallow switching the GPU mode if any app has an open D3D/D2D/GL context. That of course includes all modern browsers, including the Windows 7 default browser. It's pretty awful. Whatever happens with GPU switching, that is just not acceptable. Granted, it's still 100x better than having to restart all of X11, which might as well just be a whole OS reboot from the users' perspective.
Great to see Canonical making itself useful.
I'm sure Shuttleworth is already preparing a public jerk off highlighting Canonical's “immense” kernel contributions and how unneeded Red Hat is….
Originally Posted by MaxToTheMax
Nice to see Canonical finally contributing something, since they have been accused of not contributing anything.
But its too bad this wasn't contributed by Apple.
Why would Apple contribute to a project that competes with them?
Originally Posted by uid313
Apple doesn't compete with Linux, it competes with Acer, Asus, Dell, HP, Asus, etc.
Originally Posted by JanC
Microsoft contributed Hyper-V support to Linux.
I am not sure if Microsoft have contributed anything else, but it wouldn't surprise me if they contribute Azure or Kinect support to Linux.