Sunday, May 26, 2024

2010 MintBook Pro

A friend gave me her old 2010 MacBook Pro 13" when she upgraded to a new Apple Silicon one. I only wanted to computer to play around with Linux on it. My go-to Linux distro is Mint and I've never had any trouble live-booting it on an Intel Mac so that's what I planned to put on it from the start. But the default Cinnamon Desktop was designed with ex-Windows users in mind and I wanted a more Mac-like experience. Budgie Desktop is, in my opinion, a nicer looking Desktop Environment, but there isn't an official Budgie flavor of Mint. So I wanted to install Budgie too.

Granted a LOT of this is really down to just icons and themes and arranging things on panels to make it look and feel more familiar. You don't have to do this. And none of it will make it run Mac software. But I use a number of cross-platform, open-source apps even on my Mac and Windows machines, so its mostly just about arranging things the way I'm used to.  You can just as easily theme it to be more like Windows if that's what you're used to.

Anyway, if you're up for the adventure, read on!

GET MINT

First, for the 2010 MacBook Pro you are going to need Linux Mint 20.3 “Una” because anything later will not have the Nvidia graphics drivers you need:
https://www.linuxmint.com/edition.php?id=292

The open source "neuveau" graphics drivers do work, and will give you hardware accelerated OpenGL 3D, but they will not do hardware accelerated video encoding/decoding. So if you open a video in YouTube in the browser or try to watch a DVD it will max out the CPU and fans and run very, very HOT. The solution to that problem is to use the proprietary Nvidia drivers. But they were dropped after Linux Mint 20.3 (which is based on Ubuntu Focal Fossa). Which is why we are not installing the latest version of Mint.

Keep in mind that Linux Mint "Una" will only be supported through 2025. If you want to keep an updated operating system on the MacBook after that you'll need to upgrade, but you'll lose built-in support for compatible Nvidia proprietary drivers. In which case you'll have to use an unofficial PPA to manually install the kernel modules. I've also successfully downgraded the kernel itself (that was under Ubuntu), but that brings with it a host of dependency issues for some apps.

INSTALL MINT

Then follow this guide on how to set it up for dual booting:
https://linuxsimply.com/linux-basics/os-installation/dual-boot/ubuntu-on-mac/

The key bit here is to create that 1000MB EFI partition. Yes, you will end up with 2 EFI partitions on the same physical drive. While this is often considered a no-no, it’s not actually against the specification and will only be a problem if you also have a Windows partition. Which you shouldn’t because we’re not triple-booting Windows, Mac, and Linux. Mac OS X and macOS will live happily with more than one EFI partition on a single drive and by doing it this way you’ll be able to keep the normal Apple boot menu you get by holding down the Option key AND you’ll have the normal Grub boot for Linux. You don’t need to mess around with rEFInd or some other boot manager.

If you are also using Bootcamp to put Windows on the Mac you'll want to look into using rEFInd or some other boot manager, because Windows will not play nice with two EFI partitions. I wasn't putting Windows on mine so I didn't have to deal with this.

NVIDIA DRIVERS

The open-source "neuveau" drivers make the fans wind out and the GPU run very hot. You also don’t get hardware accelerated video in Firefox. We need the proprietary Nvidia drivers *but* these are the old 340.x ones AND the 2010 Macbook Pro firmware does not actually activate the VGA card as PCI-E bus master when it hands off to Grub. Consequently, the drivers can’t find the PCI-E registers for the GPU and you get a blank, black screen.

We also don’t have the option to override the graphics at the boot menu because the boot menu won’t show either. Here’s how to fix BOTH problems.

Note that while doing all this I’d recommend you have TimeShift turned on and taking snapshots at each boot. It will create a slight delay between login and desktop while it saves the snapshot, but if you screw up you’ll be able to revert easily.

1. Edit Grub Menu or you won’t ever see it:

sudo xed /etc/default/grub GRUB_TIMEOUT_STYLE=menu GRUB_TIMEOUT=5 GRUB_TERMINAL=console GRUB_GFXMODE=800x600

2. Make sure to turn on TimeShift so you can roll back if you screw stuff up!!

3. Get Ready for Proprietary Nvidia 340 Drivers...

3a. Find your PCI-E Bus IDs:

lshw -businfo -class bridge -class display pci@000:00:17.0 bridge MCP89 PCI Express Bridge pci@000.04:00.0 display MCP89 [GeForce 320M]

(The IDs may be different on your specific computer)
We need the XX:XX.X number after the @

3b. Install Set PCI Module (if necessary):

sudo apt-get install grub-efi-amd64-bin

(odds are it will say it already has the newest version)

3c. Copy Set PCI Module to EFI Boot (if necessary)

sudo cp /usr/lib/grub/x86_64-efi/setpici.* /boot/efi/EFI/ubuntu/x86_64-efi

3d. Create Enable VGA Configuration File:

sudo xed /etc/grub.d/01_enable_vga.conf

3e. Put the following in that file:

cat << EOF insmod setpci setpci -s "00:17.0" 3e.b=8 setpci -s "02:00.0" 04.b=7 EOF

3f. SAVE and Repair Permissions:

sudo chmod 755 /etc/grub.d/01_enable_vga.conf

4. Update Grub:

sudo update-grub

5. Reboot

6. Check PCI Registers after Reboot:

sudo setpci -s “00:17.0” 3e.b > 08 sudo setpci -s “04:00.0” 04.b > 07

Note that the first one might spit back “0a” instead of “08” — it apparently does not matter.

7. Install the Nvidia 340.x proprietary drivers.

Note: Also install the proprietary Broadcom driver so the Wi-fi works.

BE PATIENT! This will take a LONG time to complete.

8. Reboot, enjoy Nvidia graphics and Wi-Fi!

Note: The “LM” boot logo being screwed up is normal. You should then see the “NVIDIA” splash screen shortly thereafter followed by the login screen.

What About In The Future?

Unfortunately Mint “Una” will only be supported up to April 2025. If you want to use a newer version of Linux Mint you’ll have to figure out the Nvidia driver issue yourself. So, if you are reading this in the summer of 2025, assuming the world still exists, your option for any later version of Linux is:

sudo add-apt-repository ppa:kelebek333/nvidia-legacy sudo apt update sudo apt install nvidia-340-updates nvidia-340-updates-dev xorg-modulepath-fix

Reboot.

Note that PPA repo should work to build the kernel module for any Linux. Keep in mind you need to use X11 because this old Nvidia card is incompatible with Wayland.

You could also try rolling back the kernel in a later version, which I’ve done before myself, but you’re asking for a ton of trouble. You’re better off risking the PPA above.

INSTALLING BUDGIE

Linux Mint’s default Cinnamon Desktop is designed to ease the learning curve for Windows users coming over to Linux. It is therefore designed with classic Windows in mind. But we’re on a Mac. We’re making a “MintBook Pro” here, so lets get something a little more Mac-like on it! IMO that means putting Budgie Desktop on it. Budgie has a very clean, modern aesthetic, there are very macOS-like themes and icon sets for it.

There no longer is a Global Menu available for Cinnamon Desktop nor a good, working one for Gnome. So you either have to use KDE Plasma, Budgie, or XFCE to get one that is Mac-like. XFCE would work zippy on this hardware. Budgie looks nicer and gets updated more often. Plasma is a bit too much for this hardware. So...Budgie it is!

But you can’t just install Budgie from the Linux Mint Repo. That will break your system! You need to add the Ubuntu Budgie project PPA and install it from there.

sudo add-apt-repository ppa:ubuntubudgie/backports sudo apt update

Okay, so we don’t actually want to just make this into Ubuntu Budgie or we could have just installed that instead. In order to make sure we just get the bits of Budgie we actually need and want copy and paste the following into your terminal:

sudo apt install budgie-analogue-clock-applet budgie-app-launcher-applet budgie-applications-menu-applet budgie-appmenu-applet budgie-brightness-controller-applet budgie-calendar-applet budgie-clipboard-applet budgie-clockworks-applet budgie-core budgie-countdown-applet budgie-cpufreq-applet budgie-cputemp-applet budgie-desktop-doc budgie-desktop-environment budgie-desktop budgie-dropby-applet budgie-extras-common budgie-extras-daemon budgie-fuzzyclock-applet budgie-haste-applet budgie-hotcorners-applet budgie-indicator-applet budgie-kangaroo-applet budgie-keyboard-autoswitch-applet budgie-lightpad-applet budgie-network-manager-applet budgie-performance-gauge-applet budgie-pixel-saver-applet budgie-previews-applet budgie-previews budgie-quickchar budgie-quicknote-applet budgie-recentlyused-applet budgie-rotation-lock-applet budgie-screenshot-applet budgie-showtime-applet budgie-sntray-plugin budgie-sys-monitor-applet budgie-sysmonitor-applet budgie-takeabreak-applet budgie-trash-applet budgie-visualspace-applet budgie-wallstreet budgie-weathershow-applet budgie-window-shuffler budgie-workspace-stopwatch-applet budgie-workspace-wallpaper-applet plymouth-theme-ubuntu-budgie-logo plymouth-theme-ubuntu-budgie-text ubuntu-budgie-themes plank

You’ll be missing: budgie-desktop-view and budgie-control-center because they are not in the backports PPA for some reason. The first one means your desktop icons won’t be clickable. Well, technically they are clickable, they just won’t open anything. So...

sudo apt-get install nautilus

That will fix the desktop icons. Budgie’s fall-back for making that “legacy” function work is Nautilus file manager. Which Linux Mint doesn’t have by default (Cinnamon uses Nemo, MATE uses Caja, and XFCE uses Thunar).

Note that if you switch back and forth between Budgie and Cinnamon the desktop icons may or may not work properly in one or the other, especially depending on if you changed the settings. I don't know if this is because it's just a toggle and the two DEs fight each other or what, but suffice to say that it's considered a "legacy" feature so don't expect it to be fixed. I'm not sure why some people hate putting things on the desktop so much that this is considered an outdated idea?

Menubar

I spent quite a bit of time tweaking the Budgie menubar panel to get it the way I wanted. I removed the "Start" menu, since that's not a very Mac-like thing to have. In its place I put the "User" applet with the Log Out/Shutdown/Restart where the Apple menu you would be, since I've got a bit of muscle memory for going there to shutdown or restart my computer.  

I've got the Global Menu next to that, which unfortunately doesn't work for every app, but does for enough of them. IMO too many of the Linux DEs are moving away from having window menus entirely, borrowing UI cues from mobile apps that don't make sense on a mouse-driven desktop, but Budgie and KDE still not only have some love for window menus but the global menu as well. 

On the other end I added a screen brightness control because the keyboard ones won't work (see below), then notifications, network, battery, volume, bluetooth, clock, and the widget/notifications panel (not that I really use those, I don't use them on my Macs either).  But it all feels very cozy and familiar!

DO NOT UNINSTALL CINNAMON DESKTOP! We need it as a backup in case Budgie breaks, and completely uninstalling it may remove dependencies for some of the Mint apps and utilities and break things.

THEME BUDGIE

Let’s make this thing *look* like macOS already! Bring on the the themes! Some people call Budgie “Gnome Done Right” so the good news is we can just get our themes from Gnome Look:

WhiteSur Gtk Theme: https://www.gnome-look.org/p/1403328

You’ll want to grab both the WhiteSur-Light and WhiteSur-Dark themes.

For modern macOS use the “WhiteSur” icon set: https://www.gnome-look.org/p/1405756

LOGIN SCREEN

Linux Mint uses the LightDM Greeter login. There are only four themes available for it on Gnome Look and none of them are Mac-like.

I didn’t bother changing mine too much since you don’t spend too much time on that screen anyway, but if you want to change yours a little Mint has its own “Login Window” utility for that. In Budgie you’ll find it under the main menu -> System Tools -> Login Window. If you can’t find it you can open it via the Terminal with:

