VGA_Switcheroo Is Getting Modernized With Device Link Support

Written by Michael Larabel in Linux Kernel on 18 February 2018 at 10:44 AM EST. 14 Comments
VGA_Switcheroo is the Linux kernel component for dealing with MUX'ed and MUX-less hybrid graphics laptops/systems for switching between GPUs. A new patch series is working to modernize and improve VGA Switcheroo.

Open-source contributor Lukas Wunner sent out a set of patches this Sunday to "modernize" VGA_Switcheroo by using a Device Link for its HDA controller support. Device links were added to Linux 4.10 as a way of representing dependencies between devices in the driver core, besides just parent/child relationships in the device hierarchy. Device links can be used for representing "siblings" and simply drivers that first depend upon the presence of another driver. Using device links ensures correct suspend/resume and shutdown ordering and the driver presence on the supplier.

Lukas is using device links with VGA_Switcheroo for enforcing a runtime power management dependent on an HDA controller to the GPU it's integrated into and by making use of this newer kernel API allows dropping some obsolete code that in the process also fixes "a bunch of bugs."

This might also yield a small power savings if a discrete GPU is being used but not its HDA controller, since now that audio controller can be run-time suspended to a D3hot stage.

This patch work also takes VGA_Switcheroo closer to being able to support run-time power management on MUX'ed laptops like the MacBook Pro.

More details on this patch series here. We'll see if this code is baked enough to get into Linux 4.17.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week