ewagner12 / all-ways-egpu

Configure eGPU as primary under Linux Wayland desktops
MIT License
161 stars 11 forks source link

What does setting two GPUs as "primary" do? #7

Open canadaduane opened 1 year ago

canadaduane commented 1 year ago

I noticed while going through the setup that it's possible to set two (or more) GPUs as primary. What effect does this have? Is it a mistake to do this?

ewagner12 commented 1 year ago

@canadaduane Thanks for using the script, this is an intended feature and shouldn't cause any issues. When the script is called to switch to the egpu, it goes through the file created by the setup /usr/share/all-ways-egpu/egpu-bus-ids line by line to check if the Bus ID in that line is a GPU and if it is connected. If both those are true then it will set that GPU as primary. The exact switching method depends on which method you're using, but typically if you have 2 or more GPUs connected and selected as primary then the first one selected will actually be used as primary.

The reason why this is an intended feature is that I've seen systems where the eGPU bus ID can change depending on the order it's plugged in or the thunderbolt port it's plugged into. So in that case you might want to add all the possible bus IDs for the eGPU to the file. If the bus ID doesn't exist or isn't a GPU then it should be safely ignored. I wouldn't recommend adding the internal GPU to the list of GPUs to set as primary as that would interfere with switching to the eGPU