Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save AnnoyingTechnology/dbaae864822cf08372f0aafe64a63477 to your computer and use it in GitHub Desktop.

Select an option

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

JxnBld commented Apr 24, 2019

Copy link
Copy Markdown

It says Permission denied

@AnnoyingTechnology

Copy link
Copy Markdown
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

DragonSerW commented Jan 23, 2021

Copy link
Copy Markdown

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

yookoala commented Sep 30, 2021

Copy link
Copy Markdown

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

qzmeng commented Jan 12, 2023

Copy link
Copy Markdown

Amazing. thank you

@NicolasPA

NicolasPA commented Jan 13, 2025

Copy link
Copy Markdown

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

yookoala commented Jan 16, 2025

Copy link
Copy Markdown

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.

@Usurfer

Usurfer commented Apr 1, 2026

Copy link
Copy Markdown

'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'

I followed your code Yookoala and it worked! Thanks! :)

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