Installing Fedora 32 on a mid-2009 Macbook Pro - Part One, WiFi
A series of posts documenting the installation of Fedora 32 onto a mid-2009 15" Macbook Pro. In three parts; Part One describes the initial installation of Fedora and necessary updates to detect the internal WiFi hardware, Part Two describes configuring the window manager i3wm, and Part Three details the installation of the applications that I use daily. As is usual with Linux installations, forewarned is forearmed. Prepare for the lack of internal WiFi capability in the base Fedora install. And, if you use the i3 Window Manager, there is additional work to allow the MacBook to return to active mode from standby when the lid is closed and subsequently re-opened.
-
>>Part One<<
Things to Consider Before Switching to Fedora
-
Linux power management, at least in Fedora 32 and on this Macbook Pro, sucks. Don’t expect to be able to use the laptop on battery power for any length of time. Even under idle load and with a new battery, the power drain is something to behold.
powertop
reports the main cuprits asdbs_work_handler
,tick_sched_timer
andhrtimer_wakup
, eclipsing evenfirefox
in mW usage. These conspire to cause the Macbook to run hot; you really don’t want to place this thing on your lap for any length of time. There does not seem to be a workaround available but hopefully this will be addressed in a future Fedora update. I plan to try Pop!_OS[1] at some future stage as it has built in support for AMD and Nvidia GPUs and apparently a power management package from Intel Clear Linux.[2]. In the meantime, I’ll have to digest the Fedora _Power Management Guide_.[3] -
When the lid is closed the default power management behaviour causes the Macbook Pro to transition immediately to standby/suspend mode. Subsequently opening the lid does not trigger a return to active mode, forcing a reboot. As a workaround I used
xfce4-power-manager
and changed the action on lid close setting to to simply turn off the display. But this means that using the laptop as a laptop isn’t feasible as the machine runs at full tilt regardless. -
I much prefer tap to click than having to actually press and click the trackpad.
xfce4-mouse-settings
allows this and other mouse/trackpad settings to be modified, but any modification seems to be ignored by i3wm — the Xfce window manager respects the user’s choice. In i3wm this will need to be manualy configured. -
Expect to have to install the proprietary Nvidia graphics drivers to support an external monitor. Not a big deal but it is something else that needs to be done.
-
The internal MacBook WiFi interface seems to break after a kernel update, so always keep a working USB WiFi dongle close at hand.
Why Move from OSX to Linux?
Why run Linux when Apple does a decent job of supporting their hardware? Apple
officially only supports OSX "El
Capitan"[4] on this mid 2009
Macbook Pro. El Capitan is old enough that even Homebrew has dropped support for
it, and that’s a problem as almost all the software I use I install using
Homebrew. As much as I like Homebrew it does tend to compile many packages from
source. Rust, for example, can take hours to install or upgrade on this
hardware. While on Fedora, precompiled packages are installed using sudo yum
install <blah>
in a few seconds. This makes the decision to switch that much
easier as all the software I use is also available on Linux — even Spotify and
Zoom!
Macbook Pro Overiew
-
Apple MacBook Pro 15-Inch "Core 2 Duo" 2.66 (SD)
-
Identifiers: Mid-2009 15" - MB985LL/A - MacBookPro5,3 - A1286 - 2325
-
8 GB RAM
-
500GB 3D NAND, WD Blue SSD
Requirements
Use a USB flash drive. Do not use an SD card inserted into the SD card reader on the left side of the Macbook as the Macbook is unable to boot from the SD reader. |
-
A wired Ethernet connection to complete the installation, or
-
A USB WiFi dongle having driver support in the base Fedora installation. I chose a "Panda Wireless" dongle having a chipset supported by the Raspberry Pi. I started by searching Amazon for devices having the
AR9271
chipset.
Expect that the Macbook internal WiFi will not work. The internal Bluetooth interface worked — for me — so I was able to tether the Macbook to a mobile Bluetooth hotspot — my iPhone — but a Bluetooth connection is slow and not as reliable as I would have liked. I was unsuccessful in tethering the 2009 MacBook Pro to my 2012 MacBook Pro. |
Procedure
-
Power down the Macbook.
-
Insert the USB flash drive containing the Fedora 32 Live image into a free USB port on the left side of the MacBook Pro.
-
Power up while depressing the
OPTION
key until the connected bootable devices are displayed. -
Choose to boot from the USB flash drive containing the Fedora 32 Live image.
-
After successfully booting into Fedora, run the Fedora installer and install to the internal drive.
-
When the MacBook reboots, log into the Xfce desktop and connect to the Internet using wired ethernet, USB WiFi dongle, or bluetooth tethering.
Setting up the internal WiFi
Expect that the internal Wifi will break after each kernel upgrade. Not quite sure what to do about this, as what was once working for me now no longer works. |
1
2
3
sudo dnf -y install make dkms
sudo dnf upgrade
sudo reboot
1
2
3
4
sudo rpm --import https://raw.githubusercontent.com/UnitedRPMs/unitedrpms/master/URPMS-GPG-PUBLICKEY-Fedora
sudo dnf -y install https://github.com/UnitedRPMs/unitedrpms/releases/download/17/unitedrpms-$(rpm -E %fedora)-17.fc$(rpm -E %fedora).noarch.rpm
sudo dnf install broadcom-wl-dkms
The system should now recognize the internal WiFi adapter.
-
If unsuccessful then Internet searches will be required as this post covers only the "happy path".
-
If successful then the WiFi dongle (or Ethernet cable, or Bluetooth hotspot) may be removed and the internal WiFi adapter configured.
Changing the Hostname
My Fedora install sets the hostname to the generic localhost.localdomain
. Lets
change that;[9]
1
2
3
$ hostname
localhost.localdomain
1
2
3
4
5
6
7
8
9
10
11
$ hostnamectl
Static hostname: localhost.localdomain
Icon name: computer-laptop
Chassis: laptop
Machine ID: ff9d8caadacc46c7872dafe65f5b7840
Boot ID: 9d634fa9edc34fab96881e7115809558
Operating System: Fedora 32 (Thirty Two)
CPE OS Name: cpe:/o:fedoraproject:fedora:32
Kernel: Linux 5.7.17-200.fc32.x86_64
Architecture: x86-64
1
$ sudo hostnamectl set-hostname <new-name>
The above will set the static
, dynamic
, and pretty
hostnames to the same
value. To set each hostname to a different value use the following options to
hostnamectl
:
-
--transient Only set transient hostname
-
--static Only set static hostname
-
--pretty Only set pretty hostname