linux:egpu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:egpu [2026/04/25 12:25] – [Regarding hot-plug] mhlinux:egpu [2026/04/25 12:30] (current) – [Setup Procedure (Linux Mint 22 + Razer Core X + GTX 1060)] mh
Line 44: Line 44:
 </WRAP> </WRAP>
  
 +
 +
 +==== Setup Procedure (Linux Mint 22 + Razer Core X + GTX 1060) ====
 +
 +=== 1. Install Thunderbolt tools ===
 +
 +<code bash>
 +sudo apt install bolt thunderbolt-tools
 +</code>
 +
 +Ensure the bolt service is running:
 +
 +<code bash>
 +systemctl status bolt
 +</code>
 +
 +
 +=== 2. Verify Thunderbolt controller ===
 +
 +<code bash>
 +lspci | grep -i thunderbolt
 +lsmod | grep thunderbolt
 +</code>
 +
 +Expected:
 +  * Intel Thunderbolt controller listed
 +  * thunderbolt kernel module loaded
 +
 +
 +=== 3. BIOS configuration ===
 +
 +In BIOS:
 +  * Thunderbolt: Enabled
 +  * 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>
 +boltctl list
 +</code>
 +
 +If needed:
 +
 +<code bash>
 +sudo boltctl authorize <UUID>
 +</code>
 +
 +Verify PCIe device:
 +
 +<code bash>
 +lspci | grep -i nvidia
 +</code>
 +
 +
 +
 +=== 5. Install NVIDIA driver ===
 +
 +Install the recommended driver (for GTX 1060):
 +
 +<code bash>
 +sudo apt install nvidia-driver-535
 +</code>
 +
 +⚠️ Do NOT use NVIDIA .run installer (breaks package management and updates)
 +
 +
 +=== 6. Disable nouveau driver ===
 +
 +<code bash>
 +echo "blacklist nouveau" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
 +echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
 +sudo update-initramfs -u
 +</code>
 +
 +Reboot (without eGPU connected).
 +
 +
 +=== 7. Create PRIME offload helper ===
 +
 +Linux Mint 22 does not provide prime-run by default.
 +
 +Create it manually:
 +
 +<code bash>
 +sudo nano /usr/local/bin/prime-run
 +</code>
 +
 +Content:
 +<code>
 +#!/ 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 "$@"
 +</code>
 +
 +
 +Make executable:
 +
 +<code bash>
 +sudo chmod +x /usr/local/bin/prime-run
 +</code>
 +
 +
 +=== 8. Test GPU usage ===
 +
 +Connect the eGPU after boot, then run:
 +
 +<code bash>
 +nvidia-smi
 +</code>
 +
 +You should see the GTX 1060 listed.
 +
 +Test offloading:
 +
 +<code bash>
 +prime-run glxinfo | grep "OpenGL renderer"
 +</code>
 +
 +
 +=== 9. Usage ===
 +
 +Run applications on the eGPU:
 +
 +<code bash>
 +prime-run <application>
 +</code>
 +
 +Example:
 +
 +<code bash>
 +prime-run blender
 +prime-run steam
 +</code>
 +
 +
 +=== 10. Important notes ===
 +
 +  * 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
  • linux/egpu.1777112730.txt.gz
  • Last modified: 2026/04/25 12:25
  • by mh