Hi!
I don't know if Charlotte has added the ID of the dGPU to src/drivers/lenovo/hybrid_graphics.c. Does the dGPU consume power after hybrid_graphics.c disable the dGPU?
OPTIMUS_ENABLE is a PCH GPIO and controls the muxes that select if the internal display is connected to the iGPU or the dGPU; that's done in hybrid_graphics.c. GFXCORE_ON_D (and another signal that controls the power supply of the VRAM) are driven by the Thinker-1 chip; those switch on/off the power supply of the GPU. So to really disable the GPU you probably have to ask the EC to make that chip turn off the voltage for the GPU and VRAM.
Regards Felix
Hello
Super interesting, I didn't know all that!
Currently, I have only set in devicetree:
device pci 00.0 on end # host bridge device pci 01.0 off end # NVidia device pci 02.0 on end # Intel
and in my nvram options I have: hybrid_graphics_mode = Integrated Only
I assumed that would be sufficient to turn off the power for the dGPU until I figure out a way to make it work. I will enable the NVidia and do more power tests.
After reading hybrid_graphics.c, I understand a bit more, but I also have more questions: - can I add register "pcie_hotplug_map" = "{ 0, 1, 0}" to make the NVidia removable? (so that the operating system will not freak out when the NVidia disappears from the PCI bus if I find a way to control the power by talking to the EC and send GFXCORE_ON_D + the other signal for the VRAM)
- can you change the connection of the displayport? Based on the specsheets, it is connected to the dGPU, while the internal display is connected to the iGPU. If is it possible to control the muxes for the internal display, I suppose it is possible for the other displays as well. (I have just tested and I do not have any video on the displayport, and xrandr does not detect anything)
- there seem to be some missing IDs in pci_device_ids_nvidia : cf http://envytools.readthedocs.io/en/latest/hw/pciid.html which agrees with the W530 : 0x0ffb, so I will propose a patch: 0x0dfa, /* Nvidia NVS Quadro 1000m Lenovo W520 */ 0x0ffb, /* Nvidia NVS Quadro K1000m Lenovo W530 */ 0x0ffc, /* Nvidia NVS Quadro K2000m Lenovo W530 */
It may also be the reason why the Nvidia is still getting power, as Iru noted that hybrid_graphics should turn off the power. I will test that separately.
- until I can find a better solution, I am thinking of letting the Nvidia show on on the PCIe bus and then sending commands to get in into advanced sleep - like on https://wireless.wiki.kernel.org/en/users/documentation/aspm
It should be possible as the w530 lspci -v shows: Capabilities: [60] Power Management version 3 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Would you have a better idea?
Thanks Charlotte
On Fri, Nov 18, 2016 at 4:52 AM, Felix Held felix-coreboot@felixheld.de wrote:
Hi!
I don't know if Charlotte has added the ID of the dGPU to
src/drivers/lenovo/hybrid_graphics.c. Does the dGPU consume power after hybrid_graphics.c disable the dGPU?
OPTIMUS_ENABLE is a PCH GPIO and controls the muxes that select if the internal display is connected to the iGPU or the dGPU; that's done in hybrid_graphics.c. GFXCORE_ON_D (and another signal that controls the power supply of the VRAM) are driven by the Thinker-1 chip; those switch on/off the power supply of the GPU. So to really disable the GPU you probably have to ask the EC to make that chip turn off the voltage for the GPU and VRAM.
Regards Felix
-- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot