macbook – Hackaday https://hackaday.com Fresh hacks every day Tue, 05 Nov 2024 06:24:12 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.2 156670177 I Installed Gentoo So You Don’t Havtoo https://hackaday.com/2024/11/04/i-installed-gentoo-so-you-dont-havtoo/ https://hackaday.com/2024/11/04/i-installed-gentoo-so-you-dont-havtoo/#comments Mon, 04 Nov 2024 15:00:22 +0000 https://hackaday.com/?p=729862 A popular expression in the Linux forums nowadays is noting that someone “uses Arch btw”, signifying that they have the technical chops to install and use Arch Linux, a distribution …read more]]>

A popular expression in the Linux forums nowadays is noting that someone “uses Arch btw”, signifying that they have the technical chops to install and use Arch Linux, a distribution designed to be cutting edge but that also has a reputation of being for advanced users only. Whether this meme was originally posted seriously or was started as a joke at the expense of some of the more socially unaware Linux users is up for debate. Either way, while it is true that Arch can be harder to install and configure than something like Debian or Fedora, thanks to excellent documentation and modern (but optional) install tools it’s no longer that much harder to run than either of these popular distributions.

For my money, the true mark of a Linux power user is the ability to install and configure Gentoo Linux and use it as a daily driver or as a way to breathe life into aging hardware. Gentoo requires much more configuration than any mainline distribution outside of things like Linux From Scratch, and has been my own technical white whale for nearly two decades now. I was finally able to harpoon this beast recently and hope that my story inspires some to try Gentoo while, at the same time, saving others the hassle.

A Long Process, in More Ways Than One

My first experience with Gentoo was in college at Clemson University in the late ’00s. The computing department there offered an official dual-boot image for any university-supported laptop at the time thanks to major effort from the Clemson Linux User Group, although the image contained the much-more-user-friendly Ubuntu alongside Windows. CLUG was largely responsible for helping me realize that I had options outside of Windows, and eventually I moved completely away from it and began using my own Linux-only installation. Being involved in a Linux community for the first time had me excited to learn about Linux beyond the confines of Ubuntu, though, and I quickly became the type of person featured in this relevant XKCD. So I fired up an old Pentium 4 Dell desktop that I had and attempted my first Gentoo installation.

For the uninitiated, the main thing that separates Gentoo from most other distributions is that it is source-based, meaning that users generally must compile the source code for all the software they want to use on their own machines rather than installing pre-compiled binaries from a repository. So, for a Gentoo installation, everything from the bootloader to the kernel to the desktop to the browser needs to be compiled when it is installed. This can take an extraordinary amount of time especially for underpowered machines, although its ability to customize compile options means that the ability to optimize software for specific computers will allow users to claim that time back when the software is actually used. At least, that’s the theory.

It didn’t work out too well for me and my Dell, though, largely because Dell of the era would put bottom-basement, obscure hardware in their budget computers which can make for a frustrating Linux experience even among the more user-friendly distributions due to a general lack of open-source drivers. I still hold a grudge against Dell for this practice in much the same way that I still refuse to use Nvidia graphics cards, but before I learned this lesson I spent weeks one summer in college with this Frankensteined computer, waiting for kernels and desktop environments to compile for days only to find out that there was something critical missing that broke my installations. I did get to a working desktop environment at one point, but made a mistake with it along the way and decided, based on my Debian experiences, that re-installing the operating system was the way to go rather than actually fixing the mistake I had made. I never got back to a working desktop after that and eventually gave up.

This experience didn’t drive me away from Gentoo completely, though. It was always at the back of my mind during any new Linux install I performed, especially if I was doing so on underpowered hardware that could have benefited from Gentoo’s customization. I would try it occasionally again and again only to give up for similar reasons, but finally decided I had gained enough knowledge from my decades as a Debian user to give it a proper go. A lot has changed in the intervening years; in the days of yore an aspiring Gentoo user had to truly start at the ground up, even going as far as needing to compile a compiler. These days only Gentoo developers take these fundamental steps, providing end users with a “Stage 3” tarball which contains the core needed to install the rest of Gentoo.

Bringing Out The Best of Old Hardware

And I do have a piece of aging hardware that could potentially benefit from a Gentoo installation. My mid-2012 Macbook Pro (actually featured in this article) is still a fairly capable machine, especially since I only really need a computer these days for light Internet browsing and writing riveting Hackaday articles. Apple long ago dropped support for this machine in macOS meaning that it’s no longer a good idea to run its native operating system. In my opinion, though, these older, pre-butterfly Macs are still excellent Linux machines aside from minor issues like finding the correct WiFi drivers. (It also can’t run libreboot, but it’s worth noting that some Macs even older than mine can.) With all of that in mind I got to work compiling my first Linux kernel in years, hoping to save my old Macbook from an e-waste pile.

There’s a lot expected of a new Gentoo user even with modern amenities like the stage 3 tarball (and even then, you have to pick a stage file from a list of around 50 options), and although the handbooks provided are fairly comprehensive they can be confusing or misleading in places. (It’s certainly recommended to read the whole installation guide first and even perform a trial installation in a virtual machine before trying it on real hardware.) In addition to compiling most software from source (although some popular packages like Firefox, LibreOffice, and even the kernel itself are available as precompiled binaries now), Gentoo requires the user to configure what are called USE flags for each package which specify that package’s compile options. A global USE flag file is also maintained to do things like build GNOME, Bluetooth, even 32-bit support into every package, while specific package USE flags are maintained in other separate files. For example, when compiling GIMP, users can choose which image formats they want their installation of GIMP to support. There’s a second layer of complexity here too as certain dependencies for packages can be “masked” or forbidden from being installed by default, so the user will also need to understand why certain things are masked and manually unmask them if the risk is deemed acceptable.

One thing that Gentoo has pioneered in recent years is the use of what it calls distribution kernels. These are kernel configurations with sane defaults, meaning that that they’ll probably work for most users on most systems on the first try. From there, users can begin tweaking the kernel for their use case once they have a working installation, but they don’t have to do that leg work during the installation process anymore. Of course, in true Gentoo fashion, you can still go through the process of configuring the kernel manually during the install if you choose to.

Aside from compiling a kernel, Gentoo also requires the user to make other fundamental choices about their installation during the install process that most other major distributions don’t. Perhaps the biggest one is that the user has to choose an init system, the backbone of the operating system’s startup and service management systems. Generally most distributions decide for you, with most larger distributions like Debian, Fedora, and Arch going with systemd by default. Like anything in the Linux world, systemd is controversial for some, so there are alternatives with OpenRC being the one with the most acceptance in the Gentoo world. I started out with OpenRC in my installations but found a few pieces of software that I use regularly don’t play well with it, so I started my build over and now use systemd. The user also can select between a number of different bootloaders, and I chose the tried-and-true Grub seeing no compelling reason to change at the moment.

In addition, there’s no default desktop environment, so you’ll also need to choose between GNOME, KDE, XFCE, any other desktop environment, or among countless window managers. The choice to use X or Wayland is up to you as well. For what it’s worth, I can at least report that GNOME takes about three times as long to compile as the kernel itself does, so keep that in mind if you’re traveling this path after me.

It’s also possible you’ll need to install a number of drivers for hardware, some of which might be non-free and difficult to install in Gentoo while they might be included by default in distributions like Ubuntu. And, like everything else, they’ll need to be compiled and configured on your machine as well. For me specifically, Gentoo was missing the software to control the fans on my MacBook Pro, but this was pretty easy to install once I found it. There’s an additional headache here as well with the Broadcom Wi-Fi cards found in older Macs, which are notoriously difficult pieces of hardware to work with in the Linux world. I was eventually able to get Wi-Fi working on my MacBook Pro, but I also have an 11″ MacBook Air from the same era that has a marginally different wireless chipset that I still haven’t been able to get to work in Gentoo, giving me flashbacks to my experience with my old Dell circa 2007.

This level of granularity when building software and an overall installation is what gives Gentoo the possibility for highly optimized installations, as every package can be configured for the user’s exact use case for every package down to the kernel itself. It’s also a rolling release model similar to Arch, so in general the newest versions of software will be available for it as soon as possible while a Debian user might have to wait a year or two for the next stable release.

A Few Drawbacks

It’s not all upside, though. For those without a lot of Gentoo experience (including myself) it’s possible to do something like spend a day and a half compiling a kernel or desktop environment only to find out a critical feature wasn’t built, and then have to spend another day and a half compiling it again with the correct USE flags. Or to use the wrong stage file on the first try, or realize OpenRC won’t work as an init system for a specific use case, or having Grub inscrutably be unable to find the installation. Also, don’t expect Gentoo to be faster out-of-the-box than Debian or Fedora without a customization effort, either; for me Gentoo was actually slower than Debian in my benchmarks without a few kernel and package re-compiles. With enough persistence and research, though, it’s possible to squeeze every bit of processing power out of a computer this way.

Personally, I’m not sure I’m willing to go through the amount of effort to migrate my workstations (and especially my servers) to Gentoo because of how much extra configuration is required for often marginal performance gains thanks to the power and performance capabilities of modern hardware. Debian Stable will likely remain my workhorse for the time being for those machines, and I wouldn’t recommend anyone install Gentoo who doesn’t want to get into the weeds with their OS. But as a Linux hobbyist there’s a lot to be said for using other distributions that are a little more difficult to use than Debian or even Arch, although I’d certainly recommend using a tool like Clonezilla to make backups of your installation from time to time so if you do make the same mistakes I made in college you can more easily restore your system. For me, though, I still plan to keep Gentoo on my MacBook Pro since it’s the machine that I tinker with the most in the same way that a classic car enthusiast wants to keep their vehicle on the road and running as well as it did when it was new. It also lets me end forum posts with a sardonic “I use Gentoo, btw” to flex on the Arch users, which might be the most important thing of all.

]]>
https://hackaday.com/2024/11/04/i-installed-gentoo-so-you-dont-havtoo/feed/ 52 729862 gentoo
90s PowerBook runs macOS Monterey https://hackaday.com/2024/05/22/90s-powerbook-runs-macos-monterey/ https://hackaday.com/2024/05/22/90s-powerbook-runs-macos-monterey/#comments Wed, 22 May 2024 11:00:42 +0000 https://hackaday.com/?p=679571 Even though Apple isn’t known for making the most pro-consumer devices ever (at least not since the Apple II), the trope that Apples aren’t upgradable, customizable, or otherwise hackable doesn’t …read more]]>

Even though Apple isn’t known for making the most pro-consumer devices ever (at least not since the Apple II), the trope that Apples aren’t upgradable, customizable, or otherwise hackable doesn’t really hold much weight. It does take more work to modify them or change how Apple wants them to behave, but it’s not completely impossible. Take this example of a ’94 Apple PowerBook which runs macOS Moneterey thanks largely to new internals from a 2015 MacBook Pro.

[Billy] originally intended for a Raspberry Pi to go inside this old PowerBook, but at the time, prices for ARM single-board computer (SBC) were astronomical. For around the same price as the Pi was at the time, he was able to pick up a retina display from an iPad and the internals from a broken MacBook Pro to outfit this retro case. There’s also a Teensy installed to get the trackpad working and a driver board for the display from Adafruit, and a number of case mods were needed to get everything to fit including the screen which was slightly larger than the original 9.5″ display the laptop would have shipped with.

