openSUSE on the 2015 Apple 12 Inch Retina MacBook

Hi John,

I tried a similar thing last weekend. Like you I’ve experimented with Ubuntu, so I’m afraid I detailed the results in an Ubuntu Forum so a not to mix things up. http://ubuntuforums.org/showthread.php?t=2290700 Essentially it’s because the keyboard is attached via the SPI interface, rather than USB - if you notice the Macbook Pro & Air users are lucky enough to see the keyboard/touchpad in the list when they type lspci. We are not so lucky. We see the SPI interface when you type lspci, but I’ve not found any information on how to list the devices hanging off the SPI bus (it doesn’t appear in /sys/bus/spi).

On the plus side, it looks (from the OSX device tree) like it’s the same hardware, so once the SPI works, maybe the keyboard and touchpad will come for free :slight_smile:

sorry, typo in above post. Pro & air users see the keyboard/touchpad in lsusb,not lspci.

Hi guys,
Any updates on the drivers? I’m about to sell my MBr 12" 2015 and go back to Thinkpad x220.

Not from me. I was hoping some smarter people would have responded by now with some magic recipe we could all follow!

I will try and install the 4.3rc1 kernel which seems to have a number of NVMe-related changes later today to see if something has snuck into this release but, other than that - I’m still running blind.

John

Just a quick update… As far as I can tell (which is not to confirm either way or the other) - after having just installed kernel 4.3RC1 (admittedly on my Ubuntu-based system); there doesn’t appear to have been any changes which have enabled the track-pad, keyboard or visibility of the disk. You may want to try this yourself within a SUSE environment but it’s still looking like this is a fringe use-case and not getting any attention.

Looks like we won’t see this patch until kernel 4.3rc3 and higher including the most recent Broadcom firmware named “brcmfmac43602-pcie.bin”.
We’ll see a functional keyboard and support for the new generation of trackpad with force sensoring and haptic feedback.

FYI
This patch prepares for the new device by adding configuration data
for the code paths that would otherwise look different.

See: https://bugzilla.kernel.org/show_bug.cgi?id=96771

Romanator,

Thanks for this information. Having read the thread it certainly does appear like things are heading in the right direction!

I tried the 4.3RC3 kernel on my Ubuntu system and unfortunately I didn’t have any success (and, having read the CHANGES document I couldn’t see any mention of these new features having made it into this kernel release).

I also tried compiling/loading SicVolo’s kernel module against kernel 4.1.2 but again nothing sprang to life. I would suggest you test yourself though just to be sure.

I also get the feeling a lot of the discussion targets the MacBook Pro and not the new 12"?

Don’t suppose you’ve seen any discussion with respect to the Apple SSD (NVMe) support have you?

John

Follow Up

Sorry for the delay. I’ve been busy testing openSUSE Leap 42.1 and Tumbleweed.
In response to the force touchpad, I would recommend trying the multitouch package for the force touchpad.

https://software.opensuse.org/package/x11-input-multitouch?search_term=multitouch

Description:
Multitouch X Driver

           The Multitouch X Driver driver uses the kernel MT protocol to bring multi-touch gestures to the Linux desktop.

===================================================================

I’ve been reading quite a bit about the NVMe driver which as already been patched into the kernel.
Check your kernel to see if the NVM Express block device is enabled.

Type:
cd /usr/src/linux
make mrproper
make xconfig (this will shows a gui)
Navigate to Edit ->Find and type: nvme and click on the “Search” button
You must enable NVM Express block device

Description
NVM Express block device (BLK_DEV_NVME)

CONFIG_BLK_DEV_NVME:

The NVM Express driver is for solid state drives directly
connected to the PCI or PCI Express bus. If you know you
don’t have one of these, it is safe to answer N.

To compile this driver as a module, choose M here: the
module will be called nvme.