sudo lightdm-settings

But it’s pretty basic, so if you want even MORE control over what it looks:

sudo apt update sudo apt-get install lightdm-gtk-greeter-settings

And that will install a nice GUI for customizing the login screen.

Alternatively, if you trust installing random things from GitHub there are:

lightdm-webkit-theme-macos (which has more recent macOS login screen appearance)
https://github.com/ZoomTen/lightdm-webkit-theme-macos?tab=readme-ov-file

LightDM Webkit MacOSX Theme (for older OS X appearance)
https://github.com/Wattos/LightDM-Webkit-MacOSX-Theme

...and Aqua LightDM Webkit Theme which is newish macOS Catalina-like:
https://github.com/paysonwallach/aqua-lightdm-webkit-theme

Like I said, how much time do you spend on that screen or looking at it? I didn’t waste much time on it myself. I've run into problems swapping the login on Linux before and wound up with a system with no functional login screen. Install and use at your own risk.

WEBCAM FIX

sudo apt-get install gucview

The GTK UVC Video Viewer is the solution to your Facetime Webcam woes. But it will only do 640x480 video at 15 fps probably. Pretty terrible! But it works.

MACBOOK MEDIA BUTTONS

If the keyboard brightness, volume, and eject buttons are not working on your keyboard you will need to install “Pommed” to enable them. I didn’t need to do this, the keys worked “out of the box” after installing Linux Mint, except for the screen brightness buttons, which I’m not sure can be made to work (see section below about “Screen Brightness”).

sudo apt update sudo apt install pommed

Make sure “pommed” is added to the end of /etc/rc.local so it runs on startup. You may need to edit the pommed.conf file manually to set a keybinding betwen your eject button (for optical discs) and the eject command.

SCREEN BRIGHTNESS

The buttons will not work with the legacy proprietary Nvidia drivers.
BUT! You can use the Nvidia Settings panel to adjust the brightness!

NVIDIA X Server Settings —> LVDS-0 (Apple) —> Color Correction Tab.

(make sure to “Confirm” changes!)

FILE MANAGER

If, like me, you like the Column View for files you’re out of luck. I think only a now defunct version of Dolphin File Manager had that. I don’t know why it’s so widely hated, or how it could possibly be more difficult to implement than a tree-view (it’s just a tree view horizontally really). Anyway, if you’re coming from a Mac you’ll expect to be able to do certain things in the file manager from the context menu so let’s fix that.

Click on the desktop so you get the generic Global Menu, then select “Edit -> Preferences” and in the left-hand column select “Context Menu” then make sure to check:

  • Duplicate
  • Make Link (this is the same as “Alias” on Mac)

LAUNCHPAD

I don’t really like or use Launchpad, but if you do you can get the same functionality on Linux.

Download and install “Lightpad” app and put it on your dock.

If you don’t want the old “rocket” icon and want the new multi-color squares icon you’ll need to go to:

/usr/share/

Right+click on the “applications” folder and “Open as Root”

Navigate to the “LightPad” app, right+click on it and select “Properties”

Click on the rocket icon and then “Browse” and select “File System” in the left column, then Home/yourusuername/.local/share/icons/WhiteSur-Light/Preferences (or WhiteSur-Dark if you’re using Dark theme)

Find the icon named “preferences-desktop-apps” and select that, set it as the icon for LightPad and you’re done.

You have to do it that way because “root” owns the file.

CUSTOMIZE APPLICATIONS DOCKLET ICON

Since I don’t use Launchpad on my Macs I usually add the “Applications” folder to the Dock. You can do the same with Mint Budgie and Plank but it’s less than ideal because it’s lists every application in alphabetical order in a long, long scrolling list. It also has the disadvantage that once you put it on Plank you can’t move it around nor can you drag it off the Plank to get rid of it!

If you did that and can’t figure out how to delete it go inside your home directory and find the “.config” folder (if you can’t see one, right+click and select “Show Hidden Files”) then inside that go to:

/plank/dock1/launchers/

Find the file named “applicaitons.dockitem” and move it to the trash. Gone off Plank!

