Giter Site home page Giter Site logo

ubuntu-on-macbook12's Introduction

Ubuntu on macbook 12 (mid 2017)

Here is a "for noob tutorial" to install Ubuntu 17.04 on Macbook 12 version mid 2017 MacBook10,1

๐Ÿ’ก First warning!

I tried this installation with a windows bootcamp partition already installed alongside BUT I COULD NOT BOOT ON IT ANYMORE AFTER (though the datas of the partition were not overwritten). I suspect more a boot reFind related error, reFind displayed me that error: Blinitializelibrary failed 0xc00000bb

๐Ÿ’ก Second warning!

Contrarly to what it is said here or here about WIFI stability on previous macbook models mine seem to behave natively pretty well. Letting ping google.com in a console show most of the time 30ms (on a poor connection) with no disconnections.

Before starting

You need a usb hub with at least 3 ports available for the keyboard + the mouse + ubuntu live usb

Install Ubuntu

In all cases grab the ubuntu iso and install unetbootin (which I generally execute on my macOS partition)

As of 29/06/2017 ubuntu 17.04 ships with 4.10 kernel version

This is an important point because with kernel under 4.11 internal SSD WON'T BE RECOGNIZED and therefore YOU WON'T BE ABLE TO INSTALL UBUNTU on the ssd

๐Ÿ’ก From there you have 3 options (from most simple to most tricky)

    1. Wait for future (or if it is already released when you read this tutorial) Ubuntu artful aardvark to be released that will implement 4.11 kernel version then make a bootable usb like you would do with unetbootin
    1. If you can already run a ~30 go Ubuntu system somewhere

Make an image of Ubuntu with kernel upgraded.

To do so download isorespin.sh

(install propable dependencies)

sudo apt install xorriso
chmod +x isorespin.sh
./isorespin.sh -i [your iso] -k v4.11.7

Make the generated iso bootable with unetbootin. Plug the usb, boot your mac holding "alt" stroke and choose EFI boot at the right. Choose "Install ubuntu".

(I have also tried this method and it is i think the smartest.)

    1. Classic install

Create the bootable ubuntu usb with unetbootin. Plug the usb, boot your mac holding "alt" stroke and choose EFI boot at the right. Choose "Try ubuntu".

Once the in the live session launch a terminal and execute the following commands

sudo su
modprobe nvme
echo 106b 2003 > /sys/bus/pci/drivers/nvme/new_id

๐Ÿ’ก You should see the internal drives mounting.

Now you can initiate the install process from within the live session. (If for some reason the process install is stuck execute again the above commands)

Once ubuntu installed you will have to REBOOT IN RECOVERY MODE (default option will give you unreadable screen, in that case just type exit, press enter and retry).

At next boot the drive won't be recognized again so you will have to enter the same command above (without sudo) in the >initramfs console.

Then hit CTRL+d to exit and it should manage to boot and mount the drive. Recall this step because you may have to do it again. (It is explained here for french people)

Once ubuntu rebooted with discs recognized you may update the kernel to 4.11.7 version in order to solve once for all the problem of internal ssd. To do so launch a terminal and execute:

cd /tmp
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.7/linux-headers-4.11.7-041107_4.11.7-041107.201706240231_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.7/linux-headers-4.11.7-041107-generic_4.11.7-041107.201706240231_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.7/linux-image-4.11.7-041107-generic_4.11.7-041107.201706240231_amd64.deb
sudo su 
dpkg -i *.deb
apt update
apt upgrade -y
reboot

Solve the keyboard and touchpad recognition problem

    1. Retrieve the drivers on Github

Launch a terminal and execute the following command

cd
sudo apt install git
git clone https://github.com/roadrunner2/macbook12-spi-driver
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
    1. Set the proper dpi for the touchpad

sudo nano /etc/udev/hwdb.d/61-evdev-local.hwdb

and copy paste the content of the 61-evdev-local.hwdb file of this repository. CTRL+o (to write) CTRL+x (to exit)

    1. Load the modules

sudo modprobe intel_lpss_pci spi_pxa2xx_platform applespi appletb

    1. You'll want these loaded on boot, so rebuild the initramfs:
sudo su
echo 'add_drivers+="applespi intel_lpss_pci spi_pxa2xx_platform appletb"' >> /etc/initramfs-tools/modules
update-initramfs -u
reboot

And voilร ! Your keyboard and touchpad should be working at next login!

Booting Ubuntu

๐Ÿ’ก I noticed a strange demeanor (using the following install of ubuntu) depending surely on how one reboots.

Indeed after several reboots in "ubuntu default mode" I start to lose touchpad and then keyboard capabilities but it seems I can get them back (without recompiling anything) if I boot in recovery mode and without executing any commands (I don't know if it can be related?)

Also if one reboots letting default ubuntu selection one can change screen resolution (actually not the resolution itself but the range cursor below) and screen brightness but in recovery mode it is not the case.

Conclusion is to always boot in "recovery mode" in order to get keyboard and touchpad recognized but having "static" screen resolution and brightness.

ubuntu-on-macbook12's People

Contributors

chisnan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rquast ivanagui2

ubuntu-on-macbook12's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.