Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AnnoyingTechnology/dbaae864822cf08372f0aafe64a63477 to your computer and use it in GitHub Desktop.
Save AnnoyingTechnology/dbaae864822cf08372f0aafe64a63477 to your computer and use it in GitHub Desktop.
Make Apple's USB SuperDrive work on Linux

I was ready to throw it away, I opened it up and didn't find anything wrong with it. After a quick Google Search, turns out Apple fucked up their users (again) and locked this drive to only one laptop : the MacBook Air.

Bellow is the tweak (found online) to make it usable on Linux

# Debian/linux only - Linux SCSI generic driver
sudo apt install sg3-utils -y

# RHEL/Fedora only - Linux SCSI generic driver
sudo dnf install sg3_utils -y

# tell the external DVD player/burner to turn on
sudo sg_raw /dev/sr0 EA 00 00 00 00 00 01
@JxnBld
Copy link

JxnBld commented Apr 24, 2019

It says Permission denied

@AnnoyingTechnology
Copy link
Author

It says Permission denied

apt install and /dev/ alterations always require root privileges.
Either use the root account of your device, or prefix all commands with sudo

@DragonSerW
Copy link

DragonSerW commented Jan 23, 2021

Fedora Workstation 33:

sudo -i
sudo dnf install sg3_utils -y
sg_raw /dev/sr0 EA 00 00 00 00 00 01 # Wakes-Up your SuperDrive; no root needed!

@yookoala
Copy link

yookoala commented Sep 30, 2021

It's much easier to setup a custom udev rule than to manually run the command all the time.

cat <<- EOF | sudo tee  /etc/udev/rules.d/90-mac-superdrive.rules > /dev/null
# Initialise Apple SuperDrive
ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw %r/sr%n EA 00 00 00 00 00 01"
EOF

Reference:
https://cmos.blog/use-apples-usb-superdrive-with-linux/comment-page-1/

@qzmeng
Copy link

qzmeng commented Jan 12, 2023

Amazing. thank you

@NicolasPA
Copy link

NicolasPA commented Jan 13, 2025

The --cmdset=1 flag was missing for me to make it work, I was getting the message NVMe Result=0x0.

On Arch Linux:

yay sg3_utils
sg_raw --cmdset=1 /dev/sr0 EA 00 00 00 00 00 01
# Expected message: SCSI Status: Good

Additional note, if you're like me and updated your kernel when installing the new package, you may get this error when trying to open the disk unknown filesystem type 'udf'. Just restart your machine after the kernel update and it should work.

@yookoala
Copy link

yookoala commented Jan 16, 2025

The --cmdset=1 flag was missing for me to make it work, I was getting the message NVMe Result=0x0.

On Arch Linux:

yay sg3_utils
sg_raw --cmdset=1 /dev/sr0 EA 00 00 00 00 00 01
# Expected message: SCSI Status: Good

Additional note, if you're like me and updated your kernel when installing the new package, you may get this error when trying to open the disk unknown filesystem type 'udf'. Just restart your machine after the kernel update and it should work.

I've developed this for an older system (before NVM is a thing on laptop / desktop) so there is no need to distinct. But for newer system, this is a good addition. Thanks. Will update the instructions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment