I am trying to get my Macbook Pro 13,3 (touchbar late 2016) to work with my Nvidia eGPU under Ubuntu 19.10.
I installed the Nvidia drivers, and used https://github.com/hertg/egpu-switcher to create the xorg.conf
file.
When I reboot, (using rEFInd) I get to the ubuntu login screen, but when I try to login, the login fails and is stuck in a loop because the Nvidia drivers do not load. e.g. if I login with Wayland, I manage to get in and I can see that nvidia-smi
doesn't work, prompting "Cannot connect to the Nvidia driver..."
After some troubleshooting I found out that by disconnecting the bus where the thunderbolt 3 eGPU is connected and then rescanning, the driver loads and the GPU works.
So as a workaround what I do is:
At the login screen I get to the terminal login pressing Ctrl-Alt-Fn-F2
and then:
sudo -s # to escalate to root
as root I run:
echo 1 > /sys/bus/pci/devices/0000:00:01.1/remove
echo 1 > /sys/bus/pci/devices/0000:00:01.2/remove # this disable the tb3 peripherical where the egpu is connected (upper right port of the macbook)
echo 1 > /sys/bus/pci/rescan
exit
startx
And this finally starts Gnome using the eGPU to render on the external monitor as desired.
So my question would be: is there a way to automate this process, such that when I login normally this trick is automatically performed during the login process?
0 Answers