Symbol: BLK_DEV_NVME =m]
Type : tristate
Prompt: NVM Express block device
Location:
-> Device Drivers
-> Block devices (BLK_DEV =y])
Defined at drivers/block/Kconfig:313
Depends on: BLK_DEV =y] && PCI =y]

Select File ->Save. The kernel will begin compiling. This may take about 30 - 40 minutes.

In the meantime, I have found a kernel 4.2 that has been compiled for the Macbook 2015.
See: http://download.opensuse.org/repositories/home:/tormen/openSUSE_13.2/
**
kernel-desktop **

 Apple MacBookPro 2015 Retina Display (Macbookpro12,1) optimized kernel version (including all necessary patches).

See:
https://wiki.archlinux.org/index.php/MacBook#Early_2015_13.22.2F15.22_-Version_12.2Cx
**
kernel-desktop ** Apple MacBookPro 2015 Retina Display (Macbookpro12,1) optimized kernel version (including all necessary patches).
See:
https://wiki.archlinux.org/index.php/MacBook#Early_2015_13.22.2F15.22
-_Version_12.2Cx

I just tried linux 4.3.0-rc4 (oldish) on a customized systemrescuecd, but linux does not find the disk even after modprobing nvme. Like others have suggested, the disk may be proprietary and not be nvme at all. Does anyone really have any evidence (from apple or otherwise) that this is nvm express at all?

I took a few moments (google search) to try to see how I could contact apple and ask them what this disk is supposed to be, and I think my only option is to call customer service and ask. It sucks there’s no directory and we can’t ask the engineers who made the macbook itself…anyway, I’ve been telling myself I will contact them, but I might just do it.

noobermin

Follow Up

Looks like a patch has been found for the Apple controller for the nvme. Read this: http://lists.infradead.org/pipermail/linux-nvme/2015-October/002947.html

Patch: http://http://git.infradead.org/users/kbusch/linux-nvme.git/commitdiff/e43f1dc5d9f31380090cc6b67fd3fa43a15089e6

I also have an openSUSE user “Tormen” patching a kernel so that he can test it on his MacBook 12" 2015. So stay tuned.

Success! That simple 3 line patch at least got the device and partitions recognized on my MacBook.

$ uname -a
Linux crapple 4.3.0 #2 SMP Wed Nov 11 21:14:30 CST 2015 x86_64 GNU/Linux

ls -l /dev/nvme0*
crw------- 1 root root 251, 0 Nov 11 22:55 /dev/nvme0
brw-rw---- 1 root disk 259, 0 Nov 11 22:55 /dev/nvme0n1
brw-rw---- 1 root disk 259, 1 Nov 11 22:55 /dev/nvme0n1p1
brw-rw---- 1 root disk 259, 2 Nov 11 22:55 /dev/nvme0n1p2
brw-rw---- 1 root disk 259, 3 Nov 11 22:55 /dev/nvme0n1p3


As the patch email mentions, the controller identifies itself as a mass storage device so it’s still necessary to bind the controller to the nvme driver:

echo "106b 2001" > /sys/bus/pci/drivers/nvme/new_id

The thread also mentions updating the PCI ID structure to include the controller device ID so the manual driver binding may not be necessary:
http://lists.infradead.org/pipermail/linux-nvme/2015-October/002955.html

What about the keyboard and touchpad? Are they working?

Nice! Did you try writing to the disk? I’ll try this later this week.

I tried the two patches that Moepi mentions in his post here a couple of weeks ago and whilst I can copy to/from the drive I was unable to debootstrap a full system (complaints about writing to the superblock etc): http://moepi.net/?page_id=213. There’s also commentary on the track-pad and other internal devices.

Here is a link to the mailing list which details the kind souls who have created and are testing these patches: https://bugzilla.kernel.org/show_bug.cgi?id=99891

The patches themselves look to have evolved since when I tested so would recommend you all have a go and provide feedback as appropriate:

http://git.infradead.org/users/kbusch/linux-nvme.git/commitdiff/e43f1dc5d9f31380090cc6b67fd3fa43a15089e6

