Score:1

How can I make Ubuntu detect secondary graphics cards?

cn flag

Ubuntu LTS 20.04

I'm running 3 graphics cards for 6 displays. Each GPU has 2 displays connected to it. Primary is an Nvidia GTX 1070, secondaries are cheap old AMD cards. For a long time, everything was automatically detected and this worked perfectly.

But a software update that required a reboot yesterday seems to have ruined everything.

Now, during boot, all 6 displays show the ubuntu splash screen but as soon as it prompts for password, only the displays attached to the Nvidia card are showing anything -- the other 4 displays go blank and stay blank regardless of anything I do.

Since I run ZFS on root, I tried restoring to an earlier snapshot before that update ... and things got even worse. Tried multiple different backups from different times, and all gave the same result: ubuntu hangs during boot and all 6 displays go blank, with the secondaries flashing on and off. (Frustratingly, this problem seems to have made all my past ZFS snapshots unbootable and therefore useless.)

Also tried several cold reboots, and nothing has improved.

I've tried xrandr --listproviders and it shows only the Nvidia card. No other cards. But I know the other two cards are connected and working -- and at least somewhat recognized by ubuntu -- because all 6 monitors display the ubuntu splash screen on startup.

I need to find out how to get ubuntu to re-detect what graphics cards are connected to the system, hopefully detecting the secondary cards this time.

Or maybe there's some kind of a driver issue and I could resolve it by installing new drivers for the secondary cards? (But they always worked before now.)

Or maybe some way to restore the previous video configuration from backup? Or use backed-up copies of the configuration to manually rebuild the current configuration? Even without ZFS, I still have full backups of the entire system available.

Matias N Goldberg avatar
vg flag
Unfortunately this keeps happening over and over again. NVIDIA drivers don't play nice with other GPUs. You may have better luck selecting nouveau in Ubuntu and then installing NVIDIA drivers from their website. Note you may end up with X11 unbootable a few times thus I suggest to setup SSH server. Also beware custom-installed NV drivers may break with each system update so make sure to keep them ready to reinstall when it breaks. See `Chapter 35. PRIME Render Offload` from NV manual.
O Ocalhoun avatar
cn flag
I reinstalled all nvidia drivers using `sudo apt-get --reinstall install <package>` for each package with nvidia in the name. I was hopeful when I saw a bunch of instances where it said 'no version available for this kernel version, rebuilding for [current version` ... but after rebooting, there is no improvement in my situation. Do I need to fully purge nvidia packages and then reinstall them?
Matias N Goldberg avatar
vg flag
No, that's not what I said. I said to get rid of the NV packages installed by apt-get, and install them with bash script downloaded from https://www.nvidia.com/Download/index.aspx Those drivers *tend* to work better with other vendor's GPUs (I don't know why, my guess Ubuntu maintainers make a few tweaks either to the SO overridden, or a config file).
O Ocalhoun avatar
cn flag
Whew... This killed -- KILLED -- my entire installation. Posting this from a fresh install. Trying to install nvidia's drivers via that script required me to blacklist conflicting kernel modules ... which made my whole system unbootable. And because it updated the EFI files to a new version incompatable with my backups, all my previous backups were unbootable as well. ... Square 1, fresh install time. *But* in this fresh install, things are shaping up much better ... so there's that.
Score:0
cn flag

Okay, things are looking pretty good now. For anybody with similar problems, here's what I did:

1: Fresh install of Ubuntu. Clean slate. (So far, only secondary displays are working, and the default gnome session doesn't work. I have to select Wayland in order to log in. Primary screens -- connected to nvidia card -- not working at all yet.)

2: Installed nvidia drivers through repository with sudo apt-get install nvidia-driver-470

3: Installed KDE with sudo apt-get install KDE-full (Probably optional, but it makes the gnome issues with selecting Wayland irrelevant)

4: Reboot (After reboot, all 6 screens are miraculously working! And with decent drivers on the nvidia card so I get acceptable performance and access to cuda utilities. It's a miracle!) (Rebooted again to ensure that it stayed that way after reboot.)

5: Used sudo apt-mark hold <current kernel version> to prevent any further kernel updates that might interfere with the video drivers again. (Yes, I know that's generally frowned upon. But I'd rather deal with a few potential security issues than deal with these video driver problems making my whole OS unusable again.)

6: (And currently still in progress) transferring everything I can from the old installation to restore all my system settings and files, while being careful not to transfer anything related to nvidia.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.