This project took both inspiration and some of the actual code needed to get everything working from another project we featured a while ago where a Mac Mini was installed inside of a PowerBook case from 1993. Unlike projects that use smaller SBCs for retrocomputing, these builds are notable because the hardware on the inside makes them usable as daily driver computers even today, and might even be an upgrade if you’re using the internals from a MacBook Pro that would have originally had a butterfly keyboard.

]]>
https://hackaday.com/2024/05/22/90s-powerbook-runs-macos-monterey/feed/ 12 679571 powerbook-main
Best of Both Worlds: The MacPad https://hackaday.com/2024/03/06/best-of-both-worlds-the-macpad/ https://hackaday.com/2024/03/06/best-of-both-worlds-the-macpad/#comments Thu, 07 Mar 2024 06:00:28 +0000 https://hackaday.com/?p=667217 Despite a growing demand for laptop-tablet hybrid computers from producers like Lenovo, HP, and Microsoft, Apple has been stubbornly withdrawn this arena despite having arguably the best hardware and user …read more]]>

Despite a growing demand for laptop-tablet hybrid computers from producers like Lenovo, HP, and Microsoft, Apple has been stubbornly withdrawn this arena despite having arguably the best hardware and user experiences within the separate domains of laptop and tablet. Charitably one could speculate that this is because Apple’s design philosophy mandates keeping the user experiences of each separate, although a more cynical take might be that they can sell more products if they don’t put all the features their users want into a single device. Either way, for now it seems that if you want a touchscreen MacBook you’ll have to build one yourself like the MacPad from [Federico].

This project started as simply providing a high-quality keyboard and mouse for an Apple Vision Pro, whose internal augmented reality keyboard is really only up to the task of occasionally inputting a password or short string. For more regular computing, [Federico] grabbed a headless MacBook which had its screen removed. This worked well enough that it triggered another line of thought that if it worked for the Vision Pro it might just work for an iPad Pro as well. Using Apple tools like Sidecar makes this almost trivially easy from a software perspective, although setting up the iPad as the only screen, rather than an auxiliary screen, on the MacBook did take a little more customization than normal.

The build goes beyond the software side of setting this up, though. It also includes a custom magnetic mount so that the iPad can be removed at will from the MacBook, freeing both the iPad for times when a tablet is the better tool and the MacBook for when it needs to pull keyboard duty for the Vision Pro. Perhaps the only downsides are that this only works seamlessly when both devices are connected to the same wireless network and that setting up a headless MacBook without a built-in screen takes a bit of extra effort. But with everything online and working it’s nearly the perfect Apple 2-in-1 that users keep asking for. If you’re concerned about the cost of paying for an iPad Pro and a Macbook just to get a touchscreen, though, take a look at this device which adds a touchscreen for only about a dollar.

Thanks to [Stuart] for the tip!

]]>
https://hackaday.com/2024/03/06/best-of-both-worlds-the-macpad/feed/ 9 667217 mac-ipad-main
Hack Lets Intel MacBook Run Without a Battery https://hackaday.com/2023/02/17/hack-lets-intel-macbook-run-without-a-battery/ https://hackaday.com/2023/02/17/hack-lets-intel-macbook-run-without-a-battery/#comments Sat, 18 Feb 2023 06:00:38 +0000 https://hackaday.com/?p=576424 A long time ago, a laptop was a basic thing, and you could pretty much run one just by hooking up a power supply to the battery contacts. A modern …read more]]>

A long time ago, a laptop was a basic thing, and you could pretty much run one just by hooking up a power supply to the battery contacts. A modern MacBook is altogether fussier. However, when [Christophe] was stuck in the midst of a 2020 lockdown with no parts available, he found a way to get his damaged MacBook up and running without a battery.

The problem was brought about by a failing battery in the MacBook Pro 13″ from mid-2018, which swelled up and deformed the laptop’s case. Parts were unavailable, and the MacBook wouldn’t run at full speed without a battery fitted. That’s because with no battery present, the MacBook would send a BD_PROCHOT signal to the Intel CPU, telling it to slow down due to overheating, even when the chip was cool.

To get around the problem, [Christophe] used a tool called CPUTune. It allows fiddling with the various CPU settings of a MacBook. He deactivated the BD_PROCHOT signal, and also the CPU’s Turbo Boost feature. This ended the worst of the thermal throttling, and enabled semi-normal use of the machine.

