Posted

Looking at my previous post, I thought I was finally making some progress with setting up a new laptop and getting away from Apple and the MacOS ecosystem.

Long story short, a firmware update, a faulty Lenovo design, and shortly after making my previous update, the video output was fried on my new-for-me Lenovo. Ya didn’t feel great.

I found myself back to square 1 so to speak in terms of having a new laptop to use. Instead I had a Rasberry Pi that’s a nice idea, but not fast enough to actually use, not practical enough because it’s not a laptop, and not a great keyboard for typing.

The Lenovo was OK, but could feel some of the shortcomings around the hardware, after coming from the macbook. The sceen quality and ratio weren’t great, the trackpad also felt low quality. Speakers were horrible. Otherwise the laptop was as expected and fine. But once video output stopped working, the laptop just felt…subpar.

I have to say, I’m also not a huge fan of Ubuntu…not sure why.

Fast forward, here I was with those 2 computers not serving a purpose, I was stuck still using my work laptop, while my old Macbook was fried.

I started trying to sell all the laptops. The aim was that if I would sell everything, I’d ever a good chunk of $ to put towards the new 15” Macbook Air. She would start using that, and then I could use her 13” Intel Macbook.

As we started thinking about the options, and what we were looking forward, I started to realize in many ways my fried Macbook was actually a better machine for what she needed. 1 TB and 16GB for video editing. The 4 ports would also be a big convenience over the 2 ports+power of the 15” — in fact the only perk of the 15” is the larger screen size.

When factoring the cost to the buy the 15”: $1400 with the price to repair the 13” was $615, it seemed clearly better to opt for the repair.

As a wide bonus, with Intel Macbooks fading, and limited support on M* Macbooks, I felt it was better to opt for keeping an “high spec” Intel Macbook.

OK, enough with what happened since the last post and now.

Current device is:

13" Macbook w/Touch bar (15,4 model).
256GB SSD
8GB RAM
Big Sur (MacOS 11)

To install Linux on Macbook:

Need to resize the APFS partition. In order to do that have to stop Time Machine automatic backups from filling up the hard drive:

sudo tmutil listlocalsnapshots /
sudo tmutil deletelocalsnapshots /

Next, use Disk Utility to Create a new Partition. Important that it’s a new Partition — not a new Volume.
As a side note, I found it helpful to set the filesystem as HFS and named it Linux. This helps to more easily identify the partition in the confusing Fedora installer.

I did install the rEFInd bootloader. But I’m not directly using it right now, so that’s worth a different post.

I tried booting off of several Linii (Linux distros). For some reason I came to the conclusion I don’t want to use Ubuntu. I’m not sure why, but I feel like there are certain design decisions about Ubuntu that never let me fully “get into” using the OS. I guess it’s the amount of stuff that they have setup — it’s customized enough that you feel you don’t need to change things. But in fact, it’s Linux, so you’re going to run into issues. So when you need/want to tweak things, there’s actually a lot of pieces to deal with, and you don’t really know the connection between different parts.

Some of the distros that caught my attention were:

  • Elementary OS — clean design; feels like a complete system.
  • Parrot OS — looks like a comprehensive security focused OS
  • Endeavour OS — a modified, easier to use Arch Linux
  • Fedora — clean and well supported

When I booted Elementary, I was surprised to find that the keyboard and trackpad were not working in the LiveCD mode.

At first I thought it was just the distro or livecd. But I soon realized it’s related to Apple at the T2 chip.

I soon found https://t2linux.org/, thankfully.

Looks like there were certain distros better suited for a Macbook T2 install.

I spent a bit of time reading and experimenting with livecds. I deciIded to go with Fedora. I liked that it looked to be a clean, stock distro. I also wanted to try something that was a least a bit different than the Debian based distros, which I realized were the only Linii I’d used in ages. I also figured that if I’d run into some issues with getting Linux running on Macbook, it would be nice to use one of the more mainstream distros.

There are 2 .isos listed on T2. I started with the first one, but didn’t get it to boot right away (I might have just been impatient). So I went with the 2nd one, and it booted on the first try.

Fedora https://github.com/mikeeq/mbp-fedora
Fedora https://github.com/t2linux/fedora-iso

When I started reading about Fedora, the main issue I was hearing about was the installer. I didn’t realize that Linux could still be confusing to install — but I soon learned people weren’t exaggerating!

Because I was dealing with a slightly complicated partition system, being that it’s a Macbook, I really found the partitioning part of the install incredibly confusing and scary!

Luckily I found a guide from Fedora that explained the steps in just enough detail that I was able to replicate.

https://fedoraproject.org/wiki/QA:Testcase_dualboot_with_macOS

5. Advance to Destination Installation spoke
    Select the proper disk
    Select "Automatic configure partitioning"
    Click Done, when the Installation Options appears, choose Reclaim Space
    Locate and select the hfs+ "Untitled" volume created earlier in macOS Disk Utility, click the Delete button (not Delete all)
    Click Reclaim space button to accept changes and return to the main menu
6. Click Begin Installation

The install was quick n smooth. As is to be expected, some things did not work out of the box.

The main issue with Macbook is that you have to copy the firmware for wifi and bluetooth from the MacOS install. T2Linux provides a script for that, but the oldest MacOS it supports is Mojave(?). Still being on Big Sur, it didn’t work.

Someone else had recently posted about the same issue:

  • https://github.com/t2linux/wiki/issues/435

More specifically, on Fedora I had to run:

cd ~/Downloads
wget "https://github.com/AdityaGarg8/Apple-Firmware/archive/refs/heads/main.tar.gz"
tar -xf *.tar.gz
cd Apple-Firmware-main
cd lib/firmware/brcm
sudo cp -r * /usr/lib/firmware/brcm/
sudo modprobe -r brcmfmac
sudo modprobe brcmfmac
sudo modprobe -r hci_bcm4377
sudo modprobe hci_bcm4377

T2Linux has some other guides, with some steps for wifi. When I followed them, it actually made problems, so I just undid the steps, and stuck with the above and it’s been working OK.

I’ve noticed Suspend doesn’t always work reliably. Specifically, when you come back, wifi and/or bluetooth are often not working. I’ve also had it where the keyboard didn’t work, touch bar didn’t activate. In most cases, a reboot resolves the issue. I have yet to find the commands to reset without rebooting.

The next big task I dealt with, which I think has often prevented me from fully getting comfortable with using the mac is the keyboard mapping.

The keyboard shortcut keys are slightly different between Linux, Mac and Windows. This makes for a lot of confusion when switching between the systems.

I wasn’t able to get 100% parity (yet) because I noticed certain keys are not behaving as desired in apps such as Firefox and the File browser. However, at the OS level, I was able to use a combination of Keyboard Shortcuts in Settings and Tweaks to make the adjustments.

The main Tweaks were:

Swap left Win with Left Ctrl
Swap right Win with Right Ctrl

This has the Apple Command key behaving as the main shortcut key for simple things like copy, paste, opening new browser tabs.

Gnome as a shortcut to Lauch their Overview feature, which is a bit like their start menu that has apps n also shows open apps.

With the switch from above, this wasn’t working with the Command key. I found the following command make the the Command key launch Overview:

gsettings set org.gnome.mutter overlay-key 'Control_L'

The back and forward commands in the browser are not quite working as expected, but the above changes make using the OS a lot more familiar and functional feeling.

I think there might have been some other tweaks I made, but as I’m pretty tired right now I can’t think of them.

The next big thing I’d like to do is figure out how to automount APFS extenrnal hard drives. I’ve installed apfs-fuse, which may or may not work, but it only works as a manual mount for now.

I also want to see if getting touch ID to work is an option. Suspend would be the a big win, but I’m not holding my breath.

Author

Posted

I’ve been using Macbooks for the past decade. Over the past couple decades I’ve switched back and forth between PCs and Macs a couple times. My last 2 Macs had hardware failure and I just didn’t want to keep paying the Apple premium. But more than that, I’ve really come to loathe the Mac walled garden. I broke out earlier this year by switching from iPhone to Android. I’ve also gone back and forth between the 2 over the years. Both have their issues and leave something to be desired, but I have to say that I really found it liberating and less confined feeling to be using Android. There are more apps that do what I want, in a way that I want, without dealing with the constant iOS BS.

With that experience in mind, I told myself I will switch back to Linux the next time I need to get a new laptop. My Macbook was working fine until I spilled coffee on it. It kept chugging along for a few more months before it just stopped charging. I looked into getting it repaired, but Apple doesn’t really want to repair devices anymore. They just want you to buy a new one. That’s what happened to me in 2020 when my sweet 15” Macbook failed for now reason besides faulty logic board design. At that time, I had no choice, I was in school and needed a new device. I bit the bullet, bought a new one, which then only made it about 18 months before getting overcaffeinated.

