r/linux_on_mac • • 1h ago

[SOLVED] MacBook Air internal SD card reader disappears after suspend/resume (Linux Mint)

2 Upvotes

I have a mid-2013 MacBook Air (MacBookAir6,2 / A1466) running Linux Mint 22.3 MATE and a 128GB SD card in a flush-mounted Nifty Air Silver SD card holder in the SDXC slot so it's always present.

After sleeping and waking, the SD card disappears from the system until a reboot.

The fix was hard to find but easy to implement: cycle the SD reader's power control through the Mac's existing ACPI firmware methods on resume.

Hardware and Software

  • MacBook Air 6,2 (mid-2013, A1466)

  • Linux Mint 22.3 MATE

  • Linux kernel 7.0.0-43-generic

  • Internal Apple SD card reader: USB ID 05ac:8406

Finding the cure

The MacBook's ACPI tables contain two methods under:

\_SB.PCI0.XHC1

  • SPWR — SD reader power control

  • SRST — SD reader reset control

The MacBook Air J113 (820-00165) board schematic identifies the associated GPIO signals:

  • GPIO24 = SD_RESET_L

  • GPIO44 = SD_PWR_EN

The ACPI SPWR method controls GPIO44, the SD reader's power-enable signal.

The arguments are:

  • SPWR(0) — switch reader power off

  • SPWR(1) — switch reader power on

Step 1: Install ACPI-call

Install the package in Linux Mint:

sudo apt install acpi-call-dkms

Load the kernel module:

sudo modprobe acpi_call

Confirm that the interface exists:

ls -l /proc/acpi/call

Load the module automatically at boot:

echo acpi_call | sudo tee /etc/modules-load.d/acpi_call.conf

Step 2: Automate recovery after resume

Create a systemd sleep hook to check whether the reader is present after waking. If it's missing, cycle its power. If it's there, skip.

Create the file:

sudo mkdir -p /usr/lib/systemd/system-sleep

sudo nano /usr/lib/systemd/system-sleep/sdreader-recover

Paste:

#!/bin/bash

# Only run after resume
[ "$1" = post ] || exit 0

# Give USB devices time to settle
sleep 2

# If the reader is already present, do nothing
if /usr/bin/lsusb -d 05ac:8406 | grep -q 05ac:8406; then
    logger -t sdreader-recover "Reader present; no action needed"
    exit 0
fi

logger -t sdreader-recover "Reader missing; cycling SD power"

# Power off
echo '_SB.PCI0.XHC1.SPWR 0' > /proc/acpi/call
sleep 2

# Power on
echo '_SB.PCI0.XHC1.SPWR 1' > /proc/acpi/call
sleep 1

# Record the result
if /usr/bin/lsusb -d 05ac:8406 | grep -q 05ac:8406; then
    logger -t sdreader-recover "Reader successfully recovered"
else
    logger -t sdreader-recover "Reader recovery failed"
fi

exit 0

Make the script executable:

sudo chmod +x /usr/lib/systemd/system-sleep/sdreader-recover

The result

The internal SD card now returns automatically after suspend/resume.

This is a working fix on my MacBook Air 6,2. It uses the Mac's existing ACPI firmware controls and does not require a kernel patch, a reboot, or a reset of the entire USB controller.

Hardware compatibility

This solution is confirmed on the MacBook Air 6,2. Other Mac models may have different ACPI namespaces, GPIO assignments, or firmware methods. The method names and hardware signals should not be assumed to be identical across models.

Hopefully this saves someone else the hours of troubleshooting it took me to find the solution!


r/linux_on_mac • • 5h ago

Frigg off BRCM1072

Post image
18 Upvotes

Love love love me my 2017 MBA it’s just the Broadcom drivers.

I am so sick of it I am just rocking a big ass usb to rj45 from my MOCA adapter in my living room. Tres chic!

Now I just gotta wait for the CORRECT adapter to connect my AX200 WiFi card to. Not that waiting 3 weeks for the card wasn’t long enough


r/linux_on_mac • • 7h ago

My Linux Distro on Apple Silicon

Post image
1 Upvotes

r/linux_on_mac • • 23h ago

Debian based Macbook Pro - What are your MUST HAVE apps ?

3 Upvotes

I bought a 2015 Macbook pro with 16 gigs of ram, a pristine 15" display and a fairly good working battery. What do you suggest as your "MUST HAVE" apps that I should install ?


r/linux_on_mac • • 1d ago

Mint on MacBook Air

14 Upvotes