John

I found something which seems to indicate that perhaps Linux kernel 4.4+ may support the 14e4:43a3 Broadcom 802.11ac wireless chip. The page lists the device ID as being associated with the BCM4350 chip, although everything else I have come across seems to indicate that this device ID is associated with the BCM4360 chip. Perhaps it is just a typo…? The link is here:

https://wireless.wiki.kernel.org/en/users/drivers/brcm80211

It says:

I actually copied the system I had previously installed on a USB SSD to the nvme disk and after modifying the initrd to include the nvme kernel module I have a system which boots and runs directly from the nvme disk.

Since I’m using disk encryption I had to remember to update /conf/conf.d/cryptroot inside of the initrd to use the correct partition and also run ‘grub-install /dev/nvme0n1’

It’ll be nice when the keyboard, trackpad and internal wireless network adaptor are supported.

Prior to installation, I ended up re-installing OS X in order to repartition the disk since OS X disk encryption seemed to be interfering with the process.

I’m running kernel: Linux crapple 4.4.0-rc4 #1 SMP Thu Dec 10 16:32:48 CST 2015 x86_64 GNU/Linux

The firmware in this email http://www.spinics.net/lists/linux-wireless/msg144980.html brought my internal wireless card to life! This is needed by the kernel module “brcmfmac”

I’m currently running kernel 4.4.0-rc5 and have revision 5 of the BCM4350 wireless adapter

lspci -nn |grep 43a3
01:00.0 Network controller [0280]: Broadcom Corporation Device [14e4:43a3] (rev 05)

To extract the firmware:

lynx -dump -dont_wrap_pre http://www.spinics.net/lists/linux-wireless/msg144980.html > bcm4350_firmware.txt
git apply --exclude=WHENCE bcm4350_firmware.txt

This yields:

brcm/brcmfmac4350c2-pcie.bin

I copied “brcmfmac4350c2-pcie.bin” to /lib/firmware/brcm and also to “/lib/firmware/brcm/brcmfmac4350-pcie.bin” since the brcmfmac kernel module seems to currently reference that particular firmware.

dmesg | grep brcm
   27.150100] usbcore: registered new interface driver brcmfmac
   27.272942] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4350-pcie.txt failed with error -2
   27.538927] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Nov 26 2015 03:48:57 version 7.35.180.133 (r602372) FWID 01-c45b39d6
   27.578297] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
   27.584988] brcmfmac 0000:01:00.0 wlp1s0: renamed from wlan0
   30.298999] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
  123.010194] brcmfmac 0000:01:00.0 wlan0: renamed from wlp1s0
  128.224298] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
  128.224306] brcmfmac: brcmf_add_if: ignore IF event

The firmware error message refers to the nvram file which isn’t needed in this case apparently. Refer to https://wireless.wiki.kernel.org/en/users/drivers/brcm80211#firmware_installation

After loading kernel module brcmfmac I ended up with wireless interface wlp1s0 which I renamed wlan0: “sudo ip link set wlp1s0 name wlan0”

The keyboard and trackpad are the last remaining non-functioning parts for me.

Is bluetooth working for you?

I haven’t attempted to get bluetooth working but as far as I can tell it is not currently working.

I’ve found this device that looks like a bluetooth serial interface

P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/BCM2E7C:00
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/BCM2E7C:00
E: ID_VENDOR_FROM_DATABASE=Broadcom
E: MODALIAS=acpi:BCM2E7C:APPLE-UART-BLTH:
E: SUBSYSTEM=acpi
E: USEC_INITIALIZED=7539067

I extracted the contents of the BroadcomBluetooth64.exe (from the bootcamp software collection). In the BtwSerialBus-dev.inf file, I found the line:
%Bus.DeviceDesc%=BluePinole2E7C, ACPI\BCM2E7C ; BCM4350 no flash

The odd thing is that there no BCM4350…hcd file from the extracted driver files. Does anyone know how I can go about getting the firmware for this device?