MacBook Pro 2018 (Manjaro Linux) + Razer Core X + Radeon R9 390
 
Notifications
Clear all

MacBook Pro 2018 (Manjaro Linux) + Razer Core X + Radeon R9 390  

  RSS

Jacob Pyke
(@jacob_pyke)
Active Member
Joined: 3 months ago
 

Hi all,

I was wondering if I could possibly throw my hat in the ring to try get an eGPU working on Linux for T2 enabled MacBooks. 

So, I am running Manjaro on a T2 2018 13", I used this efi to ensure that the iGPU and eGPU are both loaded into linux. My kernel Parameters are simply: `radeon.cik_support=0 amdgpu.cik_support=1`.

Boltctl recognizes the enclosure and it is trusted:

Razer Core X
├─ type: peripheral
├─ name: Core X
├─ vendor: Razer
├─ uuid: c9030000-0090-8718-233d-5310aa633121
├─ generation: Thunderbolt 3
├─ status: authorized
│ ├─ domain: ca030000-0060-641e-03e0-0b11a6f1b121
│ ├─ rx speed: 40 Gb/s = 2 lanes * 20 Gb/s
│ ├─ tx speed: 40 Gb/s = 2 lanes * 20 Gb/s
│ └─ authflags: boot
├─ authorized: Sun 02 Aug 2020 06:18:17
├─ connected: Sun 02 Aug 2020 06:18:17
└─ stored: Sun 02 Aug 2020 05:53:02
├─ policy: auto
└─ key: no

However, upon boot I get these errors in dmesg when i grep for amd:

[ 1.568700] [drm] amdgpu kernel modesetting enabled.
[ 1.569293] amdgpu 0000:09:00.0: BAR 2: releasing [??? 0x00000000 flags 0x0]
[ 1.569294] amdgpu 0000:09:00.0: BAR 0: releasing [??? 0x00000000 flags 0x0]
[ 1.569368] [drm:amdgpu_device_resize_fb_bar [amdgpu]] *ERROR* Problem resizing BAR0 (-16).
[ 1.569444] [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* sw_init of IP block <gmc_v7_0> failed -19
[ 1.569587] amdgpu 0000:09:00.0: amdgpu_device_ip_init failed
[ 1.569628] amdgpu 0000:09:00.0: Fatal error during GPU init
[ 1.569669] [drm] amdgpu: finishing device.

Unfortunatley, this is where my knowledge runs slightly short. This is getting a tad too low level for me so any eyes to look over this would be greatly appreciated. Happy to try things out 🙂 

13" 2018 MacBook Pro + Razer Core X + Radeon R9 390


ReplyQuote
Jacob Pyke
(@jacob_pyke)
Active Member
Joined: 3 months ago
 

Solved the issue! Stumbled upon this thread https://egpu.io/forums/thunderbolt-linux-setup/tutorial-ubuntu-18-04-rtx-2080-razer-core-v1/#post-76425 and after passing these kernel params was working like a charm 🙂

13" 2018 MacBook Pro + Razer Core X + Radeon R9 390


ReplyQuote
costas
(@costas)
New Member
Joined: 2 months ago
 

Hello Jacob, 

I am very glad to find your posts, since it's a long time now I wished to post my query. Pretty much my set up is very similar to yours: Macbook Pro (mid 2017), running Ubuntu, on external SSD, version 20.04 (but also tried 18.04), Linux kernels on: 5.4.0-42 (and 5.3.0-24 for 18.04), Razer Core X eGPU with Vega 64

Context/Symptoms: My first goal is to use my 2 external displays and, later on, compile ROCm for use with tensorflow/pytorch. However, my experiences until now are painful with eGPU on Linux.

  • If I boot with eGPU plugged in, then I get black screen (it might be an iGPU issue), LED of caption key works, but very quickly eGPU makes a noise (can hear plugged disks as if disconnected), and caption LED stops working (as if keyboard is not operational).  
  • If I boot without eGPU plugged, then after booting I plug eGPU while in a non GUI TTY (using CTRL+ALT+Fn keys) and get the same error as you posted above (error -19) with one extra line:

VC save buffer size does not match @0x300

Even though Ubuntu is operational and works fine (when hot plugging), I can not see my Vega 64 in the "About" of Ubuntu and there are no drivers shown after 'configuration' when I type lshw -c video:

*-display UNCLAIMED
description: VGA compatible controller
product: Vega 10 XL/XT [Radeon RX Vega 56/64]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: [email protected]:45:00.0
version: c1
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi vga_controller cap_list
configuration: latency=0
resources: memory:99b00000-99b7ffff memory:99b80000-99b9ffff

However, with other linux commands I can see that the system recognises that Vega 64 is connected and Boltctl shows Thunderbolt as authorised.

lsmod | grep amd gives:

amdgpu 4579328 0
amd_iommu_v2 20480 1 amdgpu
gpu_sched 32768 1 amdgpu
ttm 106496 1 amdgpu
drm_kms_helper 184320 2 amdgpu,i915
i2c_algo_bit 16384 2 amdgpu,i915
drm 491520 11 gpu_sched,drm_kms_helper,amdgpu,i915,ttm

lspci | grep VGA:

00:02.0 VGA compatible controller: Intel Corporation Iris Plus Graphics 640 (rev 06)
45:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] (rev c1)

boltctl

* Razer Core X Chroma
|- type: peripheral
|- name: Core X Chroma
|- vendor: Razer
|- uuid: 000bf11c-52c4-2701-ffff-ffffffffffff
|- status: authorized
| |- domain: ce010000-0080-7708-a3f8-2614b233a121
| `- authflags: none
|- authorized: Sun 16 Aug 2020 11:25:11 UTC
|- connected: Sun 16 Aug 2020 11:25:11 UTC
`- stored: Sat 15 Aug 2020 18:15:25 UTC
|- policy: iommu
`- key: no

* Razer Core X Chroma #2
|- type: peripheral
|- name: Core X Chroma
|- vendor: Razer
|- uuid: 008b8119-52c4-2701-ffff-ffffffffffff
|- status: authorized
| |- domain: ce010000-0080-7708-a3f8-2614b233a121
| `- authflags: none
|- authorized: Sun 16 Aug 2020 11:25:12 UTC
|- connected: Sun 16 Aug 2020 11:25:12 UTC
`- stored: Sat 15 Aug 2020 18:15:26 UTC
|- policy: iommu
`- key: no

Note that there are differences in our output: e.g. in policy I have iommu and you have auto.

I also tried the scripts from Sebulon (A script to change Xorg config ) and hertz (eGPU on Linux - Easy-to-use setup script ) but did not help at all for me.

After reading your post: I tried the parameters as you suggested by editing /etc/default/grub and updating grub. However, nothing improved. Actually, I had to edit the grub file because I had no picture when eGPU was connected and if not connected, I was dropped in a BusyBox black screen with an initramfs prompt.  Specifically, I tried with the following grub file:

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 modprobe.blacklist=radeon pcie_ports=native pci=assign-busses,nocrs,realloc iommu=on"
GRUB_CMDLINE_LINUX=""

Some questions if you could help me please:

  1. Would it be easy if you could share your /etc/default/grub file? 
  2. Do you hot plug or boot with eGPU already plugged in?
  3. Are you using the amdgpu drivers?
  4. Have you preserved your parameters: `radeon.cik_support=0 amdgpu.cik_support=1`? In my case these are not recognised, when updating grub. So I had to remove them

Efi issue: I also noticed you mentioned you did the trick with the efi file.  Did you have to "bless" any efi file? This is a tricky step as it involves Windows installation, according to the author of the utility "5. If you dont have Windows installed, you need to bless the efi so the efi will run at startup."

Thank you for any help and will report back any findings.

 

EDIT: It is important to boot from rEFInd and  apple_set_os.efi (see https://www.reddit.com/r/eGPU/comments/crzo78/keep_intel_igpu_enabled_on_macbook_with_linux/). After doing this I edited GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_ports=native pci=assign-busses,nocrs,realloc iommu=on" in /etc/default/grub file. Then sudo update-grub. Reboot with the eGPU connected (you may need to connect it to the correct USB-3 port) and graphics card should now be recognised.

One side effect is that my WiFi card is not working correctly when I pass "pci=assign-busses,nocrs,realloc". Instead, I used the Ethernet from the Core X Chroma, which also may fail at times. Unplugging the Ethernet cable and plugin it again will resume internet connection. If anyone has an idea why this happens, please let me know.

This post was modified 2 months ago

13" mid-2017 MacBook Pro (MacBookPro14,1) + Razer Core X Chroma + Radeon RX Vega 64


ReplyQuote