Bought a MacBook Air Early 2015 13” with 256GB SSD, 8GB RAM, Intel i5 1.6GHz for $50 on eBay. Minimal scratching or scuffs. Looks amazing. Battery was only holding about 75% charge so I ordered a new one from Amazon for $28. Getting around 10hrs of battery time.

Decided to go to Mint because Monterey seemed a bit sluggish and temps would get really high. Also replaced the CPU thermal paste. It’s running great for an 11 year old laptop.


r/linux_on_mac • • 1d ago

2015 Macbook Pro - browsers often freezing

Thumbnail reddit.com
1 Upvotes

I'd be grateful if anyone had a suggestion for the above issue! Thanks in advance!


r/linux_on_mac • • 1d ago

Ubuntu 24.04 does not uses my grapic card

Thumbnail gallery
2 Upvotes

r/linux_on_mac • • 1d ago

Linux on Mac

Thumbnail reddit.com
2 Upvotes

r/linux_on_mac • • 1d ago

Is there a distro with better battery life for a Mb pro mid 15 inch mid 2015.

3 Upvotes

Hello everyone! I bought a Macbook pro 15 inch 2015 with 2.2ghz i7 model for ~$70 and i am new to linux yet i wanted to know if there is a better os in terms of battery life and performance for light tasks like browsing yt and netflix because i am also planning to buy a new battery since the original one died at 350 cycles and 85% battery life.


r/linux_on_mac • • 1d ago

Omarchy on Macbook Pro A1502

Post image
0 Upvotes

Tried running cachyOS on the Macbook Pro A1502 but the bluetooth tethering for the wifi cards prove to be a hassle for me because of some internet problems from the past couple of days in my country. I opted to just installing Omarchy as the distro for the Macbook Pro and used the Internet in our office + Bluetooth tethering to get the wifi drivers to work.

Working with macOS Sequoia with Open Core is a slow and painstaking use case as applications crash, I can't even open a VSCode window and I could not open videos properly in Youtube. Got this as second hand to become my daily driver for my personal projects as the files that I was using was clogging up our other personal laptop. Although very old, it runs incredible great and snappy with Omarchy. I may try to boot into cachyOS with xfce + kde + Hyprland for the Desktop Environment to enable gestures when working but as of now, learning keyboard centered commands and tiling windows on the Omarchy is great.

