Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| linux:rbs [2026/04/14 23:30] – [Regarding hot-plug] mh | linux:rbs [2026/04/14 23:32] (current) – [OLD] mh | ||
|---|---|---|---|
| Line 288: | Line 288: | ||
| - | ==== OLD ==== | + | ==== Setup Procedure (Linux Mint 22 + Razer Core X + GTX 1060) ==== |
| - | Below are the older instructions, | + | |
| - | === Introduction | + | |
| - | When it came to selecting an eGPU to use under Linux the Razer Core X seemed to be a great value for the money in fall 2021. | + | === 1. Install Thunderbolt tools === |
| - | I chose the Core X over the Core X Chroma because the price difference was huge (220€ vs 365€) with the only benefit of an added 4 USB 3.0 ports, a 1Gbps Ethernet port and of course some LED lighting. Although having those ports directly on the thunderbolt | + | <code bash> |
| + | sudo apt install bolt thunderbolt-tools | ||
| + | </ | ||
| + | |||
| + | Ensure | ||
| + | |||
| + | <code bash> | ||
| + | systemctl status bolt | ||
| + | </ | ||
| - | Although the Thunderbolt implementation reserves a 10Gb/s bandwith specifically for other devices than PCIe (i.e. network, USB, etc.) and the problem above might one day be solved by new patches in the Linux Kernel, there are plenty of USB 3.0 adapters/ | ||
| - | === Installing and Initializing | + | === 2. Verify Thunderbolt controller |
| <code bash> | <code bash> | ||
| - | $sudo apt install bolt thunderbolt-tools | + | lspci | grep -i thunderbolt |
| + | lsmod | grep thunderbolt | ||
| </ | </ | ||
| + | |||
| + | Expected: | ||
| + | * Intel Thunderbolt controller listed | ||
| + | * thunderbolt kernel module loaded | ||
| + | |||
| + | |||
| + | === 3. BIOS configuration === | ||
| + | |||
| + | In BIOS: | ||
| + | * Thunderbolt: | ||
| + | * Security Level: No Security (SL0) | ||
| + | |||
| + | ⚠️ Required, otherwise devices may not enumerate under Linux. | ||
| + | |||
| + | |||
| + | === 4. Connect and authorize the eGPU === | ||
| + | |||
| + | Boot the laptop **without** the eGPU connected. | ||
| + | |||
| + | Then: | ||
| + | |||
| + | * Power ON the Core X | ||
| + | * Plug the Thunderbolt cable | ||
| + | |||
| + | Check detection: | ||
| + | |||
| <code bash> | <code bash> | ||
| - | $boltctl | + | boltctl |
| </ | </ | ||
| - | //This is the same as ' | + | |
| + | If needed: | ||
| <code bash> | <code bash> | ||
| - | $boltctl authorize | + | sudo boltctl authorize |
| </ | </ | ||
| - | //Replace the last argument by the UUID of your device. Do this step only if the status is ' | + | |
| + | Verify PCIe device: | ||
| <code bash> | <code bash> | ||
| - | $lspci | + | lspci | grep -i nvidia |
| </ | </ | ||
| - | //The eGPU should appear in a line starting with 'VGA compatible controller [...]// | ||
| - | Install appropriate drivers for the eGPU you are tunneling through Thunderbolt. | ||
| - | === Configuring X11 === | + | === 5. Install NVIDIA driver |
| - | You need to write an '' | + | Install |
| <code bash> | <code bash> | ||
| - | Section " | + | sudo apt install nvidia-driver-535 |
| - | Load " | + | </ |
| - | EndSection | + | |
| - | Section " | + | ⚠️ Do NOT use NVIDIA .run installer (breaks package management and updates) |
| - | | + | |
| - | | + | |
| - | | + | === 6. Disable nouveau driver === |
| - | Option | + | |
| - | Option | + | <code bash> |
| - | EndSection | + | echo "blacklist nouveau" |
| + | echo "options nouveau modeset=0" | ||
| + | sudo update-initramfs -u | ||
| </ | </ | ||
| - | One of the drawbacks of eGPU usage in Linux is the lack of hotplug functionnality. The above '' | + | Reboot (without |
| - | === GSwitch Project === | ||
| - | Which brings us to this simple tool developped to simplify the loading/ | + | === 7. Create PRIME offload helper === |
| - | Simply follow the instructions to install and setup (very easy and straightforward) and it will swap from external to internal gpu using the following commands | + | Linux Mint 22 does not provide prime-run by default. |
| + | |||
| + | Create | ||
| <code bash> | <code bash> | ||
| - | $sudo gswitch egpu | + | sudo nano / |
| - | $sudo gswitch internal | + | |
| </ | </ | ||
| - | Note that the thunderbolt device has to be in '' | + | Content: |
| + | < | ||
| + | #!/bin/sh | ||
| + | __NV_PRIME_RENDER_OFFLOAD=1 \ | ||
| + | __GLX_VENDOR_LIBRARY_NAME=nvidia \ | ||
| + | __VK_LAYER_NV_optimus=NVIDIA_only \ | ||
| + | __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 \ | ||
| + | exec " | ||
| + | </ | ||
| - | === Useful Ressources === | + | Make executable: |
| - | [[https://egpu.io/forums/thunderbolt-linux-setup/ | + | <code bash> |
| + | sudo chmod +x /usr/local/bin/prime-run | ||
| + | </code> | ||
| - | [[https:// | ||
| - | [[https:// | + | === 8. Test GPU usage === |
| - | [[https:// | + | Connect the eGPU after boot, then run: |
| - | [[https://www.blog.nodrama.io/razer-core-egpu-linux/|Antoher (more complete) Blog Post of Core X integration]] | + | <code bash> |
| + | nvidia-smi | ||
| + | </ | ||
| + | |||
| + | You should see the GTX 1060 listed. | ||
| + | |||
| + | Test offloading: | ||
| + | |||
| + | <code bash> | ||
| + | prime-run glxinfo | grep " | ||
| + | </code> | ||
| + | |||
| + | |||
| + | === 9. Usage === | ||
| + | |||
| + | Run applications on the eGPU: | ||
| + | |||
| + | <code bash> | ||
| + | prime-run < | ||
| + | </code> | ||
| + | |||
| + | Example: | ||
| + | |||
| + | <code bash> | ||
| + | prime-run blender | ||
| + | prime-run steam | ||
| + | </code> | ||
| - | [[https:// | ||
| - | [[https:// | + | === 10. Important notes === |
| - | [[http:// | + | * Laptop must boot **without** eGPU connected (known limitation on this hardware) |
| + | * eGPU must be hot-plugged after login | ||
| + | * Internal display introduces a ~20–30% performance penalty (PCIe copy-back) | ||
| + | * External monitor connected to the GPU removes this penalty completely | ||
| + | * Cycles rendering (Blender) is not affected by this limitation | ||