M-2 E key to PCI-e + USB2 adapter

I’m not using the M.2 E key slot for WiFi/bluetooth so I’ve ordered the following adapter: https://www.amazon.co.uk/KALEA-INFORMATIQUE-©-PCIe-Adapter-cable/dp/B078883MK2
This gives: PCI-e 1x slot and an internal USB 2 port
It is kind of cursed but I hope it is going to work :slight_smile: At least according to the schematic, both the USB pins and the PCI-E ones are connected.

1 Like

NGFF M.2 Key M to Key A+E Extension Cable NGFF Adapter Card Converter For Windows 2000/7/8/10|Computer Cables & Connectors| - AliExpress is an adpater that allows you to add a second NVMe drive. Only the shortest of the provided cables worked for me.

1 Like

That seems interesting as well!

The length of the cable of the one I bought does worry me. I didn’t know PCI-e signal could span that long. But we’ll see. It’ll arrive today, just need to find a PCE-e 1x card to test with.

The clock speeds have increased from PCIe 1.1 (supported by the adapter on Amazon) to PCIe 3. This reduces the allowable cable length. With PCIe 4 cable length became so critical that motherboards even have repeaters to condition the signals to PCIe slots. I found these maximum cable lengths in the internet but I don’t know if they are reliable:

  • PCIe Gen 1: 15 inches.
  • PCIe Gen 2: 12 inches.
  • PCIe Gen 3: 8 inches.
1 Like

Okay, thank you! That doesn’t bode well. I didn’t know about the differences between generations. Unmatched has “M.2 E-Key Slot (PCIe Gen 3 x1)”. The cable length of the adapter is 20cm, ~7.9 inch. Combined with the electronic specifications being way off…

Anyhow, I started looking for this because I needed an internal USB port (I’ve grossly wired one the long way around via the back now), so if that works it’s something .

This worked! I mounted the module, managed to find a molex-to-floppy(!) connector to power it, and the USB port works.

I’d also ordered a cheap-ish PCI-e card (1x gen-2 PCI-e to 2x USB3 19-pin connectors—could unfortunately find nothing that goes back to gen-1) but it had some delivery issues, so not able to check yet if it works out. If it does, I can have all front-panel USB ports working.

Hahahaha in Shelley’s name it actually works

mara@loreley:~$ lspci
00:00.0 PCI bridge: SiFive, Inc. FU740-C000 RISC-V SoC PCI Express x8 to AXI4 Bridge
01:00.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:00.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:02.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:03.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:04.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:08.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
04:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
05:00.0 USB controller: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 Controller (rev 01)
06:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7)
07:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]
mara@loreley:~$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 24ae:1000 Shenzhen Rapoo Technology Co., Ltd. Rapoo 2.4G Wireless Touch Desktop 
Bus 003 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
Bus 001 Device 002: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Tried connecting devices and it looks like it picks them up too. Might try a USB3 disk later and do some performance tests.

I benchmarked performance with this external USB3 harddisk:

Bus 002 Device 003: ID 8564:7000 Transcend Information, Inc. StoreJet 25H3

Both the USB port of the motherboard as the PCI-e one detect it as SuperSpeed successfully. The performance difference is interesting though!

Tested with:

fio --name TEST --eta-newline=5s --filename=/dev/sda --direct=1 --rw=read --bs=64k --ioengine=libaio --iodepth=64 --runtime=120 --numjobs=4  --group_reporting --readonly

Output for PCI-e USB3 adapter connected through M.2 adapter (VIA Technologies, Inc. VL805/806 xHCI USB 3.0 Controller):

TEST: (groupid=0, jobs=4): err= 0: pid=1487: Mon Sep 13 15:23:05 2021
  read: IOPS=3517, BW=220MiB/s (230MB/s)(25.8GiB/120011msec)
    slat (usec): min=20, max=178392, avg=1122.59, stdev=4427.52
    clat (usec): min=931, max=257180, avg=71546.86, stdev=17858.04
     lat (msec): min=10, max=261, avg=72.67, stdev=17.58
    clat percentiles (msec):
     |  1.00th=[   51],  5.00th=[   52], 10.00th=[   67], 20.00th=[   67],
     | 30.00th=[   67], 40.00th=[   68], 50.00th=[   68], 60.00th=[   68],
     | 70.00th=[   68], 80.00th=[   69], 90.00th=[   71], 95.00th=[  125],
     | 99.00th=[  142], 99.50th=[  146], 99.90th=[  224], 99.95th=[  228],
     | 99.99th=[  257]
   bw (  KiB/s): min=82560, max=246252, per=99.99%, avg=225075.11, stdev=9666.10, samples=956
   iops        : min= 1290, max= 3844, avg=3515.61, stdev=151.01, samples=956
  lat (usec)   : 1000=0.01%
  lat (msec)   : 2=0.01%, 10=0.01%, 20=0.01%, 50=0.08%, 100=92.80%
  lat (msec)   : 250=7.10%, 500=0.01%
  cpu          : usr=1.41%, sys=2.72%, ctx=34982, majf=0, minf=4217
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=99.9%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
     issued rwts: total=422095,0,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
   READ: bw=220MiB/s (230MB/s), 220MiB/s-220MiB/s (230MB/s-230MB/s), io=25.8GiB (27.7GB), run=120011-120011msec

Disk stats (read/write):
  sda: ios=26352/0, merge=395075/0, ticks=237462/0, in_queue=237462, util=100.00%

Output for motherboard USB3 (ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller):

TEST: (groupid=0, jobs=4): err= 0: pid=1516: Mon Sep 13 15:25:57 2021
  read: IOPS=1543, BW=96.5MiB/s (101MB/s)(11.3GiB/120009msec)
    slat (usec): min=19, max=64930, avg=2570.95, stdev=4445.08
    clat (usec): min=1723, max=260436, avg=163095.64, stdev=10032.08
     lat (msec): min=9, max=260, avg=165.67, stdev= 9.11
    clat percentiles (msec):
     |  1.00th=[  150],  5.00th=[  153], 10.00th=[  153], 20.00th=[  157],
     | 30.00th=[  161], 40.00th=[  161], 50.00th=[  163], 60.00th=[  165],
     | 70.00th=[  165], 80.00th=[  167], 90.00th=[  169], 95.00th=[  176],
     | 99.00th=[  209], 99.50th=[  213], 99.90th=[  251], 99.95th=[  262],
     | 99.99th=[  262]
   bw (  KiB/s): min=50688, max=102604, per=99.91%, avg=98705.18, stdev=1243.71, samples=956
   iops        : min=  792, max= 1600, avg=1541.58, stdev=19.43, samples=956
  lat (msec)   : 2=0.01%, 4=0.01%, 10=0.01%, 20=0.01%, 50=0.02%
  lat (msec)   : 100=0.04%, 250=99.81%, 500=0.11%
  cpu          : usr=1.04%, sys=1.53%, ctx=47009, majf=0, minf=4227
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=99.9%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
     issued rwts: total=185245,0,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
   READ: bw=96.5MiB/s (101MB/s), 96.5MiB/s-96.5MiB/s (101MB/s-101MB/s), io=11.3GiB (12.1GB), run=120009-120009msec

Disk stats (read/write):
  sda: ios=46242/0, merge=138725/0, ticks=236833/0, in_queue=236833, util=100.00%

So despite the Frankenstein-contraption it (at least read throughput) manages to be more than twice as fast.