linux:rbs

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
linux:rbs [2026/04/14 23:30] – [Regarding hot-plug] mhlinux: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, to be dumped once this new update is complete +
-=== 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+=== 1Install 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 bus would be great and works well in Windows and MacOS, people have reported issues in Linux (as of 2020) due to a few bugs in the integration of the USB controller used in the Core X Chroma.+<code bash> 
 +sudo apt install bolt thunderbolt-tools 
 +</code> 
 + 
 +Ensure the bolt service is running: 
 + 
 +<code bash> 
 +systemctl status bolt 
 +</code>
  
-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/hubs that also include Gigabit Ethernet for a lot less than 150€, and the Razer Blade Stealth has 2 USB 3.0 ports available. 
  
-=== Installing and Initializing ===+=== 2. Verify Thunderbolt controller ===
  
 <code bash> <code bash>
-$sudo apt install bolt thunderbolt-tools+lspci | grep -i thunderbolt 
 +lsmod | grep thunderbolt
 </code> </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> <code bash>
-$boltctl +boltctl list
 </code> </code>
-//This is the same as 'boltctl list' and should list the Razer Core X//+ 
 +If needed: 
 <code bash> <code bash>
-$boltctl authorize xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx +sudo boltctl authorize <UUID>
 </code> </code>
-//Replace the last argument by the UUID of your device. Do this step only if the status is 'connected' and not 'authorized' when using 'boltctl' at previous step//+ 
 +Verify PCIe device
 <code bash> <code bash>
-$lspci+lspci | grep -i nvidia
 </code> </code>
-//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 ''xorg.conf'' file to force X11 to use the eGPU. Create/Edit ''/etc/X11/xorg.conf'' and add the followin lines :+Install the recommended driver (for GTX 1060):
  
 <code bash> <code bash>
-Section "Module" +sudo apt install nvidia-driver-535 
-    Load "modesetting" +</code>
-EndSection+
  
-Section "Device" +⚠️ Do NOT use NVIDIA .run installer (breaks package management and updates) 
-    Identifier "Device0" + 
-    Driver     "nvidia+ 
-    BusID      "PCI:7:0:0" //Switch this to your BusID as revealed by using 'lspci' command +=== 6. Disable nouveau driver === 
-    Option     "AllowEmptyInitialConfiguration" + 
-    Option     "AllowExternalGpus" "True" +<code bash> 
-EndSection+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> </code>
  
-One of the drawbacks of eGPU usage in Linux is the lack of hotplug functionnality. The above ''xorg.conf'' file must be removed or commented out after unplugging the eGPU so as to have X11 not rely on it anymore.+Reboot (without eGPU connected).
  
-=== GSwitch Project === 
  
-Which brings us to this simple tool developped to simplify the loading/unloading process : [[https://github.com/karli-sjoberg/gswitch|GSwitch Git Hub]]+=== 7Create 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 it manually:
  
 <code bash> <code bash>
-$sudo gswitch egpu +sudo nano /usr/local/bin/prime-run
-$sudo gswitch internal+
 </code> </code>
  
-Note that the thunderbolt device has to be in ''authorized'' status for this to work, and this has to be done manually at every connection (unless you automate it).+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>
  
-=== Useful Ressources ===+Make executable:
  
-[[https://egpu.io/forums/thunderbolt-linux-setup/ubuntu-19-04-easy-to-use-setup-script-for-your-egpu/|eGPU.io Forum]]+<code bash> 
 +sudo chmod +x /usr/local/bin/prime-run 
 +</code>
  
-[[https://egpu.io/forums/thunderbolt-linux-setup/a-script-to-change-xorg-config/|Another eGPU.io Forum]] 
  
-[[https://github.com/claudio-walser/egpu-setup|Claudio Walser eGPU Setup Git Hub]]+=== 8Test GPU usage ===
  
-[[https://y.tsutsumi.io/2020/08/15/egpu-linux-core-x-chroma/|Blog Post of Core X Chroma integration in Linux]]+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 
 +</code> 
 + 
 +You should see the GTX 1060 listed. 
 + 
 +Test offloading: 
 + 
 +<code bash> 
 +prime-run glxinfo | grep "OpenGL renderer" 
 +</code> 
 + 
 + 
 +=== 9Usage === 
 + 
 +Run applications on the eGPU: 
 + 
 +<code bash> 
 +prime-run <application> 
 +</code> 
 + 
 +Example: 
 + 
 +<code bash> 
 +prime-run blender 
 +prime-run steam 
 +</code>
  
-[[https://www.kernel.org/doc/html/latest/admin-guide/thunderbolt.html|Linux Kernel page over thunderbolt]] 
  
-[[https://github.com/karli-sjoberg/gswitch|GSwitch Git Hub]]+=== 10Important notes ===
  
-[[http://pocketnix.org/posts/eGPUs%20under%20Linux%3A%20an%20advanced%20guide|A 2017 dated advanced eGPU guide in Linux. Useful for in-depth tech info]]+  * Laptop must boot **without** eGPU connected (known limitation on this hardware) 
 +  * eGPU must be hot-plugged after login 
 +  * Internal display introduces a ~20–30performance penalty (PCIe copy-back) 
 +  * External monitor connected to the GPU removes this penalty completely 
 +  * Cycles rendering (Blender) is not affected by this limitation
  • linux/rbs.txt
  • Last modified: 2026/04/14 23:32
  • by mh