It’s unclear why Apple would throttle the CPU with the battery disconnected. [Christophe]’s workaround got him back up and working again in the midst of a difficult period, regardless. We’ve seen some other great Macbook hacks before too, like this amazing save from serious water damage!

Thanks to [donaldcuckman] for the tip!]

]]>
https://hackaday.com/2023/02/17/hack-lets-intel-macbook-run-without-a-battery/feed/ 31 576424 IMG_5090
Are Slabtops the Future of Computing? https://hackaday.com/2022/11/25/are-slabtops-the-future-of-computing/ https://hackaday.com/2022/11/25/are-slabtops-the-future-of-computing/#comments Sat, 26 Nov 2022 00:00:00 +0000 https://hackaday.com/?p=563167 The bottom half of a MacBook Air on a purple and pink background has severed wires drawn out of its back to indicate its lack of a screen.The most popular computer ever was the Commodore 64 with its computer-in-a-keyboard form factor. If you have a longing for a keyboard computer with more modern internals, one of the …read more]]> The bottom half of a MacBook Air on a purple and pink background has severed wires drawn out of its back to indicate its lack of a screen.

The most popular computer ever was the Commodore 64 with its computer-in-a-keyboard form factor. If you have a longing for a keyboard computer with more modern internals, one of the easiest solutions today is to pull the screen off a laptop.

[Umar Shakir] wanted to see what the fuss was about regarding a recent Apple patent and took the top lid off of his M1 Macbook Air and turned it into a “slabtop.” The computer works great wired to a monitor but can also be used wirelessly via AirPlay. The approach doesn’t come without its downsides, of course. Newer MacBooks can’t access recovery mode without the built-in screen, and some older models had their WiFi antennas in the top lid, so making one into a slabtop will leave you desk-bound.

While [Shakir] focuses on MacBooks, this approach should work with any laptop. Apparently, it’s a cottage industry in China already. Back in the day, my own daily driver was a Pentium-powered laptop with its broken LCD (and lid) removed. It worked great with whatever CRT was nearby.

If you’re looking for an off-the-shelf keyboard computer of your own, you might want to check out the Raspberry Pi 400.

]]>
https://hackaday.com/2022/11/25/are-slabtops-the-future-of-computing/feed/ 114 563167 Slabtop_wide
Macbook Gets NVMe SSD With Help Of A BGA-Imitating PCB https://hackaday.com/2022/05/31/macbook-gets-nvme-ssd-with-help-of-a-bga-imitating-pcb/ https://hackaday.com/2022/05/31/macbook-gets-nvme-ssd-with-help-of-a-bga-imitating-pcb/#comments Tue, 31 May 2022 11:00:00 +0000 https://hackaday.com/?p=537620 On the left, the Thunderbolt chip as mounted on the motherboard originally. On the right, the shim installed in place of a Thunderbolt BGA chip, with the IPEX connector soldered onRecently, we stumbled upon a video by [iBoff], adding an M.2 NVMe port to a 2011-2013 MacBook. Apple laptops never came with proper M.2 ports, especially the A1278 – so …read more]]> On the left, the Thunderbolt chip as mounted on the motherboard originally. On the right, the shim installed in place of a Thunderbolt BGA chip, with the IPEX connector soldered on

Recently, we stumbled upon a video by [iBoff], adding an M.2 NVMe port to a 2011-2013 MacBook. Apple laptops never came with proper M.2 ports, especially the A1278 – so what’s up? The trick is – desoldering a PCIe-connected Thunderbolt controller, then soldering a BGA-like interposer PCB in place of where the chip was, and pulling a cable assembly from there to the drive bay, where a custom adapter PCB awaits. That adapter even lets you expose the PCIe link as a full-sized PCIe 4x slot, in case you want to connect an external GPU instead of the NVMe SSD!

