# Thunderbolt Support

## sk3l

There is a semi-recent thread (from 2015) that discusses efforts to configure and test Thunderbolt device support for things such as display link, ethernet, USB daisy chaining, etc. Here is the thread:

https://forums.gentoo.org/viewtopic-t-1010232-highlight-.html

I figured rather than necrobumping it, I could just start a new one.

I'm wondering if some folks actually have a functional setup with some Thunderbolt hardware, monitor, USB hub, and so on? My understanding is that "the kernel support is there." I find this statement I've read vague to a degree, as in, what aspects of Thunderbolt behavior (display, ehternet, USB daisy chain) can work with recent kernels? Speaking of kernel, which version(s) have support? Are there .config values that one must enable, or is it just "on"? Any userspace items I need to enable/configure along with it?

I recently bought a Dell 5510 laptop, and along with it, a Thunderbolt dock connected via USB-C. What I've found is that, basically, this thing is a $300 paper weight ATM. Nothing works for me running on an Arch kernel of 4.5 vintage, with the exception of charging. The Dell Sputnik team is apparently working with Intel on prepping pull requests to get things working for their devices. However, Sputnik plans and executes their work in tandem with Canonical/Ubuntu. Me being an Arch (and former Gentoo) user, I am looking to see if there are other pathways to at least maybe get my dock to support a single monitor, or USB device connection. 

Based on the thread above I linked to, seems there has been limited success. I was hoping somebody who has gotten Thunderbolt to work on linux could share some knowledge, specifically, your kernel vintage, kernel config, device used, and any other pertinent details.

Thanks A Bunch

-sk3l

----------

## Simdol

Hi,

I've been using thunderbolt (1st gen) with my Macbook Pro since 2013 without any issues with Gentoo. I've compiled the thunderbolt (CONFIG_THUNDERBOLT) directly into kernel since I use them frequently, and had to enable PCIe hotplug support (CONFIG_HOTPLUG_PCI_PCIE) for the devices to work with the thunderbolt. I hope that I haven't overlooked anything but that is all I remember. With the following configuration, I've used it to access other Macs via thunderbolt (target disk mode) along with the external monitor without any trouble. Last I recall, it's been there since early kernel version of 3.12 or / and (3.17) (don't quote me there, I've been using thunderbolt since then -- in fact, I am confident that thunderbolt support should have been around since 2012), but if I am not mistaken, depending on the generation of the thunderbolt (I am guessing your Dell has 3, which is very recent), you may need higher version of the kernel.

I am currently running kernel 4.4, from pf-sources. Depending on the device you may use (especially Dell, as I recall having specific driver for them in the kernel), you may need to enable some device drivers that complements the device you are attempting to connect it to, including graphics, storage drivers.

Good luck,

----------

## sk3l

Hey There Simdol,

Thanks for replying.

Let me apologize for a bit of imprecision in my original post. The dock I have from Dell uses Thunderbolt v3. This is something I'm learning as I go along; there are multiple versions of the Thunderbolt protocol in the wild. Version 3 is latest in the line of protocols. As I'm reading and learning more, I think the situation is that there are probably many devices, likely many from Apple, that work well with Thunderbolt v2. I'm guessing the original post I linked to above pertains to Thunderbolt 2. Since Thunderbolt 3 is so new, the support for this version is very much limited in the kernel. In fact, now I'm reading that Intel is developing kernel support in their own private repo, and they must trickle pull requests to kernel.org as they go along. As such, there is not much transparency or firm understanding on progress. Dell is colobarating with Intel, but they are holding their news of progress close to the vest, w.r.t. their device support.

All in all a frustrating situation, because what I see is that this is not a matter of distro support or tweaking your kernel modules to turn anything on. The fact is, the logic ain't there yet, and there is no definititve timeline for when it lands.

If anyone has any different news to share, or wishes to clarify any of my assumptions, jump right in!

Thanks,

sk3l

----------

## Tatsh

The Thunderbolt module in the kernel at the moment is only for Apple hardware. It does not work with others. I've used it successfully with external hard disks and Apple's Thunderbolt ethernet device on a MacBook Pro.

I have a Thunderbolt PCI-E card for ASUS Rampage V and it does not get detected (BIOS sees it).

----------

## abeedv

Hi sk3l,

Not sure if it's appropriate to resurrect this thread after almost 6 months, but I just wanted to share my experience. If it's better to start a new thread then I'm happy to move this wherever it is most appropriate.

I've got a Dell XPS 15 9550, which has the same Thunderbolt 3 connection as the 5510. I've recently bought a WD15 docking station, as reading through the comments in this thread seemed to suggest that a fair amount of progress had been made by Team Sputnik in getting this working with Linux. The long and the short of it is that I've been able to get most of it working, at least good enough for my usage, and may continue to tinker if I have a need to get the rest of it fully functional.

Currently status

- DisplayPort: works if connected at boot, then can disconnect / reconnect fine

- USB dock: works

- ethernet: works

- combined mic / headphone jack: not working

- HDMI, VGA: untested

- audio out: untested

- laptop charging: works

- power button: not tested using to power on the whole laptop

I'm running 4.7.4 kernel, and if there is interest then I can share the options that I enabled in a somewhat shotgun approach to getting anything vaguely related to this to work.

Getting the whole system to play nicely together has been quite involved. As far as Dell / that other thread is concerned, it is only possible to get this working with Windows. Based on my own experience, that is partly true. There are two updates that need to be applied to get this working:

* BIOS update: straightforward enough to download this from the Dell website, dump it on a USB key (even though it's an .exe file) and use the BIOS updater available if you hit F12 at the boot menu.

  - at this point I had the dock charging the laptop, and the power button on the dock would at least prompt the logout dialogue, but nothing else was working, monitor connected via mini DP to DP

* Upgraded kernel to 4.7.4, set flags and more flags that had anything to do with USB / Thunderbolt / DisplayLink that I could find

  - no change in functionality of the dock at this point, accepted fate that would need to attempt to update the firmware

* Firmware update on the dock: the official guide and the comments in the thread say that Windows is a necessity here, and I have to agree. But, instead of opting for a dual-boot solution, I was able to have some success using a virtual machine. I ran VirtualBox 5.1.4 with Windows 10 64 bit, installation media freely available from Microsoft's website. Within there, I downloaded and installed the Thunderbolt drivers, rebooted the VM, attempted to share the USB audio (which was now showing up, at least in VirtualBox) then ran the firmware update. Several times, in fact, as I wasn't sure if anything had happened! Since there was no feedback, I gave up at this point, and was powering off my machine, when Holy Smokes Batman, the monitor sprang into life and started mirroring my laptop screen.

  - at this point I would love to be able to state "yeah, I knew it would work all along" but basically I was trying whatever I could to avoid having to dual-boot my machine. In the end, installing the firmware updates within the virtual machine did seem to do something, but, honestly, I wasn't checking any of the system logs carefully enough to see what had changed, when, and identify the steps required.

So, end of my experience, not sure if this is still relevant to you any more, but if there is interest then I can get some more details and try and add some notes to the wiki pages to share this knowledge.

-- A

----------

