Show Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained on a daily basis for the past 18+ years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium.
NVIDIA Improving wlroots For Better Dual-GPU Gaming Performance
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.