The process is well-documented in the video, serving as an instruction manual for anyone attempting to install this specific mod, but also a collection of insights and ideas for anyone interested in imitating it. The interposer board ships with solder balls reballed onto it, so that it can be installed in the same way that a BGA chip would be – but the cable assembly connector isn’t installed onto the interposer, since it has to be soldered onto the mainboard with hot air, which would then melt the connector. The PCB that replaces the optical drive makes no compromises, either, tapping into the SATA connector pins and letting you add an extra 2.5mm SATA SSD.

Adding an NVMe drive is an underappreciated way to speed up your old laptop, and since they’re all PCIe under the hood, you can really get creative with the specific way you add it. You aren’t even limited to substituting obscure parts like Thunderbolt controllers – given a laptop with a discrete GPU and a CPU-integrated one, you could get rid of the discrete GPU and replace it with an adapter for one, or maybe even two NVMe drives, and all you need is a PCB that has the same footprint as your GPU. Sadly, the PCB files for this adapter don’t seem to be open-source, but developing a replacement for your own needs would be best started from scratch, either way.

We’ve seen such an adapter made for a Raspberry Pi 4 before, solderable in place of a QFN USB 3.0 controller chip and exposing the PCIe signals onto the USB 3 connector pins. However, this one takes it up a notch! Typically, without such an adapter, we have to carefully solder a properly shielded cable if we want to get a PCIe link from a board that never intended to expose one. What’s up with PCIe and why is it cool? We’ve talked about that in depth!

]]>
https://hackaday.com/2022/05/31/macbook-gets-nvme-ssd-with-help-of-a-bga-imitating-pcb/feed/ 12 537620 hadimg_macbook_pcieshim_feat
3D Printed Mini MacBook with a Raspberry Pi Heart https://hackaday.com/2020/10/08/3d-printed-mini-macbook-with-a-raspberry-pi-heart/ https://hackaday.com/2020/10/08/3d-printed-mini-macbook-with-a-raspberry-pi-heart/#comments Thu, 08 Oct 2020 11:00:00 +0000 https://hackaday.com/?p=435615 Do you like the sleek look of Apple’s laptops? Are you a fan of the Raspberry Pi? Have a particular affinity for hot glue and 3D printed plastic? Then you’re …read more]]>

Do you like the sleek look of Apple’s laptops? Are you a fan of the Raspberry Pi? Have a particular affinity for hot glue and 3D printed plastic? Then you’re in luck, because this tiny “MacBook” built by serial miniaturizer [Michael Pick] features all of the above (and a good bit more) in one palm-sized package. (Video link, embedded below.)

Getting the LCD panel and Raspberry Pi 4 to fit into the slim 3D printed case took considerable coaxing. In the video after the break, you can see [Michael] strip off any unnecessary components that would stand in his way. The LCD panel had to lose its speakers and buttons, and the Pi has had its Ethernet and USB ports removed. While space was limited, he did manage to squeeze an illuminated resin-printed Apple logo into the lid of the laptop to help sell the overall look.

The bottom half of the machine has a number of really nice details, like the fan grill cut from metal hardware cloth and a functional “MagSafe” connector made from a magnetic USB cable. The keyboard PCB and membrane was liberated from a commercially available unit, all [Michael] needed to do was model in the openings for the keys. Since the keyboard already came with its own little trackpad, the lower one is just there for looks.

Speaking of which, to really drive home the Apple aesthetic, [Michael] made the bold move of covering up all the screws with body filler after assembly. It’s not a technique we’d necessarily recommend, but gluing it shut would probably have made it even harder to get back into down the line.

We’ve previously seen [Michael] create a miniature rendition of the iMac and an RGB LED equipped “gaming” computer using many of the same parts and techniques. He’ll have to start branching off into less common machines to replicate soon, which reminds us that we’re about due for another tiny Cray X-MP.

]]>
https://hackaday.com/2020/10/08/3d-printed-mini-macbook-with-a-raspberry-pi-heart/feed/ 14 435615 minimacbook_feat