So what you probably want is something more like the Windows “Start” menu with apps categorized. And Plank has an “Applications” docklet just for that!

It *does* adopt whatever icon is set in the theme for either “gnome-applications” or “gnome-main-menu” but if the theme you apply doesn’t set icons for those you’ll need to do so yourself. Also, it appears the icon *has* to be in PNG format, SVG doesn’t seem to work, and it will fallback to whatever is in the “gnome” icons folder under:

/usr/share/icons/gnome/256x256/categories/

(or whichever icon sub-size Plank is using based on your size preference)

If you want to change the icon there, which will also apply it to ALL users on the system, you have to open that location with “root” privileges.

If you don’t want to mess with the system-wide icons, just make sure to put a PNG version of the file in a requisite folder in your home directory and it should pick it up there as well.

ADD DOWNLOADS & DOCUMENTS TO PLANK

I also usually like to drag the “Downloads” and “Documents” folders onto the Dock in macOS. That doesn’t work as nicely on Linux. Yes, you can drag them from your Home folder onto Plank, but you’ll get a black square that you have to right+click on and select “Open in file browser” which is inconvenient, and the icon doesn’t indicate what it is.

But we can solve that problem with a custom launcher!

In your Home folder (or where ever, it doesn’t matter where) right+click and select “New Document —> Empty Document” and rename it “Downloads.desktop” and open it in your Text Editor. Put the following in it:

#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=false Exec=nemo /home/yourusername/Downloads Name=Downloads Comment=Downloads folder Icon=default-folder-download

Save it. Right+click and select “Properties” then go to “Permissions” tab and select the checkbox for “Allow executing file as a program.” Close the properties dialog.

For housekeeping purposes I created a hidden folder in my Home directory named “.launchers” and put the file in there, so there won’t be two “Downloads” folders in my Home folder.

Now drag that .desktop file onto Plank, and when you click it Nemo File Manager will automatically open to your Downloads folder.

You can do the same for the other special Home folders. It may be easier to customize the icon from the Properties dialog as well because you can pick it visually.

Note that if you move the original launcher file you’ll have to delete the one from Plank and drag-and-drop the launcher again from its new location or the one on Plank will be dead.

Faux Windows Too?

Since I didn't uninstall Cinnamon Desktop I decided to theme that to look like Windows 10. In case I had to hand this computer off to someone who is a Windows user instead of a Mac user, there's no reason not to have Cinnamon set up to look familiar for them, right? I wasn't installing actual Windows with Bootcamp on it anyway, but now without ever leaving Linux both faux user interfaces are available.

Final Thoughts

I set this up as a macOS-Linux dual boot system because I've never actually installed Linux ON a Mac before. Booted off Live CDs, DVDs, and USB drives sure, but I've never partitioned a Mac drive and put Linux on the machine. And in case I screwed that up I wanted to make sure I could still get into macOS to undo/fix things. When I went to wipe this MacBook though it had been upgraded as far as it could go to "High Sierra." Unfortunately that's one of the macOS versions with a BROKEN RECOVERY system! Sierra is the other one. So I couldn't actually use Recovery to wipe it. Thankfully I still had my "Snow Leopard" installation disc, which (just to give you an idea how long ago 2010 was, THAT was what originally shipped on this MacBook Pro!). So I was able to wipe the drive and do a clean install of that. Then I headed to the Apple Website to download the "El Capitan" installer, the last one I can install that I know doesn't have a broken Recovery. You want to go download these installers instead of trying to use any you archived, because these ones have been re-signed so they'll actually work.

Arguably, now that I know everything works, I could probably remove macOS - but this isn't a "daily driver" laptop so I don't really need to claw back the storage space. I am a bit disappointed that Linux Mint doesn't really run any faster on this hardware than Mac OS X or macOS. But the specs are pretty low by modern standards. I wasn't expecting a speed-demon, but usually Linux runs a little better than either macOS or Windows on the same hardware. I guess this little laptop is already giving 110%. And that extra 10% right now is that it is running a current operating system.