<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cris 👨🏻‍💻</title>
    <description>The latest articles on DEV Community by Cris 👨🏻‍💻 (@cmiranda).</description>
    <link>https://dev.to/cmiranda</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F31694%2F817dc9c6-1958-4e9c-964d-8171fb9c113a.jpeg</url>
      <title>DEV Community: Cris 👨🏻‍💻</title>
      <link>https://dev.to/cmiranda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cmiranda"/>
    <language>en</language>
    <item>
      <title>Explain Open Source Software Licenses Like I'm Five</title>
      <dc:creator>Cris 👨🏻‍💻</dc:creator>
      <pubDate>Tue, 12 May 2020 01:29:32 +0000</pubDate>
      <link>https://dev.to/cmiranda/explain-open-source-software-licenses-like-i-m-five-60</link>
      <guid>https://dev.to/cmiranda/explain-open-source-software-licenses-like-i-m-five-60</guid>
      <description>&lt;p&gt;Hi! 👋🏼 I know this isn't a simple subject, but wanted to give it a shot.&lt;/p&gt;

&lt;p&gt;I did some research on Google 🙄 but I couldn't find a good #explainlikeimfive post.&lt;/p&gt;

&lt;p&gt;Thank you! 😁&lt;/p&gt;

</description>
      <category>explainlikeimfive</category>
      <category>opensource</category>
      <category>linux</category>
      <category>software</category>
    </item>
    <item>
      <title>Linux on MacBook Pro 2016 / 2017</title>
      <dc:creator>Cris 👨🏻‍💻</dc:creator>
      <pubDate>Mon, 11 May 2020 02:13:39 +0000</pubDate>
      <link>https://dev.to/cmiranda/linux-on-macbook-pro-2016-1onb</link>
      <guid>https://dev.to/cmiranda/linux-on-macbook-pro-2016-1onb</guid>
      <description>&lt;p&gt;Hi there! 👋 This is my first post on dev.to. I didn't know what to write about so I just decided to talk about what I'm doing right now, &lt;strong&gt;installing Linux on my MacBook Pro 2016 (model 13,3 - dual gpu with touchbar)&lt;/strong&gt;. This might also help anyone trying to install Linux on any MacBook without T2 chip (2017 or older).&lt;/p&gt;




&lt;h1&gt;
  
  
  📖 Context
&lt;/h1&gt;

&lt;p&gt;It all started a few months ago when I became curious about &lt;a href="https://en.wikipedia.org/wiki/Tiling_window_manager" rel="noopener noreferrer"&gt;tiling window managers&lt;/a&gt; and how I could increase my day to day productivity. I'm a software developer and I have A LOT of open windows and programs running at the same time, so I decided to give tiling window managers a shot. Unfortunately there are not a lot of choices available for macOS, I found &lt;a href="https://github.com/koekeishiya/yabai" rel="noopener noreferrer"&gt;yabai&lt;/a&gt; which is great! but as I started to tweak config files to be more comfortable working with my laptop I started to feel that it wasn't enough.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8lqj3q4myay2sfax7mig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8lqj3q4myay2sfax7mig.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a month or so of using yabai I met &lt;a href="https://i3wm.org/" rel="noopener noreferrer"&gt;i3-wm&lt;/a&gt;, and fell in love with it. The only problem... it's only for linux. So I though, what the heck, let's install Linux on my MacBook... and so the journey began.&lt;/p&gt;




&lt;h1&gt;
  
  
  ⚠️ Disclaimer
&lt;/h1&gt;

