15 ms·
Install Ubuntu 20.04 LTS on MacBookPro14,1
- r4mbini 6y agoDo you know of a way to get OSX key bindings on Ubuntu?
- aspenmayer 6y agoThere are many ways. I honestly don’t type enough in Linux on my Mac to need that but Kinto looks like it does what you want, is reversible, is per application configurable, and is aware of cursor/caret state. https://github.com/rbreaves/kinto https://github.com/rbreaves/kinto
- r4mbini 6y agoThank you for your reply. 'Make linux type like a mac, the zero effort solution'. Exactly what I'm after!
- LeonM 6y agoThe key bindings are the least of your worries when trying to run Linux on a Mac... But FWIW: on Linux key bindings are always completely customizable.
- r4mbini 6y agoI'm running Ubuntu on my custom build desktop PC but with a wired apple keyboard. I also use Macs quite a lot. If I could get consistency between the two with key bindings it would be so good. I'll have a dig for customising them
- goerz 6y agoWhat year’s release is a “MacBookPro14,1”?
- danieldk 6y agoNote that it is an identifier, the number indicates a generation, not a screen size. The answer is MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports): https://support.apple.com/en-us/HT201300 https://support.apple.com/en-us/HT201300 This is a model without Apple T2, which probably simplifies Linux support.
- yyx 6y agoAre these fixes experimental? There must be a reason why they aren't in the main distribution.
- LeonM 6y agoI did a quick peek at the patches the OP is referring to, the code seems definitely experimental (no hard feelings towards the authors though!). As far as I am aware of how the Linux kernel is structured, these patches would have to be submitted as BSP 'quirks'. Most of the ICs (such as the audio IC) that Apple used are standard components with Linux drivers available, but Apple often uses different pinouts or configurations requiring modified (patched) drivers to make them work. In the current state I don't think the patches meet Linus's quality standards to be accepted into the kernel, but it shouldn't be too hard to polish that up. Should be a fun project to work on of you are looking at contributing to the Linux kernel. You'll need basic knowledge of electronics and embedded systems, but it shouldn't be that hard. Judging from Louis Rossman's youtube channel the schematics for each Macbook board should be available. Heck, now that I think of it: I would like to give it a try, if only I had a Macbook available to do this with.
- Dunedan 6y agoI used MacBooks with Linux starting in 2006 till the end of last year. That's when I finally gave up. I really love the hardware Apple produces, but we're at a point where I believe it's not feasible anymore to use Linux on MacBooks. For the MacBook Pros 2016 and up I put significant effort into trying to get mainline Linux running as smoothly as possible by documenting and coordinating the efforts to have drivers for all internal devices [1], but just have a look where we're at over three years later: Audio doesn't work properly, Wifi does neither (expect for the non-TouchBar models, like the one the OP uses), hibernation is still somewhat broken and let's not even start talking about the advanced abilities of the TouchBar or support for TouchId. I could go on. Models with T2 chip (2018 and up) are even worse in some regards and I believe it won't get better anymore. Next year we might see MacBooks with custom ARM SoCs and that's where I expect the driver situation will get even more dire. As Apple continuous to use more and more custom designed components, the effort for proper Linux drivers for such hardware only increases. Most of these problems could be easily solved if Apple would simply make documentation for their hardware available. There are lots of great people passionate about running Linux on Macs out there, but reverse-engineering the hardware is what makes it really complicated to produce robust drivers for it. I sincerely hope my predictions are wrong and Linux will still go strong on Macs in future as well, but for the time being I'm done with Macs. [1]: https://github.com/Dunedan/mbp-2016-linux https://github.com/Dunedan/mbp-2016-linux
- viraptor 6y ago> Most of these problems could be easily solved if Apple would simply make documentation for their hardware available. Not the wifi one. The problem there is that the firmware itself is broken in the paths that linux implements the wifi stack. (fullmac) Mac is not affected, but practically the firmware is still broken. It's also a known/won't-fix case, so the documentation itself won't help.
- pansa2 6y agoDo the latest Macs still support running Windows via Boot Camp? What would you recommend if I need to run both Linux and Windows alongside MacOS? Virtualisation? Or would I be better off using more than one machine?
- fcanesin 6y agoBuy a XPS-13 developer edition.
- Narann 6y agoHonest question: Having Linux on a Mac a decade ago had sense has Mac hardwares were special enough to provide value, but now you have XPS-like hardware, why would people buy a Mac to install a Linux on it? Dual boot? What does Mac hardware have that others don't?
- pjmlp 6y agoI also never got the point. For various reasons my main OS is Windows, however due to my past life as Linux fanboy during the university, when I decided to buy a travel netbook, Asus were the ones getting my money for a 1215B with Ubuntu pre-installed. Sure it had a couple of issues later, more due to the way that Canonical managed the transition of the wlan and Brazos drivers, but it served the message to which vendors I wanted to support. Don't want to use either Windows or hate Apple's behaviours? Then support the OEMs trying to ship Linux on their hardware.
- Andrew_nenakhov 6y agoThey used to have a shiny Apple logo on the lid, but now they have only black logo. Still, you won't find one on non-mac hardware.
- dijit 6y agoThis idea that anyone who buys Apple products is a sheep buying it purely for the brand needs to die. It doesn’t lend itself to a conversation about why people might choose differently to you. Ignorance is not helping either side.
- Andrew_nenakhov 6y agoWhat really needs to die are attempts of attributing your own ideas to other people. No one but you was saying anything about sheep buying and that brand is the sole reason for buying Apple products. Disclosure: I own a lot of Apple products, though I still prefer Ubuntu to MacOS.
- omarhaneef 6y agoOr go to windows hyper-v manager, and click install Ubuntu image. And you’re done! (Ok, expanding the memory to a decent size is a little more work)
- em500 6y agoIf you're ok with virtualized Ubuntu rather than native, it's just as easy to install on the Mac: https://multipass.run/ https://multipass.run/
- ShamelessC 6y agoI've somehow never heard of multipass.run before. It looks very similar to Vagrant though. Is there any reason to choose this over Vagrant?
- Sangeppato 6y agoYes, VMs are a thing, I think we all know that
- seaghost 6y agoI've installed it on a Macbook Pro 15 Retina Late 2013 everything works out of box.
- deeblering4 6y ago2020 - Finally, the year of linux on the desktop.
- pcr910303 6y agoFor people who want to install Ubuntu on MBP14,2 or 14,3 (the new MBPs with four thunderbolt 3 ports) — this[0] might help. (It'll be probably trivial to update the article for Ubuntu 20.04 - just ignore the upgrading the kernel parts.) It mentions adding the touchbar, keyboard drivers[1] and fixes for the non-working wifi[2], all without an external keyboard or anything. You can just boot up your Ubuntu virtual machine, execute some commands in the chroot environment & make an bootable ISO. This gist[3] and this GitHub repo[4] might also be worth to check out - although it looks like a bit lagging in information (the wifi fix, added last November isn't reflected yet). This is my command checklist (tweaked from this[0] to match my prefs), might be helpful for someone? ### check if pwd is ~/Download # ask password beforehand sudo -v # mounting iso and copying to current file sudo mkdir -p /mnt/iso sudo mount ubuntu-20.04-desktop-amd64.iso /mnt/iso mkdir customiso rsync -a --exclude=casper/filesystem.squashfs /mnt/iso/ customiso/ sudo unsquashfs /mnt/iso/casper/filesystem.squashfs sudo umount /mnt/iso # chrooting sudo mount --bind /dev squashfs-root/dev/ sudo chroot squashfs-root/ PS1="(chroot) $PS1" LC_ALL=C HOME=/root export PS1 HOME LC_ALL mount -t proc none /proc mount -t sysfs none /sys mount -t devpts none /dev/pts # updating mv /etc/resolv.conf /etc/resolv.conf.bak echo 'nameserver 1.1.1.1' | tee /etc/resolv.conf ### change apt mirror list apt update apt upgrade apt dist-upgrade apt autoremove apt -f install # installing driver apt install git dkms echo -e "\n# macbook12-spi-drivers\napplespi\nappletb\nspi_pxa2xx_platform\nintel_lpss_pci" >> /etc/initramfs-tools/modules git clone https://github.com/roadrunner2/macbook12-spi-driver.git /usr/src/applespi-0.1 dkms install -m applespi -v 0.1 cat > /etc/udev/hwdb.d/61-evdev-local.hwdb << 'EOF' # MacBook8,1 (2015), MacBook9,1 (2016), MacBook10,1 (2017) evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook8,1:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook9,1:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook10,1:* EVDEV_ABS_00=::95 EVDEV_ABS_01=::90 EVDEV_ABS_35=::95 EVDEV_ABS_36=::90 # MacBookPro13,* (Late 2016), MacBookPro14,* (Mid 2017) evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,1:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,2:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,1:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,2:* EVDEV_ABS_00=::96 EVDEV_ABS_01=::94 EVDEV_ABS_35=::96 EVDEV_ABS_36=::94 evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,3:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,3:* EVDEV_ABS_00=::96 EVDEV_ABS_01=::95 EVDEV_ABS_35=::96 EVDEV_ABS_36=::95 EOF cat > /etc/udev/hwdb.d/61-libinput-local.hwdb << 'EOF' libinput:name:*Apple SPI Touchpad*:dmi:* LIBINPUT_MODEL_APPLE_TOUCHPAD=1 LIBINPUT_ATTR_KEYBOARD_INTEGRATION=internal LIBINPUT_ATTR_TOUCH_SIZE_RANGE=200:150 LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=1200 EOF ### edit wifi driver(https://bugzilla.kernel.org/show_bug.cgi?id=193121#c52) # exiting chroot mv /etc/resolv.conf.bak /etc/resolv.conf umount /dev/pts umount /sys umount /proc exit sudo umount squashfs-root/dev/ sudo rm customiso/casper/filesystem.squashfs sudo mksquashfs squashfs-root customiso/casper/filesystem.squashfs cd customiso sudo rm md5sum.txt sudo find -type f -print0 | xargs -0 sudo md5sum | grep -Ev "./md5sum.txt|./isolinux/" | sudo tee md5sum.txt cd .. sudo xorriso -as mkisofs -r -V "ubuntu-for-mac" -R -l -o ubuntu-for-mac.iso -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat customiso/ [0]: https://nixaid.com/linux-on-macbookpro/ https://nixaid.com/linux-on-macbookpro/ [1]: https://github.com/roadrunner2/macbook12-spi-driver https://github.com/roadrunner2/macbook12-spi-driver [2]: https://bugzilla.kernel.org/show_bug.cgi?id=193121 https://bugzilla.kernel.org/show_bug.cgi?id=193121 [3]: https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6a92f9cd7 https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6... [4]: https://github.com/Dunedan/mbp-2016-linux https://github.com/Dunedan/mbp-2016-linux
- ohwel2l 6y agoSomewhat unrelated but do we still need Docker Desktop for Mac to run Docker containers on macOS? Why is that, is it because Linux is needed? Couldn't Docker run containers natively using just macOS?
- ressetera 6y agoI don't have a clear image of how Docker behaves on Mac, but I had wasted a whole day trying to make it work on Windows WSL. I'd suggest you virtualize a normal Linux host on your machine (under VMware for example) and run Docker there.
- jedieaston 6y agoWSL2 makes this super easy. Once you have a distro installed, you just go into Docker Desktop's settings, click "use WSL2 backend" and it does it. Then you don't have to have Docker's slow boot2docker VM eating RAM all the time in the background. It's great! The reason it doesn't work on WSL1 is because of the whole Linux kernel not being there, the features required for Docker to work don't exist. But since WSL2 is a (rather performant for certain tasks) VM, it works fine.
- noisem4ker 6y agoI'm almost certain you already read this guide [1], so I ask: where did it fail you? It definitely wasn't straightforward, but I managed to get it working fine in a couple of hours (Windows 10 1903, WSL 1, Ubuntu 16.04). [1] https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly https://nickjanetakis.com/blog/setting-up-docker-for-windows...
- ressetera 6y agoIf I'm not mistaken, I hadn't many issues installing docker on WSL. The problems started when I docker-compose up'd a pretty basic nginx-php-mariadb stack.
- Tsarbomb 6y agoThe capabilities of Docker and similar technologies all stem from LXC which depends on the capabilities of the Linux kernel.
- rahimnathwani 6y agoIf you have a mid-2017 MacBook pro, these instructions are great: https://nixaid.com/linux-on-macbookpro/ https://nixaid.com/linux-on-macbookpro/ You can follow the instructions to create a patched Ubuntu installer, or you can just download the image.
- OrgNet 6y agoArent MacBooks overpriced because of MacOS?
- 3fe9a03ccd14ca5 6y ago> Using Etcher to create bootable USB drive. For such a technical post, I’m surprised this is the recommendation. There are a million ways to copy the iso to the usb drive and make it bootable. The easiest in my opinion is: cat Ubuntu.iso > /dev/disk
- yadco 6y agoAnd then overwrite your operating system. The main feature of etcher is that you can burn an operating system without worrying that you could brick your machine.
- 3fe9a03ccd14ca5 6y agoGood point, but at least in Mac I don’t think you can easily write like that to a partitioned device that’s still mounted.
- sloshnmosh 6y agoJust an FYI... You might want to add “balena.io” to your hosts file. I do like the simplicity of BalenaEtcher but it seems to still try to call home over tcp port 443 even when I disable usage statistics and auto-updates in settings. This may have been fixed in newer versions. (I’m using 1.5.45)
- wuunderbar 6y agoThis might be great "because we can" or to recycle old MacBooks, but to me the whole point of having a Macbook is the tight, native integration with its hardware. I pay the premium for Apple precisely because everything just works, and works well. (Barring the occasional bugs...)
- ngcc_hk 6y agoWhat you need is Microsoft like linux VM environment, with direct support by Apple. But even boot camp ... but competition might help. When developer moves to windows for its linux Env., it may trigger then to rethink about mac. But probably not. Sadly.
- habanany 6y agoI’ll try it right now, oops I forgot I don’t have no usb stick
- bproven 6y agoLenovo Carbon X1 - besides maybe Dell XPS line - this is the best small 14" laptop for Linux. I consider it a 13" macbook replacement. it is good quality. I have had zero issues with my 6th gen running Fedora. However, you will never get the trackpad exp of a Mac, but you get a GREAT keyboard on X1s to make up for it (and the trackpad is actually pretty good). I wouldnt want to fight with Apple hw with Linux. Apple doesnt want to make it doable any longer...