Notebookcheck Logo

Linux gaming laptops may finally get Nvidia Advanced Optimus support in near future

Gaming laptops such as the Alienware x15 R2 may one day be able to take advantage of dynamic MUX switching while running Linux
Gaming laptops such as the Alienware x15 R2 may one day be able to take advantage of dynamic MUX switching while running Linux
Linux laptops have so far lost out to their Windows counterparts with regard to features such as Nvidia's Advanced Optimus. Now, Nvidia is proposing a new user-space API for the Linux kernel that allows for dynamic multiplexer (MUX) switching beyond the capabilities of the current vga-switcheroo implementation that has several limitations.

Nvidia is apparently considering a new user-space API (uAPI) for dynamic multiplexer (MUX) switching in Linux laptops. Currently, MUX switching is handled by the vga-swicheroo infrastructure in the Linux kernel. However, Nvidia feels that vga-switcheroo isn't cut out for dynamic MUX switching also known as Advanced Optimus.

For those not aware, modern Windows laptops employ automatic switching between the low-power integrated graphics in the CPU and the more power-hungry discrete GPU (if available) in order to minimize energy consumption during non-intensive tasks. This is called MSHybrid or, in Nvidia speak, Optimus. While Optimus does bring battery life advantages, all the frames generated by the dGPU will have to pass through the iGPU that can become a potential bottleneck depending on the workload.

A MUX switch allows the user to physically change the routing and bypass the iGPU altogether. This should provide a perceivable improvement in frames apart from allowing other features such as Nvidia ShadowPlay capture for the Windows desktop or variable refresh rate technology such as G-Sync. Laptops such as the Asus ROG Strix Scar 15 allow the user to change the MUX from within Windows, but this requires a system restart each time. 

On the other hand, laptops such as the Alienware x15 R2 offer what is called Advanced Optimus or dynamic MUX switching that can change the MUX routing on the fly. Nvidia claims that Advanced Optimus can offer improved frame rates, reduced latency, and support for G-Sync displays automatically without the user having to worry about manually changing MUX options in the BIOS or reboot each time there's a setting change.

Now, Nvidia wants to bring this capability to the Linux kernel. Nvidia software engineer Daniel Dadap posted a proposal for an "RFC-DRM-based uAPI for Dynamic Mux Switching" on freedesktop.org. According to the Nvidia engineer, vga-switcheroo is unsuitable for MUX switching when the display is active. This is because the current implementation assumes that MUX switching is possible only when neither GPU is driving the display. 

One approach would be to extend vga-switcheroo's functionality, but that would also require adding userspace capabilities as well. Vga-switcheroo also assumes that there can be only one MUX in a system between the iGPU and the dGPU. While this is true to a large extent, Nvidia notes that this assumption can impede some existing and future designs that can use multiple MUXs (one for the internal panel and one for the external, for example). Nvidia has been internally testing and has even developed an early X11/GLX prototype for dynamic MUX, according to Dadap.

The proposal calls for a new uAPI while also coupling the MUX more tightly with the Linux Direct Rendering Manager (DRM)-Kernel Mode Setting (KMS). Essentially, the dynamic MUX control function will have to be assigned to a mode-setting client such as an X server or the Wayland compositor that already has context of what is being drawn on screen.

More technical information and potential roadblocks about Nvidia's proposal to offer Advanced Optimus on Linux can be found at the Source link below. Currently, Nvidia is soliciting comments from the community. If this proposal indeed materializes, the hybrid graphics experience on Linux may finally be on par with what is already available in Windows laptops today.

Buy the Alienware x15 R2 with Core i9-12900H and RTX 3080 Ti on Amazon

Nvidia Advanced Optimus alleviates the need to manually change MUX routing in compatible laptops. (Image Source: Nvidia)
Nvidia Advanced Optimus alleviates the need to manually change MUX routing in compatible laptops. (Image Source: Nvidia)
Read all 1 comments / answer
static version load dynamic
Loading Comments
Comment on this article
Please share our article, every link counts!
.170
> Notebook / Laptop Reviews and News > News > News Archive > Newsarchive 2022 11 > Linux gaming laptops may finally get Nvidia Advanced Optimus support in near future
Vaidyanathan Subramaniam, 2022-11-11 (Update: 2022-11-11)