I’m trying to get a dual GPU setup working on Linux as I’m sick of Windows, always have been, but Linux as a daily driver has been tough. Wanted to give it a shot again…
Installing the built in drivers doesn’t seem to work too well, I haven’t personally had the greatest luck with them on Linux, (I’m actually developing a GPU management software for Linux right now as well) thus I usually use ones downloaded from Nvidia.
Installation was fine of course, other than nouveau not getting blacklisted and for some reason stalling after entering the boot drive’s encryption password, not that if it loaded it should’ve been used for anything but console anyhow but as far as I know it’s best blacklisted and generally only causes issues if it loads anywhere.
So, blacklisted and tossed nouveau.modeset line into kernel. Rebooted, X comes up looking decent. I set up all my screens’ (I have 7 total displays currently hooked up; three monitors in typical triple-monitor fashion as my main displays on my desk connected to my secondary card, a RTX 2070 SUPER, two more above those on stands tilted down towards me, a third rotated vertically to the right of the main three - those three connected to my primary card, RTX 3060 - the 7th display is my A/V receiver on a USB-C->HDMI adapter feeding my projector which is disconnected for current experimentation) orientation and during which I notice a few things.
First is that the graphics are LAGGY. Like, 15fps on the ‘secondary’ card (and while I thought this was physically whether the card was primary/secondary causing this, but was actually whether said card was specified as primary or secondary in the xorg.conf) and about 25fps on the primary card when dragging windows around - essentially unbearable.
I also noticed under the X screen configuration in nvidia-settings that I had two sets of screens for the secondary card. The first, enabled set was through PRIME, the second was not. I was able to configure my displays exactly as needed in this mode - the issue was performance.
After some tinkering with the configuration, I managed to setup two X screens, one for each GPU with it’s corresponding monitors under each. After rebooting, the displays I had configured as primary (my “main” three, connected to the physically secondary GPU) were working fine and the graphics were ULTRA-SMOOTH (my displays are only 60hz but still put Windows to shame) … The other three, were active, but had a black background and when the mouse moved over them was the default ‘X’ cursor - X was treating the secondary screen as a second seat with nothing connected! I couldn’t even force apps over to it by exporting it’s DISPLAY number but I could move the mouse to those screens with no issue. One benefit of this setup was that coolbits was finally working for the secondary card and allowing me to manage it’s clocks as it now had a screen attached to it.
I thought OPTIMUS/PRIME was specifically for hybrid GPU setups…? Let me clearly state that I do NOT have an internal GPU of any kind (9700 non-K). My assumption was that it was still using PRIME to somehow aid in display routing so the desktop could be managed all from one GPU while being displayed on both. I would have zero issue with this if the performance hit wasn’t so severe, literally unusable; also not being able to adjust the clocks on the secondary card is a bit of a dealbreaker - one would hope that if this solution is the preferred method that one could still attach a virtual/AllowEmptyInitialConfiguration-style display to the GPU in order to enable coolbits.
What about Xinerama/nvidiaXinerama? is there a way I can configure my xorg.conf to do this properly? I tried a few variations of configs regarding that without any luck but I was thinking perhaps this is the best way forward…?
I wonder also if this is particularly an Ubuntu-related issue? or at least a more modern-Linux-related issue? I know typically in the past that multiple displays would be exposed to X as separate screens and Xinerama could be used otherwise; even a lot of not THAT old threads show configuring xorg.conf this way but it seems that things have changed now…?
Are we also still only limited to 4-screens per (non-Quadro) GPU on Linux as well? If not (or if there’s a patch like nvenc cap) I could maybe try and use DP-daisychain/splitters to get all my screens going off one card but…I get the feeling that (disgustingly stupid in 2022 - especially when most users would opt for fewer larger displays, unlike me who just can’t afford to upgrade and has a ton of 10+ year old 1080p panels so may as well take the realestate and have a cool looking battlestation) limit is alive and well on Linux as well.
Sort of a TL;DR: What’s the best way to configure multiple GPUs (3+ monitors per GPU) on Linux with being able to arrange/manage screen layout/position properly for all and no (major) performance or UX (dragging windows etc) issues?
The ‘default’ way seemed to push the secondary GPUs screens to the primary GPU with PRIME which caused horrible lagging and was unusable though allowed proper screen orientation configuration but no coolbits for 2nd GPU.
Configuring the secondary GPU as a secondary X screen seemed to be a solution (and enabled coolbits for the 2nd GPU) but left the screens as blank unusable X desktops (that could be moused to).