Ubuntu – Ubuntu 18.04 EGPU not work

18.04nvidianvidia-primethunderbolt

I have a HP Spectre (intel i7 6500 U). I have been using 16.04, and installed 18.04 recently. I don't travel much, so I use EGPU to gain more GPU power all the time. I have a razer core at home and an Omen Accelerator in my office; and I have a GTX 970 and a GTX 1080ti. With 16.04, everything is working smoothly: I connect the GPU dock to the laptop via the thunderbolt 3 connector and use the prime-select tool to select NVIDIA. Even CUDA is working fine.

However, with 18.04, things have been difficult. Firstly, when I used nouveau, the desktop simply froze after I logged in.
Secondly, I installed the NVIDIAļ¼390 driver directly through the Bionic repo. The installation seemed fine, and did not report any error. However, when I connected the GPU dock to the laptop, the error PKCS#7 appeared continuously.

See Picture 1

I could logged in via xorg, but the nouveau was loaded insteaf of NVIDIA. Moreovoer, nvidia-smi showed that the driver was not loaded. Finally, I installed NVIDIA-390 via the run file. This time nvidia-smi showed that the driver was loaded correctly, but I had the login loop for the xorg. S
trangely, most people don't see the wayland option when they have installed NVIDIA driver, but I can see both the wayland and xorg options in all circumstances. I have

So in summary, Nouveau makes my laptop with EGPU freeze; installation of nvidia-390 from the bionic repo does not load the driver properly; the installation of nvidia-390 through the run file seems alright but gives me the login loop.

Other than my laptop, I have a desktop with an NVIDIA 970, which works very smoothly under 18.04, including EGPU and cuda.

Any suggestion is deeply appreciated.

Best Answer

Problem solved. I hope it will be useful for people having an Intel+Nvidia Egpu system like mine. Firstly, installation of nvidia 390 from the bionic repo doesn't work for me. Possibly the DKMS is not written correctly. When I use run file, things work, and I can use nvidia-smi to see my nvidia card information. Secondly, Nvidia seems unable to create the correct xorg.conf file in this situation, which results in the login loop. I copied the xorg file from my 16.04 partition and pasted it into /etc/X11/, then everything works. Perhaps the system loads the wrong xorg file Nvidia created, so that the system simply refuses to log in.

It is a bit painful, as the xorg file has to be manually adapted if you connect the computer to a different EGPU dock or if the laptop is running without the EGPU dock. I simply use the wayland session when the EGPU dock is not used.

Related Question