The specs of the laptop:
-> A1502, 8GB RAM, 128GB SSD (The seller listed this as with having 256GB but I didn't complain), Intel i5 Haswell chip.

Things I needed to do to get this to work:

  1. Installed Omarchy using a boot drive. Although I think I should have removed the installed Open Core first before doing this.

  2. Paired my phone and laptop for internet connection to download and install the drivers for the wifi to get it to work.

  3. I needed to fiddle with the keyboard for it to work. If I remember correctly, I think I needed to configure files on boot so that keyboard was detected in the login screen as I needed external keyboards for logging in upon the installation of the OS.

  4. Installed mbpfan and set up the curves and settings so that it runs quieter and more optimized. It gets warm but it is not hot.

  5. Used Vanta Black for the theme, if there is a classic windows theme for Hyprland maybe you can recommend me one.

Have yet to use this for other coding environments too and I am very looking forward to using lazyvim.


r/linux_on_mac • • 2d ago

My iMAC shut down and wont reboot into Linux - Help please

1 Upvotes

Here is the issue, I came home and my iMac running LMDE, had shut down. Power brown out? Possibly.

When i logged back in, i tried to use the fsck command but it isn;t working.

Im getting this error message:

/dev/sda3: UNEXPECTED INCONSISTENCY; RuUN fsck MANUALLY.
(i.e., without -a or -p options)
Fsck exited with status code 4
The root filesystem on dev/sda3 requires a manual fsck.

I’m running LMDE on a 2011, 27” iMac.

I am a little overwhelmed trying to figure this. I am admittedly a newbie.

Thank you so much for helping.
xxx


r/linux_on_mac • • 2d ago

Qual a melhor distro pra Macs?

Thumbnail reddit.com
1 Upvotes

r/linux_on_mac • • 2d ago

Debian 13 on the MacBook Air (2015, 11-inch)

Post image
172 Upvotes

Getting WiFi to work on this machine was a hassle but at least with Debian you don’t have to update things so often.

I’ve tested Linux Mint, Fedora, and Debian on this machine.

Linux Mint was the easiest, but I prefer Gnome and KDE over Cinnamon.

Battery life on Debian is excellent! Much better than on Fedora.


r/linux_on_mac • • 2d ago

Con permiso de la comunidad si usan antigravity por necesidades realice Gravoz AI (Open Source): extensión para Google Antigravity IDE que interpreta las respuestas del agente con contexto de tu repositorio y las explica por voz con Gemini mientras trabajas linux 24.04 en mac a2141

Thumbnail gallery
0 Upvotes

r/linux_on_mac • • 3d ago

Linux Mint running on only one CPU!

Thumbnail reddit.com
3 Upvotes

r/linux_on_mac • • 3d ago

Dual boot OCLP-Mac OS and Linux?

2 Upvotes

I have a 2014 Macbook Air with 4GB of RAM - have done several dual Linux/MacOS installs on other machines with no issues, even involving OCLP, but for some reason struggling here.

I installed MacOS Monterey (using OpenCore Legacy Patcher, as this machine maxes out at Big Sur), and then created a partition for Linux using Disk Utility. I then successfully booted into a Linux Mint Xfce live USB, and installed Linux on that partition. Then it rebooted, and all seemed well.

However, I then tried to go back onto MacOS and it seemed very slow and got stuck on boot. So I did a PRAM reset, and after that the bootpicker (both the Apple one, and the OCLP one) just couldn't see the Linux partition. I tried to do a Boot repair but it didn't work.

What could be happening - is this a Mint Xfce issue potentially? (I previously managed a dual OCLP Sequoia and Mint Cinnamon on a 2017 MBP and it was fine). I just wanted to tinker a bit with Linux...


r/linux_on_mac • • 3d ago

Is Tails OS possible to run on a mac (pre-2019, aka not-silicon!)

0 Upvotes

Has anyone ever tried that? I get conflicted answers so far and I am not even sure if they even support it! But again macbooks are just normal machines pre-silicon era!


r/linux_on_mac • • 3d ago

Macbook Pro A1398 - Falls back to read only-filesystem.

1 Upvotes

Hey everyone. Purchased a 15 inch A1398 Macbook pro of Vinted and wanted to tinker with Linux. After installing Debian (or Mint) things work great for a while but then I got the error that my SSD suddenly became a "read only filesystem".

Did some reading and turned out it might be the drive, so got another 512Gig Apple SSD Blade and replaced the one I had.

Installed Linux Mint Mate edition yesterday. Initial install ok, but after one or 2 reboots ... same thing : Read only filesystem error and after rebooting the system crashes on a busybox prompt.

Question: Is it the drive? The hardware? Do I need to reset Pram ... or is the logic board toast ?

Thanx for your insights.


r/linux_on_mac • • 4d ago

Slight grain in display.

Thumbnail reddit.com
1 Upvotes

r/linux_on_mac • • 4d ago

Macbook Air 2017 14-inch, $40 at thrift store 90 percent battery

26 Upvotes

I bought a MBA for $40. It had the original owner's account on it, which was encrypted. I contacted them (I think) on FB but no response so I installed Mint with XFCE, even though it has 8gb ram. It's working great. I did spend about an hour or so with AI trying to not get it to freeze when it went into sleep or suspend, but then eventually turned off all of the sleep/suspend stuff because it was not going to happen. I also installed MBPFan to manage the heat. I just have to be careful to not shut the lid and leave it turned on in my backpack because it gets kind of hot. I also configured it so that it shows all of the logs and activity in text when you boot the machine, because it looks cool. I just wanted to share my experience.

EDIT: It's a 13-inch Macbook, it just has a large bezel around the screen.


r/linux_on_mac • • 4d ago

i need help!

3 Upvotes

i have a macbook air that i run ubuntu on..now, i would like to put high sierra back on it..and so here in lies the problem..when i installed ubuntu, i lost my onboard keyboard..and i only have one usb port...so how do i boot from the flashdrive...i cant get it to do anything except hit the grub menu..somebody help me...i dont kno all the information needed or whatever, but id b glad to provide whatever..


r/linux_on_mac • • 4d ago

HowTO enable TouchID on M1 MBA

Post image
2 Upvotes

r/linux_on_mac • • 4d ago

Using a second imac running mint as a monitor.

1 Upvotes

I had wanted to run a second 21.5" monitor as a second display for my linuxmint 2012 retina imax. Using claude, we figured out how to make it work.

Title: Working setup: old 21.5" iMac as a true extended (not mirrored) second display for Linux Mint, using netscreen-extend + Sunshine + Moonlight

TL;DR: My main machine is a 21.5" Retina iMac running Linux Mint. An older 21.5" iMac on my left now works as a genuine extended display: drag a window off the left edge of the main screen and it appears on the other one. netscreen-extend creates a virtual output, a dedicated Sunshine instance streams it, and Moonlight on the second iMac shows it, all over wired Gigabit Ethernet. It took some fixing to get there, so here's what worked in case it helps anyone else.

BACKGROUND

I moved my Retina iMac from macOS to Linux Mint and wanted a second screen. The usual Apple options don't apply. Target Display Mode needs macOS and only works on older iMacs. Sidecar, AirPlay to Mac and Universal Control are also macOS-only. Old iMacs cost very little second-hand, so rather than buy a separate monitor I wanted a Linux-native way to use one as a true extended display.

THE SETUP

Host: 21.5" Retina iMac (2015) with Intel Iris Pro 6200 graphics and the i915 driver. It runs Linux Mint (Ubuntu 24.04 base) in an X11 session and sits directly in front of me.

Client (the display): an older 21.5" iMac with AMD Radeon graphics (r600 driver). It runs Linux Mint (Ubuntu 24.04 base) and sits on my left.

Both are wired into the same Gigabit network. All streaming traffic is deliberately kept off Wi-Fi.

Signal path: the Retina iMac creates a virtual output, HDMI-1, at 1920x1080@60, placed to the left of the Retina panel (DP-3). Sunshine captures it with X11 capture and encodes H.264 using VAAPI. The stream crosses wired Gigabit Ethernet to Moonlight (Flatpak) on the second iMac, which shows it full screen with H.264 hardware decode.

It's a network display, so expect slight latency and some compression softness. Over a cable it's very usable for documents, email and browsing. It's not suitable for gaming or colour-critical work.

STEP 1: CHECK THE HOST

Run echo $XDG_SESSION_TYPE. It must say x11, because netscreen-extend doesn't support Wayland.

Run inxi -Gxx and xrandr --query to see your GPU and connector names. On mine, the Retina panel is DP-3 and HDMI-1 was free to use as the virtual output.

STEP 2: INSTALL NETSCREEN-EXTEND

cd \~

git clone https://github.com/daeoxide/netscreen-extend.git

cd netscreen-extend

./install.sh

There are two gotchas on Mint.

First, the installer's apt line includes flock. That isn't a valid package name on Mint, and flock is already installed as part of util-linux, so remove it from the line.

Second, Sunshine is not bundled with netscreen-extend. Install it separately from LizardByte's official releases. The Ubuntu 24.04 .deb works on Mint 22.

When the installer asks where to put the new display, choose the left.

STEP 3: THE FIXES THAT MADE IT WORK

Set the output by name, not by number. In \~/.config/netscreen-extend/config, set SUNSHINE_OUTPUT_INDEX=HDMI-1. With a number, Sunshine fell back to capturing the whole desktop.

Force X11 capture. Sunshine's default KMS capture mirrored the wrong screen. Adding capture = x11 to \~/netscreen-extend/templates/sunshine.conf.in fixed it.

Match the scaling. Windows were sized wrongly on the second screen until I ran the Retina panel at 1920x1080 at 100% scale, the same as the virtual output.

Don't open Mint's Display settings while netscreen is running. It froze my whole system and needed a hard power-off. Set the layout with the helper scripts in Step 5 instead.

STEP 4: MOONLIGHT ON THE SECOND iMAC

Install Moonlight:

flatpak install flathub com.moonlight_stream.Moonlight

Check hardware decode:

vainfo | grep -i h264

To pair, Moonlight shows a PIN. Enter it in the dedicated Sunshine web UI on the host at https://localhost:48090, which is netscreen's Sunshine port 48089 plus one.

Settings: 1920x1080, 60 FPS, H.264, about 50 Mbps, full screen.

To skip clicking through Moonlight each time, this command goes straight to the extended desktop:

flatpak run com.moonlight_stream.Moonlight stream \[host name as shown in Moonlight\] Desktop

I put that in Startup Applications on the second iMac.

STEP 5: DAILY USE

I use two small helper scripts on the host. screens-on sets the Retina to 1920x1080 at 100% and starts netscreen. screens-off stops netscreen and removes the virtual display.

screens-on always runs netscreen off first and waits a few seconds before starting. Without that, a leftover Sunshine instance kept hold of the ports, and Moonlight showed the host as offline with "Connection refused".

Two useful checks: ss -tln | grep 480 should list ports 48084, 48089 and 48090, and pgrep -af sunshine should show only one instance.

BONUS: SCREEN BLANKING IN SYNC

While Moonlight is streaming, the second iMac never blanks its screen. To fix this, a small watcher script on the host notices when the Retina screen goes dark. It then uses SSH with key login to switch off the second iMac's backlight, and switches it back on when the Retina wakes. On the client, sudo is restricted to that one backlight script.

RESULT

Two iMacs side by side, one desktop, windows dragging freely between them, all on Linux Mint. Happy to answer questions or share the scripts.