Bug 713509 - [RFE] Mac USB SuperDrive does not spin up on MacBook Air
Summary: [RFE] Mac USB SuperDrive does not spin up on MacBook Air
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Justin M. Forbes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-15 15:44 UTC by Jurgen Kramer
Modified: 2025-11-15 03:47 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jurgen Kramer 2011-06-15 15:44:01 UTC
Description of problem:
When connecting a Apple USB SuperDrive to my MacBook Air is does not accept CD's or sping up when a CD/DVD is already inserted.

Version-Release number of selected component (if applicable):
kernel-2.6.38.7-30.fc15.x86_64

How reproducible:
always

Steps to Reproduce:
1. Plug in USB SUperDrive
2. Insert CD or DVD
3.
  
Actual results:
SuperDrive does not spin up/CD or DVD is not inserted

Expected results:
SuperDrive does spin up/CD or DVD is inserted

Additional info:
Although it seems this is a USB power issue, browsing the web I found some texts suggesting otherwise. It seems the SuperDrive needs a custom SCSI command to wake up. If successfully tried it with sg3_utils.

Command used: sg_raw /dev/sr0 ea 00 00 00 00 00 01

After the command is issued the drive wakes up and works happily.
Is this something which can be added as a quirk somewhere in de SCSI code?


Jun 15 17:36:31 paragon kernel: [ 2957.495209] usbcore: registered new interface driver uas
Jun 15 17:36:31 paragon kernel: [ 2957.505836] Initializing USB Mass Storage driver...
Jun 15 17:36:31 paragon kernel: [ 2957.506116] scsi8 : usb-storage 1-5.4:1.0
Jun 15 17:36:31 paragon kernel: [ 2957.506374] usbcore: registered new interface driver usb-storage
Jun 15 17:36:31 paragon kernel: [ 2957.506378] USB Mass Storage support registered.
Jun 15 17:36:32 paragon kernel: [ 2958.515414] scsi 8:0:0:0: CD-ROM            Apple    SuperDrive       2.00 PQ: 0 ANSI: 0
Jun 15 17:36:32 paragon kernel: [ 2958.549264] sr1: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
Jun 15 17:36:32 paragon kernel: [ 2958.550590] sr 8:0:0:0: Attached scsi generic sg4 type 5

I've also tried this on my regular PC running F15 and it works just fine while this PC does certainly not have 'high power' USB ports. Could be that writing a CD or DVD does require more amps from the usb port.

Comment 1 Chuck Ebbert 2011-06-25 05:43:17 UTC
(In reply to comment #1)
> I've also tried this on my regular PC running F15 and it works just fine while
> this PC does certainly not have 'high power' USB ports. Could be that writing a
> CD or DVD does require more amps from the usb port.

Do you mean it works fine without sending the SCSI command to the drive?

Comment 2 Jurgen Kramer 2011-06-25 07:42:14 UTC
No the SCSI command has to be sent for the drive to spin up. What I meant was that the drive works just fine on a 'regular PC' with non high power USB ports. The SCSI command is needed to spin up the drive.

I have not tested writing CDs or DVDs on a PC without high power USB ports.

Comment 3 Chuck Ebbert 2011-06-26 08:39:21 UTC
You should probably ask about this on the linux-usb list.

Comment 4 Josh Boyer 2011-08-16 19:20:08 UTC
Does this still happen on a 3.0 or 3.1-rc1/2 kernel?

Comment 5 Jurgen Kramer 2011-08-17 09:29:21 UTC
retested with kernel 3.0.0-1.fc16.x86_64 from F16 Alpha RC5. The device is properly recognized but does not spin up. Issuing the special SCSI command makes the drive spin up.

Comment 6 Jurgen Kramer 2011-08-17 13:25:11 UTC
Another test with update F16 kernel 3.0.1-3.fc16.x86_64. Issue persists.

Comment 7 Jurgen Kramer 2011-08-24 06:44:00 UTC
just checked again with kernel-3.1.0-0.rc3.git0.0. No change (and not expected).

Comment 8 Dale Macartney 2013-10-19 17:25:10 UTC
Tested against Fedora 19 (kernel 3.11.4-201.fc19.x86_64)

Still no hot-plug support. Works fine when rebooting. 

To use without rebooting do the following:

1. Plug in USB SuperDrive

dmesg output
[13613.172494] usb 3-1: new high-speed USB device number 5 using xhci_hcd
[13613.272610] usb 3-1: New USB device found, idVendor=05ac, idProduct=1500
[13613.272613] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[13613.272615] usb 3-1: Product: MacBook Air SuperDrive
[13613.272617] usb 3-1: Manufacturer: Apple Inc.
[13613.272618] usb 3-1: SerialNumber: KTRC5F03824         
[13613.275331] usb-storage 3-1:1.0: USB Mass Storage device detected
[13613.275564] scsi10 : usb-storage 3-1:1.0
[13614.282929] scsi 10:0:0:0: CD-ROM            Apple    SuperDrive       2.00 PQ: 0 ANSI: 0
[13614.294363] sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
[13614.294767] sr 10:0:0:0: Attached scsi CD-ROM sr0
[13614.294982] sr 10:0:0:0: Attached scsi generic sg2 type 5

2. run "sg_raw /dev/sr0 ea 00 00 00 00 00 01" (dependant on sg3_utils). 

e.g 
[user@fedora ~]$ sg_raw /dev/sr0 ea 00 00 00 00 00 01
SCSI Status: Good 

[user@fedora ~]$


You can now insert and eject disks like any normal optical  disk drive.

Comment 9 Michele Baldessari 2013-11-24 23:03:15 UTC
Dale, Jurgen,

can you please test the following udev rule (/etc/udev/rules.d/99-applesdrive.rules):
# Hack to power up external Apple Superdrive 
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1500", KERNEL=="sr*", RUN+="/bin/sg_raw -v /dev/%k ea 00 00 00 00 00 01"

Let me know if it works for you. No need to restart anything just place this
file in /etc/udev/rules.d.

Thanks,
Michele

Comment 10 Dale Macartney 2013-11-24 23:06:36 UTC
Michele, 

Confirmed as working.... 

Personally I have been adding the following to my systems which also works so either udev rule works fine. 


ACTION=="add", ENV{ID_VENDOR}=="Apple", ENV{ID_MODEL}="SuperDrive", RUN+="/usr/bin/sg_raw /dev/sr0 ea 00 00 00 00 00 01"

Dale

Comment 11 Michele Baldessari 2013-11-24 23:11:40 UTC
Thanks Dale,

yours works too as long as the Superdrive is the only cd/dvd drive on the system, yes. I think at this point it makes little sense to pursue some
kernel change for this. I quickly looked at it and it likely cannot be done cleanly in drivers/usb/storage/initializers.c and will require an ad hoc ums-apple... driver. Given that we can fix this in userspace with greater flexibility, I think we should ask the udev folks to include this in one form
or the other.

hth,
Michele

Comment 12 Michele Baldessari 2013-11-24 23:24:11 UTC
I've filed https://bugs.freedesktop.org/show_bug.cgi?id=71972
Let's see if upstream agrees to it or not.

Comment 13 Jurgen Kramer 2013-11-25 15:13:09 UTC
Just to confirm as well. The udev rule works great! Thanks.

Comment 14 Fedora Admin user for bugzilla script actions 2025-11-15 03:47:42 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.


Note You need to log in before you can comment on or make changes to this bug.