You are viewing airlied


July 2014
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

airlied [userpic]
some info on intel/nvidia switchable

Okay I sat down for a few hours last week with a switchable Intel/NVidia GPU laptop, and at least worked out some more info. I'm going to braindump it here.

Firstly in intel_acpi.c jbarnes has worked out some of the values for outputs in the ACPI tables esp around what is and isn't MUXed.

Now we had suspected that one of the nvidia GPU DSM methods (method 5) might actually do something, but a deeper investigation along with mjg59 made us realise it isn't the mux control, so we started looking elsewhere.

So we tracked down the MXDS method which is attached to the ACPI outputs per GPU, there is one on the LVDS for the internal GPU and one on the LVDS for the external GPU. So it appears that this is the mux switching object. Looking further up it appears that this is called via a WMI interface, so to do this all properly it looks like we need to write a WMI driver to call the mux switching, instead of just banging on ACPI methods.

So going forward a WMI driver needs to be written to which you pass the ACPI output IDs to the WMI MXDS method, and it should switch the mux.

Now despite this we didn't actually get the switching to happen, nouveau never got an auxch connection to the panel on the laptop, so I'd really like to see if anyone is useful enough to take this knowledge and make it do something on an LVDS laptop, all I have locally are a big pile of hacks.

Thanks to Jesse Barnes for the laptop, and Matthew Garrett for the ACPI decoding.

[update: one commentor asked about Macs, they have a non-WMI, non-ACPI method of handling things, sidolin on #nouveau at one stage mostly reverse engineering the mux, which was just reading/writing some memory mapped I/O ports to do the switch, not sure how far he is from pushing some patches out].

2010 Macbook Pro

Dave - Could you please shed some light on whether or not getting the Intel/Nvidia GPU switch to work on a 2010 MacBook Pro is doable and what the current status is? The 2010 Macbook Pro has Core i5/7 in-built Intel GPU and a GT330M.

Other than the fact that it doesn't work on Windows - only one GPU - the 330M is active all the time, there is not much known. I tried to search in the relevant places but did not find anything definitive.


Re: 2010 Macbook Pro

the MB don't use ACPI to switch so we have the info I think REd just not clean code to make it work.

I understand that this is for switching between the two cards in an Optimus setup. Is this also needed to perma-switch to the NVidia card in Optimus? I mean, if someone buys an Optimus equipped laptop now, as far as I know the only thing we can get working under Linux is to just use the Intel card. How far off are we from switching the Intel card into slave mode and having nvidia card output to the screen (that is connected to the Intel card)? Either with nouveau or with nvglx?

some optimus laptops still have switches in them, some don't.

So on some it should be possible to abuse my code to switch and then make nvidia load, however I haven't looked at that yet.

nVidia optimus

Please keep up the investigation. I've lots of tinkering with the ACPI methods for my nVidia optimus-enabled laptop (Alienware M11X-R2), best I've been able to do is reliably shut off power to the GPU.

In Windows, the Nvidia driver allows you to manage a 'profile' for each program that you run. Selecting specifically what GPU you want to employ to render that program, as well as other settings such as OpenGL/D3D settings to use for that specific program. It's very well done.

In fact, you can even right-click on a .exe and choose which GPU to render the program when you launch it.

It appears to work even for applications that share the screen at the same time which blows me away.

I'd settle just being able to setup a script would reboot and choose nvidia based on the existence of something like /boot/.usefastgpu :)


intel_acpi.c jbarnes


I've read your blog post about intel/nvidia switchable info you recently investigated.

Can I ask you if the intel_acpi.c by jbarnes is public?

"intel_acpi.c jbarnes has worked out some of the values for outputs in the ACPI tables esp around what is and isn't MUXed."

Also to let you know that the MXDS method seems to be present in all modern intel/nvidia DSDT tables, even sony vaio z-series10
that technically are not "nvidia optimus", but use a sony-based system for switching:

grep MXDS *.dsl | awk -F\: '{print $1}' | sort | uniq


Re: intel_acpi.c jbarnes

intel_acpi.c is in the upstream kernel

just thanks for your work!

own a t410 thinkpad, hope we'll get it running some day