NVIDIA Improving wlroots For Better Dual-GPU Gaming Performance

Written by Michael Larabel in Wayland on 16 March 2023 at 06:51 AM EDT. 12 Comments
A NVIDIA engineer has opened up a merge request to improve the wlroots Wayland library so compositors based on it can enjoy better gaming performance for dual-GPU systems, namely around laptops sporting a discrete NVIDIA GPU but can help other GPU hardware/drivers too.

NVIDIA engineer Austin Shafer opened up a wlroots merge request to support scanning out of full-screen surfaces from secondary GPUs. The intended use-case is for NVIDIA Optimus laptops where the primary GPU may be integrated CPU graphics but with a secondary discrete NVIDIA GPU. Though the wlroots code changes are not NVIDIA specific and should benefit AMD and Intel combinations too for their discrete graphics.

By allowing the direct scan-out of full-screen surfaces from secondary GPUs, this should benefit full-screen games launched on laptops with the discrete GPU to deliver better performance / lower overhead. With this initial implementation it will just benefit secondary GPUs that are attached directly to a display, such as an external monitor connected to a multi-GPU laptop. Austin Shafer explained in the merge request and some of the future work:
"In the case of dual-GPU laptops there are a couple scenarios this impacts. On most laptops the dGPU does not drive the integrated display, but drives external displays through the HDMI port on the sides/back of the laptop. Plugging in an external display and fullscreening an application on it is what this MR helps. In future plans we are also looking at "internal display muxing" for laptops with appropriate hardware (the product name is confusingly "Nvidia Advanced Optimus"), in that case fullscreening a dGPU application on the integrated display could flip the display mux to the dGPU and perform direct scanout. This MR is a prerequisite to advanced features such as display muxing."

Those making use of a wlroots-based Wayland compositor like the i3-inspired Sway can learn more about the pending NVIDIA contribution via this merge request.

Among other contributions by NVIDIA's Austin Shafer has also been adding linux_dmabuf v4 feedback to XWayland.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week