Compatibility of the new Touch Bar with Ubuntu

5,857

Solution 1

It is not right now.

It is doubtful whether there will be meaningful compatibility in the next few years.

Solution 2

Please, follow firstly this guide and then this one carefully or follow the following steps:

Install the MacBook12 SPI drivers:

apt install dkms
git clone https://github.com/cb22/macbook12-spi-driver.git /usr/src/applespi-0.1
dkms install -m applespi -v 0.1

printf "%s\n" "# applespi" "applespi" "intel_lpss_pci" "spi_pxa2xx_platform" >> /etc/initramfs-tools/modules
update-initramfs -u

and reboot, then follow this second part (you can interchange apt with dnf):

sudo apt install git kernel-devel
git clone https://github.com/roadrunner2/macbook12-spi-driver.git
pushd macbook12-spi-driver
git checkout touchbar-driver-hid-driver
make
sudo mkdir /lib/modules/`uname -r`/custom/
sudo cp applespi.ko appletb.ko /lib/modules/`uname -r`/custom/
sudo depmod
popd

now look for ** the attached 61-evdev-local.hwdb** (located in the directory of the cloned repo):

sudo cp ...the-attached-61-evdev-local.hwdb... /etc/udev/hwdb.d/61-evdev-local.hwdb
sudo modprobe intel_lpss_pci spi_pxa2xx_platform applespi appletb

now, if you using dracut follow this:

sudo mv /boot/initramfs-`uname -r`.img{,.orig}
sudo mv ...the-attached-keyboard.conf... /etc/dracut.conf.d/keyboard.conf
sudo dracut

else this:

  1. open following file /etc/initramfs-tools/modules
  2. append to the file only the missing words picked from: {applespi, intel_lpss_pci, spi_pxa2xx_platform, appletb} (for example if the file the words pplespi and appletb are already listed, append only intel_lpss_pci and spi_pxa2xx_platform)
  3. save and close

finally reboot.


Those guides helped me to install drivers for the TouchBar (not only, TouchPad and some others) on my MacBook Pro Touch (late 2016).

The TouchBar works greatly without no problems.

The distro I used is Ubuntu 17.04 (I am using that to write this answer) dual booted alongside macOS Sierra.

Share:
5,857

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I'm considering buying the MacBook Pro (Late 2016) with Touch Bar. As I'm a programmer and a Ubuntu user, could anyone tell me if the Touch Bar is compatible with Ubuntu?

  • Admin
    Admin over 7 years
    I called Apple and they told me the same thing. Probably some "non-apple-user" will create a software allowing us to configure our applications into this touch bar (I guess)
  • Admin
    Admin over 7 years
    Well, it could be an apple-user. However, in my opinion the likelihood of this is quite slim. First off there's probably a quite involved and encrypted protocol between the Mac and the touch bar to account for the fingerprint sensor, etc. Secondly no Linux programs are written to support a touch bar, as other systems do not have those. So you'll also need to alter the applications you want to use. It's not something that happens over a month or two.
  • Admin
    Admin over 7 years
    Do you know if the same model of macbook pro exists without the touchbar?
  • Admin
    Admin over 7 years
    Tthere is a 13" MacBook Pro 2016 model without touch bar. However it is not the same as other specs are different as well.
  • Admin
    Admin over 7 years
    Could you explain "it is not the same as other specs are different as well"?
  • Admin
    Admin over 7 years
    @SpinningAtInfinity You're best to just go to this page and compare specs yourself. You can filter by 13" and 15" models at the top, but the 13" page is the one that has the model without Touch Bar.
  • muru
    muru over 6 years
    You cannot interchange dnf and apt arbitrarily. The package names are often different. Git happens to be the same, but there's no package named kernel-devel.
  • Sina
    Sina over 5 years
    When you say it is working greatly, do you mean that you just have static keys like Esc, F1, F2 etc.? or something else?