&lt;p&gt;There are a lot of well written guides on GitHub on how to do this (I'll put the links below), so I'm just going to write down the steps I followed in my particular case and the problems I faced.&lt;/p&gt;

&lt;h1&gt;
  
  
  🛒 What you'll need
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;MacBook Pro 13,3 2016 (with touchbar - no T2 chip)&lt;/li&gt;
&lt;li&gt;USB stick of at least 8GB&lt;/li&gt;
&lt;li&gt;macOS. It doesn't really matter which version but it's important to keep it installed to make the touchbar and some other stuff work.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This MacBook has a few components that will make things a bit more complicated than usual, that is the Touchbar and the AMD dedicated GPU.&lt;/p&gt;

&lt;p&gt;Some amazing people worked on drivers to make everything work the best way possible, so fear not, they got us covered 💪&lt;/p&gt;




&lt;h1&gt;
  
  
  🐧 Distro
&lt;/h1&gt;

&lt;p&gt;I have an i7 CPU, 16 GB of RAM. I've tried Manjaro, Ubuntu and Linux Mint and stayed with the latter, it's much more stable in my opinion, but you can pick whatever you want as long as the kernel is 5.0.0 or greater, this is important because some stuff already work out of the box. Also, amdgpu seems not to be working on 5.6, &lt;a href="https://bugzilla.kernel.org/show_bug.cgi?id=207589" rel="noopener noreferrer"&gt;read more here&lt;/a&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  💿 Partitioning &amp;amp; Linux installation
&lt;/h1&gt;

&lt;h3&gt;
  
  
  1. Disable System Integrity Protection (SIP)
&lt;/h3&gt;

&lt;p&gt;In order to perform some future steps required to install and boot Linux properly, we need to disable SIP (System Integrity Protection).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Reboot your Mac. When the startup screen shows up, press and hold the &lt;code&gt;Command + R&lt;/code&gt; until the Apple logo appears on your screen.&lt;/li&gt;
&lt;li&gt;  Once it finishes loading and brings you to Recovery Mode, click “Utilities -&amp;gt; Terminal.”&lt;/li&gt;
&lt;li&gt;  In the Terminal window, type in &lt;code&gt;csrutil disable&lt;/code&gt; and press Enter.&lt;/li&gt;
&lt;li&gt;  Restart your Mac.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Create a new partition
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;I've taken all the images from this &lt;a href="https://www.maketecheasier.com/install-dual-boot-ubuntu-mac/" rel="noopener noreferrer"&gt;amazing guide&lt;/a&gt; since it's beautifully explained and since I'm not writing this from macOS&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open Disk Utility from the “/Applications/Utilities” folder.&lt;/li&gt;
&lt;li&gt;Select your boot disk in the sidebar and click the “Partition” button.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fal5efo6l71yuzf518fx9.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Click “Partition” in the dialog box to confirm.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8vrni309l5clglcij4kp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8vrni309l5clglcij4kp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click the “+” button to add a partition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4cpsyublx5jhnuw97ue7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4cpsyublx5jhnuw97ue7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set the size and name. Choose “MS-DOS (FAT)” for your partition type. This will be erased by the Ubuntu installer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0hnaoir9u2tq5qz1uqoa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0hnaoir9u2tq5qz1uqoa.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click “Apply,” then “Partition” to execute.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5l4qddopyil86ww2ur57.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5l4qddopyil86ww2ur57.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Creating a bootable USB with Linux
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Download the ISO file from the &lt;a href="https://www.linuxmint.com/download.php" rel="noopener noreferrer"&gt;Linux Mint page&lt;/a&gt; or your distro of preference.&lt;/li&gt;
&lt;li&gt;Download and Install &lt;a href="https://www.balena.io/etcher/" rel="noopener noreferrer"&gt;Etcher&lt;/a&gt; in order to burn the ISO in our USB stick.&lt;/li&gt;
&lt;li&gt;Now plug the USB stick, open Etcher and select the ISO file to burn it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgbxj0nl7iyx3bibze7og.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgbxj0nl7iyx3bibze7og.jpeg" alt="Alt Text"&gt;&lt;/a&gt;- Click on "Flash!" button.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Booting from the USB stick
&lt;/h3&gt;

&lt;p&gt;Now we have Linux on our USB stick, it's time to begin the installation. I didn't need to use any external keyboard / mouse but keep in mind that you might require them if for some reason the built-in set doesn't work with the live USB.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restart the Mac with the USB stick inserted &lt;strong&gt;while&lt;/strong&gt; the &lt;code&gt;Option/alt&lt;/code&gt; &lt;em&gt;(⌥)&lt;/em&gt; key is pressed. This will launch Apple’s ‘Startup Manager’ which shows bootable devices connected to the machine. Your USB stick should appear as gold/yellow and labelled ‘EFI Boot’. Selecting this will lead you to the distro boot menu.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu4yjcjo6ifqoamgkjosj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu4yjcjo6ifqoamgkjosj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Running the installer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Connect to your wireless network (if you can) and choose to install third-party software.&lt;/li&gt;
&lt;li&gt;At the installation selection screen, choose “Something Else” from the bottom.&lt;/li&gt;
&lt;li&gt;Select the FAT-32 partition you created earlier. Click the “–” button to delete it.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2rdo3ofvvl6ude03awbi.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;With the free space selected, click the “+” to create a new partition.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcmeyyrg08mudcrgnuked.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcmeyyrg08mudcrgnuked.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set the size to 4000 MB and “Use as” to “swap.” (Some people say that for hibernation to work properly, the size of your swap should be around 1.5 times the size of your RAM. Not sure if this is the case, but hibernation didn't work for me anyway).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fakzrljmeyj13sibnum6t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fakzrljmeyj13sibnum6t.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create another new partition with the “+” button. Use all the available free space. Set “Use as” to “Ext4 journaling file system.” Set the mount point to “/.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3z4vjq3dwkpu3kj4skw2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3z4vjq3dwkpu3kj4skw2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose the ext4 partition under “device for bootloader installation.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmfs5d1egxx3m21nidck0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmfs5d1egxx3m21nidck0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click through the remaining steps to create your user and finish the installation.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  🧙 Linux tweaks
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1l6mxgd2yrokzwrleoo6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1l6mxgd2yrokzwrleoo6.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far you should have Linux installed on your MacBook just fine, the built-in display, keyboard and trackpad should be working out of the box. Now we're going to fix the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;📶 Wifi&lt;/li&gt;
&lt;li&gt;🕵️ Spoof macOS&lt;/li&gt;
&lt;li&gt;📼 Switch to the iGPU&lt;/li&gt;
&lt;li&gt;🔊 Audio&lt;/li&gt;
&lt;li&gt;👉 Touchbar&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Keep in mind that Wifi won't work until you reboot.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Wifi
&lt;/h2&gt;

&lt;p&gt;This MacBook model uses a Broadcom wireless board which is not great but at least we'll get decent wifi. There's an &lt;a href="https://bugzilla.kernel.org/show_bug.cgi?id=193121" rel="noopener noreferrer"&gt;issue&lt;/a&gt; with the brcmfmac module used by the kernel. Here's how to fix it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download &lt;a href="https://gist.github.com/cristianmiranda/6f269797b62076c3414c3baa848dda67#file-brcmfmac43602-pcie-txt" rel="noopener noreferrer"&gt;this file&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;And then
&lt;code&gt;cp brcmfmac43602-pcie.txt /lib/firmware/brcm&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wifi works generally ok, but there are a few issues you should be aware of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connectivity signal is not the best.&lt;/li&gt;
&lt;li&gt;After suspend/wake 5 GHz networks are not visible, and even if they are you cannot connect to them. 2.4 GHz works fine.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Spoof macOS
&lt;/h2&gt;

&lt;p&gt;We need to make the laptop thinks she's going to boot macOS, otherwise there are some components that don't get powered, included the integrated Intel GPU. For this we'll use a custom EFI file like this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;cd&lt;/span&gt; /tmp
&lt;span class="c"&gt;# See more at https://github.com/0xbb/apple_set_os.efi/issues/20#issuecomment-557352747&lt;/span&gt;
wget https://github.com/0xbb/apple_set_os.efi/files/3877561/apple_set_os.zip
unzip apple_set_os.zip

&lt;span class="c"&gt;# As root...&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;su 
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /boot/efi/EFI/custom
&lt;span class="nb"&gt;mv&lt;/span&gt; /tmp/apple_set_os.efi /boot/efi/EFI/custom


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now we need to edit GRUB&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;su
nano /etc/grub.d/40_default

&lt;span class="c"&gt;# Add the following lines:&lt;/span&gt;
search &lt;span class="nt"&gt;--no-floppy&lt;/span&gt; &lt;span class="nt"&gt;--set&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;root &lt;span class="nt"&gt;--label&lt;/span&gt; EFI
chainloader &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;root&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;/EFI/custom/apple_set_os.efi
boot

&lt;span class="c"&gt;# Update grub&lt;/span&gt;
update-grub


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;**Note:&lt;/em&gt;* If you prefer using rEFInd, that's totally fine. Just remember to uncomment the "spoof_osx_version" line in refind.conf. See more at &lt;a href="https://www.rodsbooks.com/refind/configfile.html" rel="noopener noreferrer"&gt;rEFInd's documentation site&lt;/a&gt;.*&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Switch to the iGPU
&lt;/h2&gt;

&lt;p&gt;This laptop has two GPU boards, one is the integrated Intel Graphics card and the other one is the dedicated ATI Radeon card. Since there are no drivers for this card to work properly we'll have to switch to the integrated one and then power off the dedicated GPU.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;su

&lt;span class="c"&gt;# Blacklist amdgpu&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"blacklist amdgpu"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/modprobe.d/blacklist-amdgpu.conf

&lt;span class="c"&gt;# Switch to integrated GPU&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git clone https://github.com/0xbb/gpu-switch
&lt;span class="nb"&gt;cd &lt;/span&gt;gpu-switch
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./gpu-switch &lt;span class="nt"&gt;-i&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Reboot&lt;/li&gt;
&lt;li&gt;Now we'll load amdgpu module and turn the card off properly.
```bash
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;sudo su&lt;br&gt;
gpu-manager | grep 'amdgpu loaded? no' &amp;amp;&amp;amp; sudo modprobe amdgpu || echo 'AMD GPU already loaded'&lt;br&gt;
echo OFF &amp;gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;See more at https://github.com/Dunedan/mbp-2016-linux/issues/6#issuecomment-416015734

***Note:** Repeat last three steps every time you reboot (can be automated)*

## 4. Audio
Audio doesn't work out of the box, here's how to fix it.

```bash


sudo su
cd /tmp
sudo apt-get install wget make gcc linux-headers-generic
git clone https://github.com/leifliddy/snd_hda_macbookpro.git
cd snd_hda_macbookpro
./install.cirrus.driver.sh


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;**Note:&lt;/em&gt;* Changes won't take effect unless you reboot the system.*&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Touchbar
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;git dkms

&lt;span class="nb"&gt;cd&lt;/span&gt; /tmp
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;# macbook12-spi-drivers&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;applespi&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;apple_ib_tb&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;spi_pxa2xx_platform&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;intel_lpss_pci"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/initramfs-tools/modules

git clone https://github.com/roadrunner2/macbook12-spi-driver.git
&lt;span class="nb"&gt;cd &lt;/span&gt;macbook12-spi-driver
git checkout touchbar-driver-hid-driver
dkms add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="c"&gt;# check kernel version&lt;/span&gt;
dkms &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-m&lt;/span&gt; applespi &lt;span class="nt"&gt;-v&lt;/span&gt; 0.1 &lt;span class="nt"&gt;-k&lt;/span&gt; 5.3.0-24-generic &lt;span class="c"&gt;# replace this with your kernel version&lt;/span&gt;

&lt;span class="c"&gt;# lsinitramfs /boot/initrd.img-5.3.0-24-generic | grep -i "dkms/apple"&lt;/span&gt;
lib/modules/5.3.0-24-generic/updates/dkms/apple-ibridge.ko
lib/modules/5.3.0-24-generic/updates/dkms/apple-ib-tb.ko
lib/modules/5.3.0-24-generic/updates/dkms/applespi.ko


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you want the F-keys to be always on by default and the Fn button for switching from F-keys to special keys, then use the following command (if not, fnmode=1):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'options apple_ib_tb fnmode=2'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/modprobe.d/apple_ib_tb.conf
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'options apple_ib_tb idle_timeout=60'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/modprobe.d/apple_ib_tb.conf
update-initramfs &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="nt"&gt;-k&lt;/span&gt; 5.3.0-24-generic &lt;span class="c"&gt;# replace this with your kernel version&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can also swap &lt;code&gt;fn&lt;/code&gt; and a &lt;code&gt;control&lt;/code&gt; keys:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'options applespi fnremap=1'&lt;/span&gt; | &lt;span class="nb"&gt;tee&lt;/span&gt; /etc/modprobe.d/applespi.conf
update-initramfs &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="nt"&gt;-k&lt;/span&gt; 5.3.0-24-generic &lt;span class="c"&gt;# replace this with your kernel version&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Or remap it to any other key:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;p&gt;&lt;span class="c"&gt;# modinfo applespi | grep -w fnremap&lt;/span&gt;&lt;br&gt;
parm:           fnremap:Remap fn key &lt;span class="o"&gt;([&lt;/span&gt;0] &lt;span class="o"&gt;=&lt;/span&gt; no-remap&lt;span class="p"&gt;;&lt;/span&gt; 1 &lt;span class="o"&gt;=&lt;/span&gt; left-ctrl, 2 &lt;span class="o"&gt;=&lt;/span&gt; left-shift, 3 &lt;span class="o"&gt;=&lt;/span&gt; left-alt, 4 &lt;span class="o"&gt;=&lt;/span&gt; left-meta, 6 &lt;span class="o"&gt;=&lt;/span&gt; right-shift, 7 &lt;span class="o"&gt;=&lt;/span&gt; right-alt, 8 &lt;span class="o"&gt;=&lt;/span&gt; right-meta&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;uint&lt;span class="o"&gt;)&lt;/span&gt;&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  🎉 Bonus #1 - Keyboard&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Here's a guide on how to remap your keyboard.&lt;br&gt;
&lt;a href="https://medium.com/@petrstepanov/a-macos-like-keyboard-remap-on-ubuntu-linux-cae1d108a97" rel="noopener noreferrer"&gt;https://medium.com/@petrstepanov/a-macos-like-keyboard-remap-on-ubuntu-linux-cae1d108a97&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🎉 Bonus #2 - Trackpad
&lt;/h2&gt;

&lt;p&gt;Trackpad is not very good on Linux, here's how to improve it.&lt;br&gt;
&lt;a href="https://int3ractive.com/2018/09/make-the-best-of-MacBook-touchpad-on-Ubuntu.html" rel="noopener noreferrer"&gt;https://int3ractive.com/2018/09/make-the-best-of-MacBook-touchpad-on-Ubuntu.html&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  What doesn't work
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Built-in microphone&lt;/li&gt;
&lt;li&gt;Hibernation&lt;/li&gt;
&lt;li&gt;Audio after suspend&lt;/li&gt;
&lt;li&gt;5 GHz wifi networks after suspend&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Status
&lt;/h1&gt;

&lt;p&gt;Check out &lt;a href="https://github.com/Dunedan/mbp-2016-linux" rel="noopener noreferrer"&gt;https://github.com/Dunedan/mbp-2016-linux&lt;/a&gt; for an updated status of each component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl4k11kdxddbgw8tma4ab.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl4k11kdxddbgw8tma4ab.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  That's all Folks!
&lt;/h1&gt;

&lt;p&gt;I hope you enjoyed this guide. Don't hesitate on commenting if you have any questions or you have any new findings regarding this topic.&lt;/p&gt;

&lt;p&gt;Big thanks to all the people that made this possible. It's unbelievable the amount of people spending time on this without any retribution whatsoever 🙏&lt;/p&gt;

&lt;h3&gt;
  
  
  Sources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/Dunedan/mbp-2016-linux" rel="noopener noreferrer"&gt;https://github.com/Dunedan/mbp-2016-linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.maketecheasier.com/install-dual-boot-ubuntu-mac/" rel="noopener noreferrer"&gt;https://www.maketecheasier.com/install-dual-boot-ubuntu-mac/&lt;/a&gt; (also took the cover image from here).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ubuntu.com/tutorials/tutorial-create-a-usb-stick-on-macos#5-etcher-configuration" rel="noopener noreferrer"&gt;https://ubuntu.com/tutorials/tutorial-create-a-usb-stick-on-macos#5-etcher-configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ubuntu.com/tutorials/tutorial-create-a-usb-stick-on-macos#7-boot-your-mac" rel="noopener noreferrer"&gt;https://ubuntu.com/tutorials/tutorial-create-a-usb-stick-on-macos#7-boot-your-mac&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bugzilla.kernel.org/show_bug.cgi?id=193121#c62" rel="noopener noreferrer"&gt;https://bugzilla.kernel.org/show_bug.cgi?id=193121#c62&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>linux</category>
      <category>unix</category>
      <category>ubuntu</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
