[Feature Request] Switch to make secondary GPU the primary

Currently there is no way to change the primary GPU in GNOME/Wayland. I tried multiple solutions, only to come around some environment variables.

Why there should be a way to change the primary GPU? Because multi-monitor performance. Attaching an external monitor to the HDMI/DP output in many laptops results in choppy/laggy/unresponsive monitor output.

Because the dGPU must read the framebuffer in RAM from the CPU and push it to the HDMI/DP output, the only way to avoid this is to set the dGPU as primary (NVIDIA or AMD).

While I did successfully on a Laptop with an NVIDIA card, there should be a switch somewhere to, at least, manually set these environment variables and reboot. At least, a ujust toggle-primary-gpu showing the current primary GPU, a list of of available GPUs to switch, and a reboot prompt.

> ujust toggle-primary-gpu

Current primary GPU: NVIDIA GeForce GTX 750/PCIe/SSE

Which GPU you want to switch it for?
    > Hybrid Graphics (PRIME driver, default)
      Intel Graphics 4000 HD
      AMD Radeon RX 7600XT/USB4/SSE
    
Switching to Hybrid Graphics...

Reboot to apply changes?
    > Yes
      Later...

Theoretically, if GNOME/Wayland supports it, it should be a way to change default/primary GPU used for display and applications, but I don’t know if it’s possible if the PRIME renderer allows to hot-swap graphic chips. If it does, it would be far better to hear AC/Battery events and have the option to switch to a dGPU if on AC and a external monitor if the user enables this behavior.

1 Like

You can use an extension.

https://extensions.gnome.org/extension/5009/gpu-profile-selector/

Already tried and doesn’t work. The only way I could was to add the environment variables.

Italo Baeza C.

+1, this worked perfectly on my laptop (Vega 10 iGPU, NVIDIA GeForce GTX 1650 Mobile dGPU) on bluefin. I might have a go at making it into a just script but I’m not sure if my dodgy scripting abilities would get merged :sweat_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.