For less than what it cost to repair my Macbook ($700) I was able to buy a used, like new Lenovo X1 Carbon, Gen 6 ($500). While it’s an older model, it’s known to run Linux well, and likely does everything I need.

Because I have a Macbook for work, it’s also less of an abrupt departure, since I’ll still be using Mac everyday for work. At this point, I don’t mind using Mac for work. In fact, I like it’s simplicity, and don’t have to worry about data privacy issues in the same way, as it’s work, not personal related matters.

With all that being said, I’ll start using this space to make note of what I did to get my laptop running, and projects that I’d like to work on.

Most everything worked out of the box. I had to use the tools from this site to get the thumbprint reader working:

  • https://github.com/uunicorn/python-validity

My main goals are to use the device for better access to Photos and Videos, for editing and also viewing and organization.

In addition, I’m trying to setup common app usage, such as email. I’m currently using Geary and also Evolution.

Geary is slightly cleaner and more modern. But it has a couple design issues I’d love to see improved.

  1. Introduce a color and letter icon next to each email to help visually differentiate messages (I really like K-9’s design for Android).
  2. Have keyboard shortcuts for some of the common actions, such as archive

Author

Posted

I’ve heard some reports of the Rasbery Pi being sensative to the voltage input.

I’m not using the official power supply, but instead a Macbook USB-C power supply. I think it’s rated at 65W (maybe only 30W?).

I haven’t noticed any issues, but I found out that you can check by running the following:

vcgencmd get_throttled

If you see the following the you may have voltage issues:

throttled=0x50005

When I ran the command the output was simply:

throttled=0x0

Hopefully that means I’m in the clear with my power supply.

Source: https://pimylifeup.com/raspberry-pi-low-voltage-warning/

Author

Posted

This article did a pretty good job:
  • https://raspberrytips.com/protonvpn-on-raspberry-pi/
Proton’s guide for installing their CLI:
  • https://protonvpn.com/support/linux-vpn-tool/

Downloaded:

https://repo.protonvpn.com/debian/dists/stable/main/binary-all/protonvpn-stable-release_1.0.3_all.deb

I just installed the .deb with the GUI installer. Then proceeded to:

sudo apt-get update
sudo apt-get install protonvpn-cli

From there, it’s a matter of logging in:
protonvpn-cli login <username>

Enter. Then provide the password, when prompted.

I saw a GUI keychain manager popup, but I just cancelled. I guess that’s the OS offering to store the authentication info?

One the authentication is successful, to connect:
protonvpn-cli c

After choosing my server, unfortunately, I was met with:

An unknown error has occurred. Please ensure that you have internet connectivity. If the issue persists, please contact support.

The tutorial above also mentioned this. In their experience, rebooting the system was enough to resolve the issue. But I’m not clear if that’s for Ubuntu or Rasberry Pi.

I have yet to try the reboot, so I have everything installed and in place, but don’t yet have a working VPN connection.

Author

Posted

An external hard drive that I had been using on Mac OS for years is using the APFS file system. Don’t ask me why.

Plugging in the drive showed that the system and file manager couldn’t deal with apfs.

I’m mainly wanted to view the files. A quick google and I came across a forum posts suggesting to use apfs-fuse:
  • https://forums.raspberrypi.com/viewtopic.php?t=251476
  • apfs-fuse: https://github.com/sgan81/apfs-fuse

There steps to download and compile worked for me, with one exception. I guess gcc-c++ is no longer the package name in Linux

Downloaded the necessary tools:

sudo apt update
sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake git libattr1-dev zlib1g-dev

Then close the github locally:

git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update

And compile:

mkdir build
cd build
cmake ..
ccmake . # Only if you want to change build options
make

The last issue I ran into was actually mounting the hard drive. I asked for a little help from ChatGPT, which suggested:

sudo ./apfs-fuse -o allow_other /dev/sda2 /mnt/apfs

I was having permissions issues viewing before using the -o allow_other, and the ./ is because apfs-fuse was compiled locally, and doesn’t have any symbolic link for the system to know where to search for it.

I don’t think this will be automated, so I’ll have to manually mount APFS drives for now, but I was able to view the drive and files after following the above steps.

Author